Jump to content

Question about the screen size!


iPrestege

Recommended Posts

Posted

hi , i create 2 images using guieditor! the problem the Screen size!i create it on the center!but the problem!Different from computer to computer!So how can I make it on the center just like the center window!

  

Posted

Then you don't want both on center, because one will stay over the other.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Post your code.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

My Code:

g_ResRoot = getResourceRootElement(getThisResource()) 
GUIEditor = { 
    label = {}, 
    staticimage = {}, 
} 
fadeCamera(false) 
showChat(false) 
showCursor(true) 
  
function centerWindow(center_window) 
    local screenW,screenH=guiGetScreenSize() 
    local windowW,windowH=guiGetSize(center_window,false) 
    local x,y = (screenW-windowW)/2,(screenH-windowH)/2 
    guiSetPosition(center_window,x,y,false) 
end 
GUIEditor.label[1] = guiCreateLabel(234, 30, 877, 72, "Welcome To Gta Pro Server (=", false) 
  
guiLabelSetColor(GUIEditor.label[1], 221, 254, 0) 
GUIEditor.label[2] = guiCreateLabel(157, 556, 1124, 100, "Chose Your Best Game And Have Fun!", false) 
guiLabelSetColor(GUIEditor.label[2], 221, 254, 0) 
  
Drift = guiCreateStaticImage(263, 157, 423, 348, "1.png", false) 
centerWindow(Drift) 
  
  
--------------------------------------- 
  
War = guiCreateStaticImage(706, 157, 423, 348, "2.png", false) 
centerWindow(War) 
  

  

Posted

Try this:

GUIEditor = { 
    label = {}, 
    staticimage = {}, 
} 
  
fadeCamera(false) 
showChat(false) 
showCursor(true) 
  
GUIEditor.label[1] = guiCreateLabel(234, 30, 877, 72, "Welcome To Gta Pro Server (=", false) 
  
guiLabelSetColor(GUIEditor.label[1], 221, 254, 0) 
GUIEditor.label[2] = guiCreateLabel(157, 556, 1124, 100, "Chose Your Best Game And Have Fun!", false) 
guiLabelSetColor(GUIEditor.label[2], 221, 254, 0) 
  
Drift = guiCreateStaticImage(0.08, 0.20, 0.41, 0.45, "1.png", true) 
  
--------------------------------------- 
  
War = guiCreateStaticImage(0.51, 0.20, 0.41, 0.45, "2.png", true) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
Try this:
GUIEditor = { 
    label = {}, 
    staticimage = {}, 
} 
  
fadeCamera(false) 
showChat(false) 
showCursor(true) 
  
GUIEditor.label[1] = guiCreateLabel(234, 30, 877, 72, "Welcome To Gta Pro Server (=", false) 
  
guiLabelSetColor(GUIEditor.label[1], 221, 254, 0) 
GUIEditor.label[2] = guiCreateLabel(157, 556, 1124, 100, "Chose Your Best Game And Have Fun!", false) 
guiLabelSetColor(GUIEditor.label[2], 221, 254, 0) 
  
Drift = guiCreateStaticImage(0.08, 0.20, 0.41, 0.45, "1.png", true) 
  
--------------------------------------- 
  
War = guiCreateStaticImage(0.51, 0.20, 0.41, 0.45, "2.png", true) 

Now works correctly! But how can I do it here too?:

  
  
Grove = guiCreateStaticImage(223, 169, 244, 333, "Grove.png", false) 
  
Police = guiCreateStaticImage(592, 169, 244, 333, "Police.png", false) 
  
eam = guiCreateStaticImage(912, 169, 244, 333, "NoTeam.png", false) 

  

Posted

You must convert these positions to relative as I said on my first reply, that's what I did with the other images.

I used guieditor to load the images, then change them to relative, output them and done.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)
You must convert these positions to relative as I said on my first reply, that's what I did with the other images.

I used guieditor to load the images, then change them to relative, output them and done.

Did you convert it to the center? i use loadcode when i paste the code say : loaded successfully but now what? i cant find it!

Edited by Guest

  

Posted

No, I actually re-created the images one at each side of the screen.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
No, I actually re-created the images one at each side of the screen.

i recreate the images and i got this:

  
GUIEditor.staticimage[1] = guiCreateStaticImage(264, 165, 171, 401, "Grove.png", false) 
  
  
  
GUIEditor.staticimage[2] = guiCreateStaticImage(621, 165, 171, 401, "Police.png", false) 
  
  
  
GUIEditor.staticimage[3] = guiCreateStaticImage(959, 165, 171, 401, "NoTeam.png", false) 

  

Posted

They are still absolute.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That seems to be relative.

Though, the new guieditor outputs it in 3 digits maximum.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
That seems to be relative.

Though, the new guieditor outputs it in 3 digits maximum.

My friend has programming! Script help me to get the pos relative!

using :

guiGetPosition 
guiGetSize 

Thank You For Help!

  

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...