Support loading and displaying of image palette #16

Merged
jaby merged 17 commits from topic/jb/tim_tool/PaletteSupport into main 2025-03-06 18:11:51 +00:00
1 changed files with 27 additions and 0 deletions
Showing only changes of commit ebf640520e - Show all commits

View File

@ -196,6 +196,33 @@ export component MainTab inherits Rectangle {
}
}
FocusScope {
key-pressed(event) => {
if(vram_files_list.current-item != -1) {
if(event.text == Key.LeftArrow) {
root.move_vram_image(vram_files_list.current-item, -1, 0);
cur_sel_x.text = vram_images[vram_files_list.current-item].x;
}
if(event.text == Key.RightArrow) {
root.move_vram_image(vram_files_list.current-item, 1, 0);
cur_sel_x.text = vram_images[vram_files_list.current-item].x;
}
if(event.text == Key.UpArrow) {
root.move_vram_image(vram_files_list.current-item, 0, -1);
cur_sel_y.text = vram_images[vram_files_list.current-item].y;
}
if(event.text == Key.DownArrow) {
root.move_vram_image(vram_files_list.current-item, 0, 1);
cur_sel_y.text = vram_images[vram_files_list.current-item].y;
}
}
accept
}
}
function get_border_width() -> int {
return 4;
}