Jump to content

Question about the screen size!


iPrestege

Recommended Posts

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) 
  

Link to comment

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) 

Link to comment
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) 

Link to comment
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
Link to comment
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) 

Link to comment

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...