refactored svelte tauri events
This commit is contained in:
@@ -2,7 +2,7 @@ use crate::{
|
||||
commands::app_state::get_modules,
|
||||
services::{
|
||||
doll_editor::open_doll_editor_window,
|
||||
scene::{set_pet_menu_state, set_scene_interactive},
|
||||
scene::{get_scene_interactive, set_pet_menu_state, set_scene_interactive},
|
||||
},
|
||||
};
|
||||
use commands::app::{quit_app, restart_app, retry_connection};
|
||||
@@ -83,6 +83,7 @@ pub fn run() {
|
||||
save_client_config,
|
||||
open_client_config_manager,
|
||||
open_doll_editor_window,
|
||||
get_scene_interactive,
|
||||
set_scene_interactive,
|
||||
set_pet_menu_state,
|
||||
login,
|
||||
|
||||
@@ -82,6 +82,11 @@ pub fn set_scene_interactive(interactive: bool, should_click: bool) {
|
||||
update_scene_interactive(interactive, should_click);
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn get_scene_interactive() -> Result<bool, String> {
|
||||
Ok(scene_interactive_state().load(Ordering::SeqCst))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn set_pet_menu_state(id: String, open: bool) {
|
||||
let menus_arc = get_open_pet_menus();
|
||||
|
||||
Reference in New Issue
Block a user