Skip to content

Commit

Permalink
Allow user to open recordings folder in-tool (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeSaward1 authored Nov 6, 2024
1 parent ec5b750 commit 68e23db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rtil/src/threads/ue/rebo/rebo_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ pub fn create_config(rebo_stream_tx: Sender<ReboToStream>) -> ReboConfig {
.add_function(disable_collision)
.add_function(exit_water)
.add_function(open_maps_folder)
.add_function(open_recordings_folder)
.add_function(set_lighting_casts_shadows)
.add_function(set_sky_light_enabled)
.add_function(set_time_dilation)
Expand Down Expand Up @@ -1306,6 +1307,12 @@ fn open_maps_folder() {
log!("Error opening maps folder in file manager: {}", err);
}
}
#[rebo::function("Tas::open_recordings_folder")]
fn open_recordings_folder() {
if let Err(err) = opener::open(&recording_path()) {
log!("Error opening recordings folder in file manager: {}", err);
}
}
#[rebo::function("Tas::set_lighting_casts_shadows")]
fn set_lighting_casts_shadows(value: bool) {
UWorld::set_lighting_casts_shadows(value);
Expand Down
4 changes: 4 additions & 0 deletions tool/misc.re
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ fn create_misc_menu() -> Ui {
enter_ui(create_tas_delete_recording_menu());
}
}),
UiElement::Button(UiButton {
label: Text { text: "Open Recordings Folder" },
onclick: fn(label: Text) { Tas::open_recordings_folder(); },
}),
UiElement::Button(UiButton {
label: TAS_LABEL,
onclick: fn(label: Text) {
Expand Down

0 comments on commit 68e23db

Please sign in to comment.