Add window_has_focus usage example#754
Conversation
❌ Deploy Preview for splashkit failed.
|
jankiluitel
left a comment
There was a problem hiding this comment.
It looks good—this is a concise, well-organized example of how to use window_has_focus in several languages.
The accompanying GIF accurately illustrates the behaviour, and the implementation is consistent and simple to follow. Everything comes together neatly and fits in nicely with the usage examples that are already in place.
A minor observation: the "focus" and "not focus" messages have slightly different text placements, but this is not a barrier.
Overall, excellent addition—approving
222448082Ashen
left a comment
There was a problem hiding this comment.
Description
This PR adds a new usage example for the WindowHasFocus function in the Windows category. It provides consistent demonstrations across C++, C# (Top-level and OOP), and Python, showing how to detect if the application window currently has input focus.
Type of change
- Documentation (update or new)
How Has This Been Tested?
- Verified file structure in
public/usage-examples/windows/. - Manually reviewed code logic for all language implementations.
- npm run build (Blocked by local environment issues, but code logic is verified).
Checklist
If involving code
- My code follows the style guidelines of this project
- I have performed a self-review of my own code
- I have commented my code in hard-to-understand areas
- I have made corresponding changes to the documentation
- My changes generate no new warnings
If modified config files
N/A
Folders and Files Added/Modified
- Added:
-
public/usage-examples/windows/window_has_focus-1-example.cpp -
public/usage-examples/windows/window_has_focus-1-example-oop.cs -
public/usage-examples/windows/window_has_focus-1-example-top-level.cs -
public/usage-examples/windows/window_has_focus-1-example.py -
public/usage-examples/windows/window_has_focus-1-example.txt -
public/usage-examples/windows/window_has_focus-1-example.gif
-
|
@222448082Ashen Could you please approve this PR ? |
Description
Splashkit Function:
window_has_focusOverview of example functionality: This example demonstrates how to use the
window_has_focusfunction. It opens a window and displays whether that window currently has focus. This helps beginners understand that the function checks if the window is the active focused window.Example Output:
Files Included
Usage Example Checks