Prepare GUI for additonal settings

This commit is contained in:
Jaby 2025-04-05 23:10:58 +02:00 committed by cody
parent 7a2052575d
commit 5cd29460fb
1 changed files with 24 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import { VRAMArea } from "../vram-components.slint"; import { VRAMArea } from "../vram-components.slint";
import { Button, ComboBox, GroupBox, StandardListView, LineEdit, ScrollView, Slider } from "std-widgets.slint"; import { Button, CheckBox, ComboBox, GroupBox, StandardListView, LineEdit, ScrollView, Slider } from "std-widgets.slint";
struct VRAMImgData { struct VRAMImgData {
full_image: image, full_image: image,
@ -310,12 +310,34 @@ export component MainTab inherits Rectangle {
title: "File settings"; title: "File settings";
enabled: false; enabled: false;
VerticalLayout {
alignment: start;
lz4_check_box := CheckBox {
text: "Compress (lz4)";
enabled: file_settings_box.enabled;
}
GroupBox {
title: "Transparency:";
enabled: file_settings_box.enabled;
VerticalLayout {
alignment: start;
trans_combo_box := ComboBox {
model: ["No transparency", "First color transparent", "PSX semi-transparency", "Both"];
enabled: file_settings_box.enabled;
}
}
}
}
public function set_active(item: int) { public function set_active(item: int) {
self.enabled = true; self.enabled = true;
} }
public function set_inactive() { public function set_inactive() {
self.enabled = false; lz4_check_box.checked = false;
trans_combo_box.current-index = 0;
self.enabled = false;
} }
} }
} }