Skip to content

Commit 9fbd3ad

Browse files
authored
Change io.DisplaySize on sf::Event::Resized (#222)
1 parent cdb42c4 commit 9fbd3ad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

imgui-SFML.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,9 @@ void ProcessEvent(const sf::Event& event) {
555555

556556
if (s_currWindowCtx->windowHasFocus) {
557557
switch (event.type) {
558+
case sf::Event::Resized:
559+
io.DisplaySize = ImVec2(event.size.width, event.size.height);
560+
break;
558561
case sf::Event::MouseMoved:
559562
io.AddMousePosEvent(event.mouseMove.x, event.mouseMove.y);
560563
s_currWindowCtx->mouseMoved = true;

0 commit comments

Comments
 (0)