Numbers = {
{"show number","5" },
}
guiGridListClear( GUIEditor.gridlist[1] )
for i,v in ipairs(Numbers) do
local row = guiGridListAddRow(GUIEditor.gridlist[1])
guiGridListSetItemText(GUIEditor.gridlist[1],row,1,v[1],false,false)
guiGridListSetItemData(GUIEditor.gridlist[1],row,1,v[2])
guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,255,255,0)
end
guiSetFont( GUIEditor.gridlist[1], "default-bold-small" )
addCommandHandler("open",
function ( )
local status = not guiGetVisible ( GUIEditor.window[1] )
guiSetVisible ( GUIEditor.window[1], status )
showCursor ( status )
end
)
addEventHandler("onClientGUIClick",root,
function ( )
if source == GUIEditor.gridlist[1] then
local Row , Col = guiGridListGetSelectedItem ( source )
if ( Row == -1 ) then return guiSetText ( GUIEditor.edit[1] , "" ) end
local newText = guiGridListGetItemData ( GUIEditor.gridlist[1] , Row , Col )
guiSetText ( GUIEditor.edit[1], newText )
end
end
)