GUI improvements
This commit is contained in:
parent
10dab4c2b3
commit
f68ef48296
|
@ -44,9 +44,9 @@ export component MainTab inherits Rectangle {
|
||||||
for vram_image[i] in root.vram_images: VRAMArea {
|
for vram_image[i] in root.vram_images: VRAMArea {
|
||||||
x: root.get_border_width()*1px;
|
x: root.get_border_width()*1px;
|
||||||
y: root.get_border_width()*1px;
|
y: root.get_border_width()*1px;
|
||||||
img: vram-image.img;
|
img: vram_image.img;
|
||||||
img_x: vram-image.x;
|
img_x: vram_image.x;
|
||||||
img_y: vram-image.y;
|
img_y: vram_image.y;
|
||||||
TouchArea {
|
TouchArea {
|
||||||
x: (parent.img_x + self.lines_crossed_x())*1px;
|
x: (parent.img_x + self.lines_crossed_x())*1px;
|
||||||
y: (parent.img_y + self.lines_crossed_y())*1px;
|
y: (parent.img_y + self.lines_crossed_y())*1px;
|
||||||
|
@ -65,9 +65,11 @@ export component MainTab inherits Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
if event.kind == PointerEventKind.down {
|
if event.kind == PointerEventKind.down {
|
||||||
cur_sel_x.display_value = parent.img_x;
|
cur_sel_x.display_value = parent.img_x;
|
||||||
cur_sel_y.display_value = parent.img_y;
|
cur_sel_y.display_value = parent.img_y;
|
||||||
cur_sel_img.source = parent.img;
|
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;
|
width: background_image.width/2;
|
||||||
height: 128px;
|
height: 128px;
|
||||||
model: root.vram_files;
|
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 {
|
HorizontalLayout {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
|
@ -113,6 +122,9 @@ export component MainTab inherits Rectangle {
|
||||||
clicked => {
|
clicked => {
|
||||||
root.remove_file_clicked(vram_files_list.current_item);
|
root.remove_file_clicked(vram_files_list.current_item);
|
||||||
vram_files_list.current-item = -1;
|
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