Selaa lähdekoodia

[portable_window] fix window flicker when moving it without dragging... (#469)

...the bar. This example never expected it and was caching Window
Position, which means that position was outdated at the moment you moved
the window via other means than dragging the bar.

Fixes: https://github.com/raysan5/raygui/issues/468
sleeptightAnsiC 6 kuukautta sitten
vanhempi
commit
b2ef0f864e
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      examples/portable_window/portable_window.c

+ 1 - 0
examples/portable_window/portable_window.c

@@ -57,6 +57,7 @@ int main()
         {
         {
             if (CheckCollisionPointRec(mousePosition, (Rectangle){ 0, 0, screenWidth, 20 }))
             if (CheckCollisionPointRec(mousePosition, (Rectangle){ 0, 0, screenWidth, 20 }))
             {
             {
+                windowPosition = GetWindowPosition();
                 dragWindow = true;
                 dragWindow = true;
                 panOffset = mousePosition;
                 panOffset = mousePosition;
             }
             }