Compare commits

...

4 Commits

Author SHA1 Message Date
cody a1fa0aace2 Merge branch 'main' into topic/jb/tim-tool_additional-settings 2025-04-08 19:11:53 +00:00
Jaby a475a0c82d Bump dependency versions 2025-04-05 22:38:14 +02:00
Jaby 32da34cad6 Fix various focus issues 2025-04-05 22:34:30 +02:00
Jaby af633a4fdf Fix scoll issue 2025-04-05 22:22:33 +02:00
4 changed files with 1310 additions and 382 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9,15 +9,15 @@ panic = "abort"
[dependencies]
pathdiff = "0.2.3"
png = "0.17.16"
rfd = "0.15.2"
slint = "1.9.2"
serde = {version = "1.0.140", features = ["derive"]}
rfd = "0.15.3"
slint = "1.10.0"
serde = {version = "1.0.219", features = ["derive"]}
serde_json = "1.0"
tiny-skia = "0.11.4"
tool_helper = {path = "../tool_helper"}
[build-dependencies]
slint-build = "1.9.2"
slint-build = "1.10.0"
[package.metadata.bundle]
name = "TIMTOOL"
@ -28,4 +28,4 @@ category = "Developer Tool"
short_description = "TIM Tool for JabyEngine"
long_description = """
A new interpetation of the TIM Tool from Sony, for use with PSYQ and the JabyEngine
"""
"""

View File

@ -81,6 +81,7 @@ export component MainWindow inherits Window {
public function change_to_main() {
tab_widget.current-index = 1;
main_tab.set_active();
}
public function clear_file_tab-current_selected_file() {

View File

@ -31,8 +31,9 @@ export component MainTab inherits Rectangle {
callback remove_file_clicked(int);
callback move_vram_image(int, int, int);
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
width: group.width + group.x*2;
height: group.height + group.y*2 + 32px;
forward-focus: key_focus;
group := GroupBox {
title: "VRAM Layout";
@ -131,10 +132,20 @@ export component MainTab inherits Rectangle {
}
function update_viewport() {
// If this value is positive, then the image moved so much to the right, that we do not use the full display area anymore
if self.viewport-x > 0 {
self.viewport-x = 0;
}
if abs(self.viewport-x) + self.width > self.viewport-width {
self.viewport-x += (self.width + abs(self.viewport-x)) - self.viewport-width;
}
if self.viewport-y > 0 {
self.viewport-y = 0;
}
// If this value is positive, then the image moved so much down, that we do not use the full display area anymore
if abs(self.viewport-y) + self.height > self.viewport-height {
self.viewport-y += (self.height + abs(self.viewport-y)) - self.viewport-height;
}
@ -349,7 +360,7 @@ export component MainTab inherits Rectangle {
}
}
FocusScope {
key_focus := FocusScope {
key-pressed(event) => {
if(vram_files_list.current-item != -1) {
if(event.text == Key.LeftArrow) {
@ -386,4 +397,8 @@ export component MainTab inherits Rectangle {
cur_sel_y.text = 0;
cur_sel_img.visible = false;
}
public function set_active() {
key_focus.focus();
}
}