1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-24 16:32:12 +03:00
mobile-nixos/examples/hello/app/windows/main.rb

25 lines
913 B
Ruby
Raw Normal View History

module GUI
class MainWindow < LVGUI::BaseWindow
include LVGUI::ButtonPalette
def initialize()
super()
LVGL::LVLabel.new(@container).tap do |label|
label.set_long_mode(LVGL::LABEL_LONG::BREAK)
2020-05-31 04:12:49 +03:00
label.set_text(%Q{Your device booted to\nstage-2 of a NixOS system successfully!\n\nSelect from the following options})
label.set_align(LVGL::LABEL_ALIGN::CENTER)
label.set_width(@container.get_width_fit)
end
add_buttons([
["Display validation", ->() { DisplayValidationWindow.instance.present }],
["Input devices information", ->() { InputsWindow.instance.present }],
["Disks information", ->() { DisksWindow.instance.present }],
["Logs", ->() { LogsWindow.instance.present }],
["About", ->() { AboutWindow.instance.present }],
["Quit", ->() { QuitWindow.instance.present }],
])
end
end
end