mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Updated GUI (markdown)
parent
4a414385aa
commit
b1a7921a71
10
GUI.md
10
GUI.md
@ -1,12 +1,10 @@
|
|||||||
To be done, here's a quick LUA script with GUI stuff though:
|
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.
|
||||||
|
|
||||||
Note that the window opens whenever the script is loaded, this is a bit annoying since scripts are reloaded whenever you un-focus the profile editor. Will add a way to add buttons to the profile editor so users can open windows when they want.
|
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
||||||
-------------------------------- Artemis LUA file --------------------------------
|
-------------------------------- Artemis LUA file --------------------------------
|
||||||
----------------------------------------------------------------------------------
|
----------------------------------------------------------------------------------
|
||||||
|
function openWindow()
|
||||||
local window = Gui.CreateWindow("Test", 1270, 720);
|
local window = Gui.CreateWindow("Test", 1270, 720);
|
||||||
|
|
||||||
-- Textbox
|
-- Textbox
|
||||||
@ -46,5 +44,9 @@ function checkBoxClickHandler(checkBox)
|
|||||||
checkBoxLabel.Text = "Checkbox is not checked";
|
checkBoxLabel.Text = "Checkbox is not checked";
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
checkBox.Click.add(checkBoxClickHandler);
|
checkBox.Click.add(checkBoxClickHandler);
|
||||||
|
end
|
||||||
|
|
||||||
|
Gui.AddEditorButton("Options", openWindow);
|
||||||
```
|
```
|
||||||
Loading…
x
Reference in New Issue
Block a user