Support File Settings #26
|
@ -96,6 +96,14 @@ export component MainTab inherits Rectangle {
|
|||
encoding_text.encoding_str = vram_data.info.encoding_str;
|
||||
cur_sel_img.visible = true;
|
||||
|
||||
if !vram-data.info.is_palette {
|
||||
file_settings_box.set_active(i);
|
||||
}
|
||||
|
||||
else {
|
||||
file_settings_box.set_inactive();
|
||||
}
|
||||
|
||||
vram_files_list.current-item = i;
|
||||
}
|
||||
}
|
||||
|
@ -171,6 +179,14 @@ export component MainTab inherits Rectangle {
|
|||
cur_sel_img.source = root.vram_data[current-item].images.full_image;
|
||||
encoding_text.encoding_str = root.vram_data[current-item].info.encoding_str;
|
||||
cur_sel_img.visible = true;
|
||||
|
||||
if !root.vram_data[current-item].info.is_palette {
|
||||
file_settings_box.set_active(current-item);
|
||||
}
|
||||
|
||||
else {
|
||||
file_settings_box.set_inactive();
|
||||
}
|
||||
}
|
||||
|
||||
item-pointer-event(item, event, position) => {
|
||||
|
@ -279,6 +295,18 @@ export component MainTab inherits Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
file_settings_box := GroupBox {
|
||||
title: "File settings";
|
||||
enabled: false;
|
||||
|
||||
public function set_active(item: int) {
|
||||
self.enabled = true;
|
||||
}
|
||||
|
||||
public function set_inactive() {
|
||||
self.enabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue