Compare commits
4 Commits
5cccf3ace9
...
a1fa0aace2
Author | SHA1 | Date |
---|---|---|
|
a1fa0aace2 | |
|
a475a0c82d | |
|
32da34cad6 | |
|
af633a4fdf |
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||
"""
|
||||
"""
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue