Page MenuHomeWildfire Games

joskar (Johnny Oskarsson)
User

Projects

User Details

User Since
Jul 17 2017, 2:46 PM (280 w, 4 d)

Recent Activity

Jul 24 2017

joskar added a comment to D332: Add an option in the Options menu to change the UI scale.

I think it should be more readable, because the current implementation can show it in wrong way. I think this is shorter:

guiScale = std::max({guiScale, g_xres / 1024, g_yres / 768.0});

Also hard-coded things are bad. I can suggest to use a const variable.

It sure is shorter, and updated the diff now to see if there are other comments on it. It should be std::min({}) though in order to have the same behaviour as before.

Jul 24 2017, 10:40 PM
joskar updated the diff for D332: Add an option in the Options menu to change the UI scale.
  • Use std::min({}) instead of explicit if statements
  • Create and use g_Minimum{X,Y}res instead of hardcoded parameters
Jul 24 2017, 10:35 PM
joskar added a comment to D332: Add an option in the Options menu to change the UI scale.

Marking some stuff as 'done', while leaving a couple still open for discussion (no clear 'Definition of Done' on those?).

Jul 24 2017, 5:20 PM
joskar updated the diff for D332: Add an option in the Options menu to change the UI scale.

This update fixes the 'You have unsaved changes' thing, which was caused by converting the caption to a floating point value instead of leaving it as a string.

Jul 24 2017, 5:15 PM
joskar commandeered D332: Add an option in the Options menu to change the UI scale.
Jul 24 2017, 5:10 PM
joskar added a comment to D332: Add an option in the Options menu to change the UI scale.
In D332#29501, @Dariost wrote:

Updated with the latest diff

I can confirm the issue where after changing the UI scale and saving the settings it still open the dialog for unsaved settings when closing the options menu

Jul 24 2017, 4:10 PM
joskar added a comment to D332: Add an option in the Options menu to change the UI scale.
In D332#29460, @Dariost wrote:

The only thing that I noticed is missing from @joskar's patch is that the cursor doesn't get resized until the game is restarted. The cursor needs to be recreated, because the scaling is done at creation time.

Jul 24 2017, 3:57 PM

Jul 18 2017

joskar added a comment to D332: Add an option in the Options menu to change the UI scale.
In D332#29362, @elexis wrote:

Notice that UpdateResolution` also sends the WindowResized event` even though the window size didn't change. Probably won't matter as long as there is no code that may not be run if the change is kept the same.
Changing the UI setting without saving it should apply it just as saving does. Make sure to keep options.js agnostic of options.json (i.e. when adding support for a setting, make sure all settings can use that).

Jul 18 2017, 6:40 PM
joskar added a comment to D332: Add an option in the Options menu to change the UI scale.
In D332#29326, @elexis wrote:

REQUIRES GAME RESTART should be avoided where possible.
All it takes is updating g_GuiScale if the gui.scale config entry changes.

I agree, but wasn't there some texture creations depended on the gui scale? Need to check its uses.

Jul 18 2017, 11:30 AM

Jul 17 2017

joskar updated the diff for D749: Take gui.scale into account when repositioning tooltips.

Remove accidentally added *.swp file

Jul 17 2017, 3:54 PM
joskar updated the diff for D749: Take gui.scale into account when repositioning tooltips.

Removed explicit conversion.
Declarations on separate lines.

Jul 17 2017, 3:45 PM
joskar updated the diff for D749: Take gui.scale into account when repositioning tooltips.

Added my name to programming.json

Jul 17 2017, 3:11 PM
joskar created D749: Take gui.scale into account when repositioning tooltips.
Jul 17 2017, 3:04 PM