Add new version button to main screen (#450)
This commit is contained in:
parent
baa6a6c635
commit
5d8ac37a0f
@ -9,6 +9,20 @@ export global AboutData {
|
||||
in property <bool> has_update;
|
||||
}
|
||||
|
||||
export component NewVersionButton {
|
||||
callback newversion_button_clicked;
|
||||
HorizontalBox {
|
||||
alignment: center;
|
||||
Button {
|
||||
text: @tr("New version available! Click here to download");
|
||||
primary: true;
|
||||
clicked => {
|
||||
newversion_button_clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export component About inherits Page {
|
||||
callback wiki_button_clicked;
|
||||
callback discord_button_clicked;
|
||||
@ -44,14 +58,9 @@ export component About inherits Page {
|
||||
}
|
||||
}
|
||||
|
||||
if AboutData.has_update:HorizontalBox {
|
||||
alignment: center;
|
||||
Button {
|
||||
text: @tr("New version available! Click to download");
|
||||
primary: true;
|
||||
clicked => {
|
||||
newversion_button_clicked();
|
||||
}
|
||||
if AboutData.has_update:NewVersionButton {
|
||||
newversion_button_clicked => {
|
||||
newversion_button_clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,6 +64,9 @@ export component AppWindow inherits Window {
|
||||
saves_folder_button_clicked => {
|
||||
saves_folder_button_clicked();
|
||||
}
|
||||
newversion_button_clicked => {
|
||||
newversion_button_clicked();
|
||||
}
|
||||
}
|
||||
if(side-bar.current-item == 1): ControllerConfig {
|
||||
input_profile_button_clicked => {
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
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;
|
||||
@ -11,6 +12,7 @@ export global State {
|
||||
export component LocalGame inherits Page {
|
||||
callback open_rom_button_clicked;
|
||||
callback saves_folder_button_clicked;
|
||||
callback newversion_button_clicked;
|
||||
title: @tr("Local Game");
|
||||
|
||||
VerticalBox {
|
||||
@ -35,5 +37,11 @@ export component LocalGame inherits Page {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if AboutData.has_update:NewVersionButton {
|
||||
newversion_button_clicked => {
|
||||
newversion_button_clicked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user