Finally, code that works to orbit + creates a circ node.

This commit is contained in:
2021-07-19 04:46:05 -04:00
parent 6f9537547f
commit 3101aef1cc
5 changed files with 33 additions and 21 deletions

View File

@ -2,26 +2,30 @@ function launchButtonPressed {
run "launch"(
targetApo:TEXT:ToNumber(),
gravTurnStart:TEXT:ToNumber(),
initialPitch:TEXT:ToNumber()
gravPitch:TEXT:ToNumber(),
initialPitch:TEXT:ToNumber(),
minimumPitch:TEXT:ToNumber()
).
}
function nodeButtonPressed {
run "executenode".
run "execnode".
}
// Button panel
CreateGUI().
// Main UI.
local interface is gui(200).
set interface:X to 200.
set interface:Y to 900.
set interface:Y to 800.
// Launch button
local hBox is interface:AddHBox().
hBox:AddLabel("Initial Pitch").
local initialPitch is hBox:AddTextField("85").
local hBox is interface:AddHBox().
hBox:AddLabel("Minimum Pitch").
local minimumPitch is hBox:AddTextField("40").
local hBox is interface:AddHBox().
hBox:AddLabel("Gravity Turn @").
local gravTurnStart is hBox:AddTextField("8000").
@ -38,7 +42,7 @@ local launchButton is interface:AddButton("Launch").
set launchButton:onClick to launchButtonPressed@.
local nodeButton is interface:AddButton("Execute Node").
set launchButton:onClick to nodeButtonPressed@.
set nodeButton:onClick to nodeButtonPressed@.
interface:show().