RandomClown Posted January 1, 2013 Share Posted January 1, 2013 (edited) Bug SubmissionPlease choose a category [Graphics] PlatformSteamVersion Number 70828 Issue title Window "Maximized" Not Handled Steps to reproduce - Maximize the game [tested in 1920x1080]- Try to access the item bar [or anything]Describe your issue [Good] When the game is resize, the UI elements resize fine. The UI click areas also update fine.[bad] When the game is maximized, the scale of the UI click areas are not updated.Clicking on the item bar would cause the player to walk instead of select an item.----------------In your windows message handler, the case WM_SIZE or SIZE_MAXIMIZED may not have been handled correctly.It should have been handled by default under WM_SIZE, so whatever your code does, make sure it handles maximize much like it would for resize.I had the exact same problem at some point in my own program, so a sample may or may not help.LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam){ ... switch(message){ case WM_SIZE: switch(wParam){ case SIZE_MINIMIZED: engine.background=1; // When BG is set, isGraphicsReady() will always return false break; case SIZE_RESTORED: case SIZE_MAXIMIZED: engine.background=0; break; } if(engine.isGraphicsReady()){ // Will not refresh if in background engine.resizeDevice(); engine.resizeUI(); } // No break; Fall to next case to render case WM_SIZING: if(engine.isGraphicsReady()) engine.render(); // Will not draw if in background break; case WM_[Other Stuffs]: ... } return 0;}Hope that hits close to your problem.Let me know if this helps or not. Edited January 1, 2013 by RandomClown Link to comment Share on other sites More sharing options...
Recommended Posts