Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GUIEditor = {
- checkbox = {},
- window = {},
- button = {}
- }
- addEventHandler("onClientResourceStart", resourceRoot,
- function()
- local sW, sH = guiGetScreenSize()
- --local sx, sy = sW/640, sH/480
- --local sx, sy = sW/1024, sH/768
- --local x, y = 455/sW, 344/sH
- --GUIEditor.window[1] = guiCreateWindow(sW/2-481/2, sH/2-412/2, 481, 412, "", false)
- --local thing1 = sW*(359/1024)
- --outputChatBox(tostring(thing1))
- GUIEditor.window[1] = guiCreateWindow(sW*(359/1024), sH*(245/768), sW*(347/1024), sH*(255/768), "", false)
- --GUIEditor.window[1] = guiCreateWindow(320, 448, 320, 320, "", false)
- --GUIEditor.window[1] = guiCreateWindow(233, 100, 481, 412, "", false)
- --guiSetProperty( GUIEditor.window[1], "VerticalAlignment", "Centre" )
- --guiSetProperty( GUIEditor.window[1], "HorizontalAlignment", "Centre" )
- --GUIEditor.window[1] = guiCreateWindow(sW/2-481/2, sH/2-412/2, 481, 412, "", false)
- guiWindowSetMovable(GUIEditor.window[1], true)
- --GUIEditor.button[1] = guiCreateButton(64, 61, 102, 46, "", false, GUIEditor.window[1])
- --GUIEditor.button[1] = guiCreateButton(20, 40, 102, 46, "", false, GUIEditor.window[1])
- --GUIEditor.button[1] = guiCreateButton(20, 20, sx*50, sy*50, "", false, GUIEditor.window[1])
- --guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
- GUIEditor.checkbox[1] = guiCreateCheckBox(86, 162, 15, 15, "", false, false, GUIEditor.window[1])
- --guiSetProperty( GUIEditor.window[1], "VerticalAlignment", "Centre" )
- --guiSetProperty( GUIEditor.window[1], "HorizontalAlignment", "Centre" )
- --outputChatBox(sx..", "..sy)
- end
- )
- addCommandHandler("s",
- function(cmd, num)
- local sW, sH = guiGetScreenSize()
- if (cmd == "s") then
- if (num == "1") then
- if (not GUIEditor.window[1]) then
- local sx, sy = sW/1024, sH/768
- GUIEditor.window[1] = guiCreateWindow(200, 344, sx*100, sy*100, "", false)
- centerWindow(GUIEditor.window[1])
- elseif (GUIEditor.window[1]) then
- destroyElement(GUIEditor.window[1])
- GUIEditor.window[1] = nil
- end
- end
- if (num == "2") then
- if (not GUIEditor.window[1]) then
- local sx, sy = sW/640, sH/480
- GUIEditor.window[1] = guiCreateWindow(200, 344, sx*100, sy*100, "", false)
- centerWindow(GUIEditor.window[1])
- elseif (GUIEditor.window[1]) then
- destroyElement(GUIEditor.window[1])
- GUIEditor.window[1] = nil
- end
- end
- if (num == "3") then
- local x, y = guiGetPosition(GUIEditor.window[1], false)
- local w, h = guiGetSize(GUIEditor.window[1], false)
- outputChatBox(x..", "..y..", "..w..", ".. h)
- end
- end
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment