Support loading and displaying of image palette #16
|
@ -44,9 +44,9 @@ export component MainTab inherits Rectangle {
|
|||
for vram_image[i] in root.vram_images: VRAMArea {
|
||||
x: root.get_border_width()*1px;
|
||||
y: root.get_border_width()*1px;
|
||||
img: vram-image.img;
|
||||
img_x: vram-image.x;
|
||||
img_y: vram-image.y;
|
||||
img: vram_image.img;
|
||||
img_x: vram_image.x;
|
||||
img_y: vram_image.y;
|
||||
TouchArea {
|
||||
x: (parent.img_x + self.lines_crossed_x())*1px;
|
||||
y: (parent.img_y + self.lines_crossed_y())*1px;
|
||||
|
@ -65,9 +65,11 @@ export component MainTab inherits Rectangle {
|
|||
}
|
||||
|
||||
if event.kind == PointerEventKind.down {
|
||||
cur_sel_x.display_value = parent.img_x;
|
||||
cur_sel_y.display_value = parent.img_y;
|
||||
cur_sel_img.source = parent.img;
|
||||
cur_sel_x.display_value = parent.img_x;
|
||||
cur_sel_y.display_value = parent.img_y;
|
||||
cur_sel_img.source = parent.img;
|
||||
cur_sel_img.visible = true;
|
||||
vram_files_list.current-item = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,6 +103,13 @@ export component MainTab inherits Rectangle {
|
|||
width: background_image.width/2;
|
||||
height: 128px;
|
||||
model: root.vram_files;
|
||||
|
||||
current-item-changed(current-item) => {
|
||||
cur_sel_x.display_value = root.vram_images[current-item].x;
|
||||
cur_sel_y.display_value = root.vram_images[current-item].y;
|
||||
cur_sel_img.source = root.vram_images[current-item].img;
|
||||
cur_sel_img.visible = true;
|
||||
}
|
||||
}
|
||||
HorizontalLayout {
|
||||
padding: 4px;
|
||||
|
@ -113,6 +122,9 @@ export component MainTab inherits Rectangle {
|
|||
clicked => {
|
||||
root.remove_file_clicked(vram_files_list.current_item);
|
||||
vram_files_list.current-item = -1;
|
||||
cur_sel_x.display_value = 0;
|
||||
cur_sel_y.display_value = 0;
|
||||
cur_sel_img.visible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue