Conversation
❌ Deploy Preview for splashkit failed.
|
There was a problem hiding this comment.
Peer review
Issues found
- The python example generates warnings due to the script looking for a font that is not necessarily in the user's directory. This may be fixed by not attempting to look for a font and set the respective parameter to
Nonewhere font may be passed.
Files to test before approval
-
key_down-1-example.py
RESOLVED |
ralphweng2023
left a comment
There was a problem hiding this comment.
The reviewer's feedback has been addressed — the Python draw_text calls now correctly pass None for the font parameter, which resolves the font warning issue. The fix commit (4e7e3d5) targets exactly the right lines. Code across all four language variants (C++, C# top-level, C# OOP, Python) is consistent and follows SplashKit conventions. Approved.
kottochii
left a comment
There was a problem hiding this comment.
All files have been tested and perform as required; all examples are shown on the website.
Second Peer ReviewI've reviewed the KeyDown usage example again for the second review and checked it against the usage example style guide. Review SummaryThe example is clear, interactive, and demonstrates the However, there are still a few style guide issues that should be addressed before this can be approved. Required Changes
|
Description
This pull request adds a new usage example demonstrating the SplashKit KeyDown function. The example provides a simple and interactive way to understand how real-time keyboard input can be detected and used within a program.
The program opens a window and visually displays the state of specific keys (Space, Left, Right, Up, Down). When a key is pressed, the display updates immediately using visual indicators such as coloured circles and labels.
This contribution is part of improving the SplashKit documentation by adding beginner-friendly, practical examples that help users understand input handling.
No additional dependencies are required beyond the existing SplashKit SDK and project setup.
Type of change
How Has This Been Tested?
The example was tested across all supported languages to ensure correctness and consistency.
Python
skm python3 key_down-1-example.pyC#
dotnet runC++
Verification performed:
Testing Checklist
Checklist
If involving code
Folders and Files Added/Modified
Please list the folders and files added/modified with this pull request and delete options that are not relevant.
Additional Notes
this example was designed to be simple and beginner-friendly, focusing only on demonstrating the KeyDown function without introducing unnecessary complexity. It aligns with the SplashKit usage example style guide and follows the required file structure and naming conventions.
The implementation ensures consistency across C++, C#, and Python versions, making it easier for users to compare and learn across languages.