2020-05-31 02:28:42 +03:00
|
|
|
module GUI
|
2020-07-24 04:58:44 +03:00
|
|
|
class MainWindow < LVGUI::BaseWindow
|
|
|
|
include LVGUI::ButtonPalette
|
2020-05-31 02:28:42 +03:00
|
|
|
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})
|
2020-05-31 02:28:42 +03:00
|
|
|
label.set_align(LVGL::LABEL_ALIGN::CENTER)
|
|
|
|
label.set_width(@container.get_width_fit)
|
|
|
|
end
|
|
|
|
|
|
|
|
add_buttons([
|
|
|
|
["Display validation", ->() { DisplayValidationWindow.instance.present }],
|
2020-05-31 23:00:08 +03:00
|
|
|
["Input devices information", ->() { InputsWindow.instance.present }],
|
2020-05-31 06:07:57 +03:00
|
|
|
["Disks information", ->() { DisksWindow.instance.present }],
|
2020-05-31 04:32:30 +03:00
|
|
|
["Logs", ->() { LogsWindow.instance.present }],
|
2020-05-31 02:28:42 +03:00
|
|
|
["About", ->() { AboutWindow.instance.present }],
|
|
|
|
["Quit", ->() { QuitWindow.instance.present }],
|
|
|
|
])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|