Robert Beekman edited this page 2017-09-12 14:19:44 +02:00
To be done, here's a quick LUA script with GUI stuff though, it'll add an 'options' button to the profile editor and show a window when that button is clicked.
------------------------------------------------------------------------------------------------------------------ Artemis LUA file ------------------------------------------------------------------------------------------------------------------functionopenWindow()localwindow=Gui.CreateWindow("Test",1270,720)-- TextboxlocaltextBox=window.CreateTextBox("",5,5,200,25)localtextBoxLabel=window.CreateLabel("Type something in the textbox",210,5)functiontextChangedHandler(textBox)textBoxLabel.Text="You typed: "..textBox.TextendtextBox.TextChanged.add(textChangedHandler)-- Buttonlocalbutton=window.CreateButton("Press me :D",5,45,200,25)localbuttonLabel=window.CreateLabel("Press the button",210,43)localpressCount=1functionbuttonClickHandler(button)buttonLabel.Text="You pressed "..pressCount.." time(s)"pressCount=pressCount+1endbutton.Click.add(buttonClickHandler)-- ComboBoxlocalcomboBox=window.CreateComboBox("Value 2",{"Value 1","Value 2","Value 3"},5,85,200,25)localcomboBoxLabel=window.CreateLabel("Select a value",210,83)functionselectionChangedHandler(comboBox)comboBoxLabel.Text="You selected: "..comboBox.ValueendcomboBox.SelectionChanged.add(selectionChangedHandler)-- CheckBoxlocalcheckBox=window.CreateCheckBox("Checkbox label",true,5,125)localcheckBoxLabel=window.CreateLabel("Uncheck the checkbox",210,120)functioncheckBoxClickHandler(checkBox)ifcheckBox.IsCheckedthencheckBoxLabel.Text="Checkbox is checked"elsecheckBoxLabel.Text="Checkbox is not checked"endendcheckBox.Click.add(checkBoxClickHandler)endGui.AddEditorButton("Options",openWindow)