Resize Event for Scene #1

Closed
opened 2024-03-09 18:07:24 +00:00 by john · 2 comments
Owner

Notes say: 1 feat: add resize event to Scene to react; call it after constructor too, maybe

Notes say: 1 feat: add resize event to Scene to react; call it after constructor too, maybe
john added the
Tiny Feature
label 2024-03-09 18:07:24 +00:00
john added this to the Alpha Release Targets milestone 2024-03-13 14:52:59 +00:00
john added the
priority:tier2-foundation
system:input
labels 2025-10-26 00:49:50 +00:00
Author
Owner

Status: Fully implemented

  • on_resize(width, height) method on Python Scene classes (src/PySceneObject.cpp:201-213)
  • McRFPy_API::triggerResize() function handles the event propagation (PySceneObject.cpp:279-287)
  • GameEngine handles sf::Event::Resized (src/GameEngine.cpp:360-365)
Status: Fully implemented - on_resize(width, height) method on Python Scene classes (src/PySceneObject.cpp:201-213) - McRFPy_API::triggerResize() function handles the event propagation (PySceneObject.cpp:279-287) - GameEngine handles sf::Event::Resized (src/GameEngine.cpp:360-365)
john closed this issue 2025-11-26 10:11:31 +00:00
Author
Owner

Already Implemented

Resize events for Python Scene classes are fully implemented.

Implementation

  • PySceneClass::call_on_resize() in PySceneObject.cpp:201-213
  • McRFPy_API::triggerResize() handles event propagation
  • GameEngine::handleWindowEvent() processes sf::Event::Resized

Usage

class MyScene(mcrfpy.SceneClass):
    def on_resize(self, width, height):
        # React to window resize
        self.layout_ui(width, height)

The event is automatically called when the window is resized.

## Already Implemented Resize events for Python Scene classes are fully implemented. ### Implementation - `PySceneClass::call_on_resize()` in `PySceneObject.cpp:201-213` - `McRFPy_API::triggerResize()` handles event propagation - `GameEngine::handleWindowEvent()` processes `sf::Event::Resized` ### Usage ```python class MyScene(mcrfpy.SceneClass): def on_resize(self, width, height): # React to window resize self.layout_ui(width, height) ``` The event is automatically called when the window is resized.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: john/McRogueFace#1
No description provided.