Hey there,
I am currently using the GUI Editor Resource and am experiencing problems with offsets when using the code that is outputted. As you can clearly see below, the offsets from left and right (for the children of the scrollpane) should be 10px each.
GUIEditor = {
tab = {},
staticimage = {},
edit = {},
tabpanel = {},
label = {},
button = {},
scrollpane = {},
gridlist = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
local screenW, screenH = guiGetScreenSize()
GUIEditor.staticimage[1] = guiCreateStaticImage(screenW - 267 - 10, screenH - 484 - 10, 267, 484, "images/galaxys4.png", false)
GUIEditor.staticimage[2] = guiCreateStaticImage(20, 51, 227, 383, "images/white.png", false, GUIEditor.staticimage[1]);
GUIEditor.scrollpane[1] = guiCreateScrollPane(0, 0, 227, 383, false, GUIEditor.staticimage[2])
GUIEditor.label[1] = guiCreateLabel(10, 10, 207, 43, "Email", false, GUIEditor.scrollpane[1])
local font_0 = guiCreateFont(":SRR-Gamemode/fonts/srrheadfont.ttf")
guiSetFont(GUIEditor.label[1], font_0)
guiLabelSetColor(GUIEditor.label[1], 250, 195, 4)
guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false)
guiLabelSetVerticalAlign(GUIEditor.label[1], "center")
GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 60, 207, 313, false, GUIEditor.scrollpane[1])
GUIEditor.tab[1] = guiCreateTab("Inbox", GUIEditor.tabpanel[1])
GUIEditor.memo[1] = guiCreateMemo(10, 114, 187, 165, "", false, GUIEditor.tab[1])
GUIEditor.gridlist[1] = guiCreateGridList(9, 8, 188, 101, false, GUIEditor.tab[1])
guiGridListAddColumn(GUIEditor.gridlist[1], "Subject", 0.4)
guiGridListAddColumn(GUIEditor.gridlist[1], "Sender", 0.4)
GUIEditor.tab[2] = guiCreateTab("Send", GUIEditor.tabpanel[1])
GUIEditor.edit[1] = guiCreateEdit(6, 12, 191, 27, "Subject", false, GUIEditor.tab[2])
GUIEditor.edit[2] = guiCreateEdit(6, 49, 191, 27, "Recipient(s) (Split by \", \")", false, GUIEditor.tab[2])
GUIEditor.edit[3] = guiCreateEdit(8, 85, 189, 168, "", false, GUIEditor.tab[2])
GUIEditor.button[1] = guiCreateButton(131, 259, 66, 20, "Send", false, GUIEditor.tab[2])
end
)
But this is what is shown.
As you can see, the offsets are totally incorrect, and this is not what I see when designing the GUI. Is this an MTA Bug when using staticimages? I would really appreciate it if someone with knowledge of this would help me out.
Thanks,
NooP