Display encoding on main screen
This commit is contained in:
@@ -5,6 +5,7 @@ struct VRAMImage {
|
||||
img: image,
|
||||
x: int,
|
||||
y: int,
|
||||
encoding_str: string,
|
||||
palette_count: int,
|
||||
is_palette: bool,
|
||||
}
|
||||
@@ -78,10 +79,12 @@ export component MainTab inherits Rectangle {
|
||||
}
|
||||
|
||||
if event.kind == PointerEventKind.down {
|
||||
cur_sel_x.text = parent.img_x;
|
||||
cur_sel_y.text = parent.img_y;
|
||||
cur_sel_img.source = parent.img;
|
||||
cur_sel_img.visible = true;
|
||||
cur_sel_x.text = parent.img_x;
|
||||
cur_sel_y.text = parent.img_y;
|
||||
cur_sel_img.source = parent.img;
|
||||
encoding_text.encoding_str = vram-image.encoding_str;
|
||||
cur_sel_img.visible = true;
|
||||
|
||||
vram_files_list.current-item = i;
|
||||
}
|
||||
}
|
||||
@@ -150,10 +153,11 @@ export component MainTab inherits Rectangle {
|
||||
model: root.vram_files;
|
||||
|
||||
current-item-changed(current-item) => {
|
||||
cur_sel_x.text = root.vram_images[current-item].x;
|
||||
cur_sel_y.text = root.vram_images[current-item].y;
|
||||
cur_sel_img.source = root.vram_images[current-item].img;
|
||||
cur_sel_img.visible = true;
|
||||
cur_sel_x.text = root.vram_images[current-item].x;
|
||||
cur_sel_y.text = root.vram_images[current-item].y;
|
||||
cur_sel_img.source = root.vram_images[current-item].img;
|
||||
encoding_text.encoding_str = root.vram_images[current-item].encoding_str;
|
||||
cur_sel_img.visible = true;
|
||||
}
|
||||
}
|
||||
HorizontalLayout {
|
||||
@@ -232,9 +236,9 @@ export component MainTab inherits Rectangle {
|
||||
}
|
||||
}
|
||||
}
|
||||
ComboBox {
|
||||
model: ["4-bit", "16-bit", "24-bit"];
|
||||
current-value: "4-bit";
|
||||
encoding_text := Text {
|
||||
in-out property <string> encoding_str;
|
||||
text: "Encoding: " + encoding_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user