kevincouto6 Posted November 15, 2018 Share Posted November 15, 2018 (edited) Hello, Again I need help in a script, well I have to specify the mission information, I wanted to do this with the INFO button, But I do not know how to make a text for each mission, and I also wanted to enable a COPY button for what I was writing inside the MEMO could you give me tips, or show me functions? # the INFO button is in the other GUI that I have developed # Every script is just Client-Side ! memo = guiCreateMemo ( 9,32, 175, 196, "memo Gui Testing 1",false, infoMission) memo2 = guiCreateMemo ( 9,32, 175, 196, "memo Gui Testing 2",false, infoMission) memo3 = guiCreateMemo ( 9,32, 175, 196, "memo Gui Testing 3",false, infoMission) memo4 = guiCreateMemo ( 9,32, 175, 196, "memo Gui Testing 4",false, infoMission) GUIEditor = { button = {}, window = {}, memo = {} } addEventHandler("onClientResourceStart", resourceRoot, function() infoMission = guiCreateWindow(599, 122, 196, 328, "Mission Description", false) guiSetVisible (infoMission, false) guiWindowSetSizable(infoMission, false) memo = guiCreateMemo(9, 32, 175, 196, "ssssssssss", false, infoMission) exitBuInfo = guiCreateButton(10, 280, 174, 40, "EXIT", false, infoMission) copyButton = guiCreateButton(9, 233, 175, 37, "COPY", false, infoMission) end ) addEventHandler ("onClientGUIClick", getRootElement(), function (button, state, absoluteX, absoluteY) local me = not guiGetVisible (infoMission) if (source == exitBuInfo) then guiSetVisible (infoMission, me) end end) I wanted the message to be detected according to the selected item in the list, If you can help me, I'll be very happy. addEventHandler ("onClientGUIClick", getRootElement(), function (button, state, absoluteX, absoluteY) outputDebugString("onClientGUIClick called.") local me = not guiGetVisible (WinMission) if (source == info) then outputDebugString("guiGridListGetSelectedItem(ListMissions): "..guiGridListGetSelectedItem(ListMissions)) if (guiGridListGetSelectedItem(ListMissions) == 0) then outputDebugString("1 was selected") guiSetVisible (infoMission, true) elseif (guiGridListGetSelectedItem(ListMissions) == 1) then outputDebugString("2 was selected") elseif (guiGridListGetSelectedItem(ListMissions) == 2) then outputDebugString("3 was selected") elseif (guiGridListGetSelectedItem(ListMissions) == 3) then outputDebugString("4 was selected") end end end ) Thx, since now By:Kevin6 Edited November 15, 2018 by kevincouto6 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now