-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix UI scaling #592
Fix UI scaling #592
Conversation
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
fix a bunch of ui rendering bugs caused by new scaling code fix main menu timing code Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
@@ -399,10 +417,13 @@ int initApp(char const * const title, int fullscreen) | |||
} | |||
|
|||
// create player classes | |||
// TODO/FIXME: why isn't this in initGame? why is it in init.cpp? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to not crash on frames checking for the mouse in the loading screen (caught this in debug)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, this PR changes the UI code so it reads mousex/mousey etc variables directly when EDITOR is defined (so it doesn't crash). ergo this can probably go in initGame() now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was crashing the main game, not editor
src/ui/GameUI.cpp
Outdated
@@ -715,7 +715,7 @@ void createInventoryTooltipFrame(const int player) | |||
auto tooltipTextField = tooltipFrame->addField("inventory mouse tooltip header", 1024); | |||
tooltipTextField->setText("Nothing"); | |||
tooltipTextField->setSize(SDL_Rect{ 0, 0, 0, 0 }); | |||
tooltipTextField->setFont("fonts/pixelmix.ttf#14"); | |||
tooltipTextField->setFont("fonts/pixelmix.ttf#16"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you revert these font size changes for my HUD stuff - I'll need to redo the spacing/layout and want the old sizes for reference.
fix credits scroll rate Text.cpp: SDL_BlitScaled not used if resolution == 1 Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
3ce6839
to
3e7e687
Compare
/res command changes window size Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
Signed-off-by: SheridanR <sheridan.rathbun@gmail.com>
UI is now rendered to its own framebuffer (render-to-texture) then drawn on a fullscreen quad to fix seams between ui elements at non-720p resolutions.
Also unlocks Frame::process() from the original tickrate which was 50.