Add current_window usage example#775
Open
ZGT23 wants to merge 1 commit into
Open
Conversation
❌ Deploy Preview for splashkit failed.
|
RUNQILIU-123
approved these changes
May 17, 2026
RUNQILIU-123
left a comment
There was a problem hiding this comment.
Approved. This is a useful and easy-to-follow usage example for current_window. The example clearly shows how to retrieve the active window object and use it to access the window caption, size, and current window status. The visual rectangle and text output also make the example more understandable for beginners. The added C++, C#, Python, title, and screenshot files look consistent with the expected structure. Good work.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Splashkit Function:
current_windowOverview of example functionality:
This pull request adds a beginner-friendly usage example for the
current_windowfunction in the Windows category.The example opens a SplashKit window, retrieves the currently active window using
current_window(), and stores it in a window variable. It then uses that window object to display the window caption, width, height, and current window status. A blue rectangle is also drawn in the window to visually demonstrate that drawing and refreshing can be performed using the current window object.This example helps beginners understand how to work with SplashKit window objects instead of only relying on general screen-level drawing functions.
Files Included
Usage Example Checks
How Has This Been Tested?
The example was tested locally to confirm that:
current_window()returns the active SplashKit windowTesting Checklist
Folders and Files Added/Modified
public/usage-examples/windows/current_window-1-example.cpppublic/usage-examples/windows/current_window-1-example-top-level.cspublic/usage-examples/windows/current_window-1-example-oop.cspublic/usage-examples/windows/current_window-1-example.pypublic/usage-examples/windows/current_window-1-example.txtpublic/usage-examples/windows/current_window-1-example.pngAdditional Notes
This example is designed to be simple and beginner-friendly. It focuses on demonstrating how
current_window()can be used to retrieve and work with the active window object in SplashKit.