Add some print lines and a button to toggle terminal.
This commit is contained in:
14
ui/rocket.ks
14
ui/rocket.ks
@ -12,6 +12,17 @@ function nodeButtonPressed {
|
||||
run "execnode".
|
||||
}
|
||||
|
||||
local termOn is false.
|
||||
function terminalButtonPressed {
|
||||
if termOn {
|
||||
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Close Terminal").
|
||||
set termOn to false.
|
||||
} else {
|
||||
CORE:PART:GETMODULE("kOSProcessor"):DOEVENT("Open Terminal").
|
||||
set termOn to true.
|
||||
}
|
||||
}
|
||||
|
||||
// Main UI.
|
||||
local interface is gui(200).
|
||||
set interface:X to 200.
|
||||
@ -44,6 +55,9 @@ set launchButton:onClick to launchButtonPressed@.
|
||||
local nodeButton is interface:AddButton("Execute Node").
|
||||
set nodeButton:onClick to nodeButtonPressed@.
|
||||
|
||||
local termButton is interface:AddButton("Terminal").
|
||||
set termButton:onClick to terminalButtonPressed@.
|
||||
|
||||
interface:show().
|
||||
|
||||
wait until false.
|
||||
|
Reference in New Issue
Block a user