20,741
edits
m (→Nasal dialog: add stubs for dynamic frame-rate/frame-spacing labels (static placeholders for now)) |
|||
| Line 213: | Line 213: | ||
<syntaxhighlight lang="nasal" enclose="div"> | <syntaxhighlight lang="nasal" enclose="div"> | ||
canvas.MessageBox.warning( | canvas.MessageBox.warning( | ||
"Developer Feature", | "Developer Feature", | ||
| Line 343: | Line 344: | ||
]; # vector with tests | ]; # vector with tests | ||
debug.benchmark("button setup", func() { | |||
## | ## | ||
# add buttons for each test to the scrollbar layout | # add buttons for each test to the scrollbar layout | ||
| Line 350: | Line 353: | ||
test.label = addTest(root: scrollContent, layout: list, test: test); | test.label = addTest(root: scrollContent, layout: list, test: test); | ||
} | } | ||
}); # button setup (benchmark) | |||
var subsystemMonitor = func(){ | var subsystemMonitor = func(){ | ||
| Line 363: | Line 367: | ||
} | } | ||
var statusbar = canvas. | var statusbar =canvas.HBoxLayout.new(); | ||
myLayout.addItem(statusbar); | myLayout.addItem(statusbar); | ||
var version=canvas.gui.widgets.Label.new(root, canvas.style, {wordWrap: 0}); | |||
version.setText("FlightGear v" ~ getprop("/sim/version/flightgear")); | |||
statusbar.addItem(version); | |||
## placeholders for dynamic labels | |||
var fps=canvas.gui.widgets.Label.new(root, canvas.style, {wordWrap: 0}); | |||
fps.setText("45 fps"); | |||
statusbar.addItem(fps); | |||
var ms=canvas.gui.widgets.Label.new(root, canvas.style, {wordWrap: 0}); | |||
ms.setText("35 ms"); | |||
statusbar.addItem(ms); | |||
var myTimer = maketimer(0.1, subsystemMonitor); | var myTimer = maketimer(0.1, subsystemMonitor); | ||
| Line 380: | Line 398: | ||
canvas.MessageBox.Ok |canvas.MessageBox.Cancel | canvas.MessageBox.DontShowAgain | canvas.MessageBox.Ok |canvas.MessageBox.Cancel | canvas.MessageBox.DontShowAgain | ||
); | ); | ||
</syntaxhighlight> | </syntaxhighlight> | ||