Major UI refactor.
This commit is contained in:
parent
f5e80f3687
commit
9a899211fe
5 changed files with 146 additions and 143 deletions
|
@ -4,6 +4,9 @@
|
|||
// * Main throttle controls collective.
|
||||
|
||||
runoncepath("lib/stabilize_helicopter").
|
||||
runoncepath("lib/ui").
|
||||
|
||||
clearguis().
|
||||
|
||||
global done is false.
|
||||
on AG9 {
|
||||
|
@ -11,22 +14,18 @@ on AG9 {
|
|||
return true.
|
||||
}
|
||||
|
||||
clearguis().
|
||||
// Top-level elements.
|
||||
local iface is gui(250, 300).
|
||||
set iface:X to 200.
|
||||
set iface:Y to 700.
|
||||
local top is iface:AddVLayout().
|
||||
local rows is List(MakeRow(top)).
|
||||
|
||||
// Main UI.
|
||||
local interface is gui(250, 300).
|
||||
set interface:X to 200.
|
||||
set interface:Y to 700.
|
||||
|
||||
// Main menu elements in here.
|
||||
local y is interface:AddVLayout().
|
||||
local x is y:AddHLayout().
|
||||
|
||||
set x:AddButton("HOVER"):onClick to {
|
||||
set rows[0]:AddButton("HOVER"):onClick to {
|
||||
Hover().
|
||||
}.
|
||||
|
||||
set x:AddButton("LAND"):onClick to {
|
||||
set rows[0]:AddButton("LAND"):onClick to {
|
||||
// todo: consider a more elaborate landing script that adjusts
|
||||
// velocity as a function of altitude.
|
||||
when SHIP:STATUS = "LANDED" then {
|
||||
|
@ -38,6 +37,6 @@ set x:AddButton("LAND"):onClick to {
|
|||
Hover(-5).
|
||||
}.
|
||||
|
||||
interface:show().
|
||||
iface:show().
|
||||
|
||||
wait until false.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue