Compare commits
6 Commits
a8ca3bf859
...
b0b8c43700
Author | SHA1 | Date |
---|---|---|
|
b0b8c43700 | |
|
ed4671698a | |
|
b487ca2591 | |
|
a33aa6bb4e | |
|
85b5aa0070 | |
|
b3a666b5ea |
|
@ -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",
|
||||||
|
|
|
@ -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]
|
||||||
|
|
|
@ -261,7 +261,7 @@ component ConvertImageWidget inherits Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LineEdit {
|
LineEdit {
|
||||||
text: root.image_name;
|
text <=> root.image_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HorizontalLayout {
|
HorizontalLayout {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue