-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add hover on pet. working on add pet functionality and ui
- Loading branch information
Showing
29 changed files
with
898 additions
and
87 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use mouse_position::mouse_position::Mouse; | ||
use serde_json::json; | ||
|
||
#[tauri::command] | ||
pub fn get_mouse_position() -> serde_json::Value { | ||
/* | ||
* because we set the window to ignore cursor events, we cannot use | ||
* javascript to get the mouse position, so we use get mouse position manually | ||
*/ | ||
let position = Mouse::get_mouse_position(); | ||
match position { | ||
Mouse::Position { x, y } => { | ||
json!({ | ||
"clientX": x, | ||
"clientY": y | ||
}) | ||
} | ||
Mouse::Error => { | ||
println!("Error getting mouse position"); | ||
json!(null) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"theme": "dark", | ||
"language": "en", | ||
"isPetAboveTaskbar": false | ||
"isPetAboveTaskbar": false, | ||
"isAllowHoverOnPet": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
pub mod conf; | ||
pub mod tray; | ||
pub mod utils; | ||
pub mod utils; | ||
pub mod cmd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { IPetParams } from '../types/IPet'; | ||
import defaultPetConfig from './pets.json'; | ||
|
||
export const defaultPetOptions: IPetParams[] = JSON.parse(JSON.stringify(defaultPetConfig)); |
Oops, something went wrong.