49 lines
1.2 KiB
Plaintext
49 lines
1.2 KiB
Plaintext
// Copyright © SixtyFPS GmbH <info@slint.dev>
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
import { Button, HorizontalBox, VerticalBox } from "std-widgets.slint";
|
|
import { Page } from "page.slint";
|
|
import { AboutData, NewVersionButton } from "about_page.slint";
|
|
|
|
export global State {
|
|
in-out property <bool> game_running;
|
|
}
|
|
|
|
export component LocalGame inherits Page {
|
|
callback open_rom_button_clicked;
|
|
callback saves_folder_button_clicked;
|
|
callback newversion_button_clicked;
|
|
title: @tr("Local Game");
|
|
|
|
VerticalBox {
|
|
alignment: start;
|
|
HorizontalBox {
|
|
alignment: center;
|
|
Button {
|
|
text: @tr("Open ROM");
|
|
enabled: !State.game_running;
|
|
clicked => {
|
|
open_rom_button_clicked();
|
|
}
|
|
}
|
|
}
|
|
|
|
HorizontalBox {
|
|
alignment: center;
|
|
Button {
|
|
text: @tr("Open Saves Folder");
|
|
clicked => {
|
|
saves_folder_button_clicked();
|
|
}
|
|
}
|
|
}
|
|
|
|
if AboutData.has_update:NewVersionButton {
|
|
newversion_button_clicked => {
|
|
newversion_button_clicked();
|
|
}
|
|
}
|
|
Rectangle { }
|
|
}
|
|
}
|