Compare commits

..

6 Commits

Author SHA1 Message Date
Jaby b0b8c43700 Bump version to 1.0.0 2025-04-02 22:11:37 +02:00
Jaby ed4671698a Add label to indicate focusing ability 2025-04-02 22:10:36 +02:00
Jaby b487ca2591 Focus on left click 2025-04-02 22:08:06 +02:00
Jaby a33aa6bb4e Add width/height for images by catty request 2025-04-02 21:46:46 +02:00
Jaby 85b5aa0070 Support naming of VRAM 2025-04-02 21:34:32 +02:00
Jaby b3a666b5ea Increase zoom level to 800% 2025-04-02 21:23:56 +02:00
4 changed files with 37 additions and 6 deletions

View File

@ -4115,7 +4115,7 @@ dependencies = [
[[package]] [[package]]
name = "tim_tool" name = "tim_tool"
version = "0.1.0" version = "1.0.0"
dependencies = [ dependencies = [
"pathdiff", "pathdiff",
"png", "png",

View File

@ -1,6 +1,6 @@
[package] [package]
name = "tim_tool" name = "tim_tool"
version = "0.1.0" version = "1.0.0"
edition = "2021" edition = "2021"
[profile.release] [profile.release]

View File

@ -261,7 +261,7 @@ component ConvertImageWidget inherits Rectangle {
} }
} }
LineEdit { LineEdit {
text: root.image_name; text <=> root.image_name;
} }
} }
HorizontalLayout { HorizontalLayout {

View File

@ -90,6 +90,8 @@ export component MainTab inherits Rectangle {
if event.kind == PointerEventKind.down { if event.kind == PointerEventKind.down {
cur_sel_x.text = parent.img_x; cur_sel_x.text = parent.img_x;
cur_sel_y.text = parent.img_y; cur_sel_y.text = parent.img_y;
cur_sel_width.text = "Width: " + vram_data.images.image.width;
cur_sel_height.text = "Height: " + vram_data.images.image.height;
cur_sel_img.source = vram_data.images.full_image; cur_sel_img.source = vram_data.images.full_image;
encoding_text.encoding_str = vram_data.info.encoding_str; encoding_text.encoding_str = vram_data.info.encoding_str;
cur_sel_img.visible = true; cur_sel_img.visible = true;
@ -139,7 +141,7 @@ export component MainTab inherits Rectangle {
} }
slider := Slider { slider := Slider {
minimum: 100.0; minimum: 100.0;
maximum: 400.0; maximum: 800.0;
step: 1.0; step: 1.0;
value: 100.0; value: 100.0;
@ -164,10 +166,27 @@ export component MainTab inherits Rectangle {
current-item-changed(current-item) => { current-item-changed(current-item) => {
cur_sel_x.text = root.vram_data[current-item].info.x; cur_sel_x.text = root.vram_data[current-item].info.x;
cur_sel_y.text = root.vram_data[current-item].info.y; cur_sel_y.text = root.vram_data[current-item].info.y;
cur_sel_width.text = "Width: " + root.vram_data[current-item].images.image.width;
cur_sel_height.text = "Height: " + root.vram_data[current-item].images.image.height;
cur_sel_img.source = root.vram_data[current-item].images.full_image; cur_sel_img.source = root.vram_data[current-item].images.full_image;
encoding_text.encoding_str = root.vram_data[current-item].info.encoding_str; encoding_text.encoding_str = root.vram_data[current-item].info.encoding_str;
cur_sel_img.visible = true; cur_sel_img.visible = true;
} }
item-pointer-event(item, event, position) => {
if event.button == PointerEventButton.right && event.kind == PointerEventKind.down {
main_view.viewport-x = -(root.vram_data[item].info.x + (root.vram_data[item].info.x/64))*root.scale*1px + (main_view.width/4);
main_view.viewport-y = -(root.vram_data[item].info.y + (root.vram_data[item].info.y/256))*root.scale*1px + (main_view.height/4);
main_view.update_viewport();
}
}
}
HorizontalLayout {
padding: 4px;
alignment: center;
Text {
text: "Right click to focus element on screen";
}
} }
HorizontalLayout { HorizontalLayout {
padding: 4px; padding: 4px;
@ -211,7 +230,7 @@ export component MainTab inherits Rectangle {
cur_sel_x := LineEdit { cur_sel_x := LineEdit {
input-type: number; input-type: number;
text: 0; text: 0;
width: 64pt; width: 48pt;
accepted(text) => { accepted(text) => {
if(vram_files_list.current-item != -1) { if(vram_files_list.current-item != -1) {
@ -220,6 +239,12 @@ export component MainTab inherits Rectangle {
} }
} }
} }
VerticalLayout {
alignment: center;
cur_sel_width := Text {
text: "Width: 0";
}
}
} }
HorizontalLayout { HorizontalLayout {
alignment: start; alignment: start;
@ -232,7 +257,7 @@ export component MainTab inherits Rectangle {
cur_sel_y := LineEdit { cur_sel_y := LineEdit {
input-type: number; input-type: number;
text: 0; text: 0;
width: 64pt; width: 48pt;
accepted(text) => { accepted(text) => {
if(vram_files_list.current-item != -1) { if(vram_files_list.current-item != -1) {
@ -241,6 +266,12 @@ export component MainTab inherits Rectangle {
} }
} }
} }
VerticalLayout {
alignment: center;
cur_sel_height := Text {
text: "Height: 0";
}
}
} }
encoding_text := Text { encoding_text := Text {
in-out property <string> encoding_str; in-out property <string> encoding_str;