2021-07-18 23:32:45 +00:00
|
|
|
function launchButtonPressed {
|
2021-07-19 07:43:07 +00:00
|
|
|
run "launch"(
|
|
|
|
targetApo:TEXT:ToNumber(),
|
|
|
|
gravTurnStart:TEXT:ToNumber(),
|
|
|
|
initialPitch:TEXT:ToNumber()
|
2021-07-19 04:54:32 +00:00
|
|
|
).
|
2021-07-18 23:32:45 +00:00
|
|
|
}
|
|
|
|
|
2021-07-19 07:43:07 +00:00
|
|
|
function nodeButtonPressed {
|
|
|
|
run "executenode".
|
|
|
|
}
|
|
|
|
|
2021-07-18 23:32:45 +00:00
|
|
|
// Button panel
|
2021-07-19 07:43:07 +00:00
|
|
|
CreateGUI().
|
|
|
|
|
2021-07-18 23:32:45 +00:00
|
|
|
local interface is gui(200).
|
2021-07-19 07:43:07 +00:00
|
|
|
set interface:X to 200.
|
2021-07-19 04:54:32 +00:00
|
|
|
set interface:Y to 900.
|
2021-07-18 23:32:45 +00:00
|
|
|
|
|
|
|
// Launch button
|
2021-07-19 04:54:32 +00:00
|
|
|
local hBox is interface:AddHBox().
|
|
|
|
hBox:AddLabel("Initial Pitch").
|
|
|
|
local initialPitch is hBox:AddTextField("85").
|
|
|
|
|
|
|
|
local hBox is interface:AddHBox().
|
|
|
|
hBox:AddLabel("Gravity Turn @").
|
|
|
|
local gravTurnStart is hBox:AddTextField("8000").
|
|
|
|
|
|
|
|
local hBox is interface:AddHBox().
|
|
|
|
hBox:AddLabel("Gravity Pitch").
|
|
|
|
local gravPitch is hBox:AddTextField("75").
|
|
|
|
|
|
|
|
local hBox is interface:AddHBox().
|
|
|
|
hBox:AddLabel("Target Apoapsis").
|
|
|
|
local targetApo is hBox:AddTextField("80000").
|
|
|
|
|
|
|
|
local launchButton is interface:AddButton("Launch").
|
2021-07-18 23:32:45 +00:00
|
|
|
set launchButton:onClick to launchButtonPressed@.
|
2021-07-19 04:54:32 +00:00
|
|
|
|
2021-07-19 07:43:07 +00:00
|
|
|
local nodeButton is interface:AddButton("Execute Node").
|
|
|
|
set launchButton:onClick to nodeButtonPressed@.
|
|
|
|
|
2021-07-18 23:32:45 +00:00
|
|
|
interface:show().
|
|
|
|
|
|
|
|
wait until false.
|