-
-
Notifications
You must be signed in to change notification settings - Fork 418
Add Screen Scaling Type to graphics settings dialog and Interface Type to the game settings dialog #9971
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
base: master
Are you sure you want to change the base?
Add Screen Scaling Type to graphics settings dialog and Interface Type to the game settings dialog #9971
Conversation
…e game settings dialog
|
@Districh-ru, nice job adding all of these. I was thinking if we should have the scaling filters and mouse rendering under the graphics settings? Consider that we're probably soon-ish going to add the numeric army estimate option too, then we could add that to the main options page? I'm talking about this one: EDIT: I guess it would also make sense to have the cursor rendering option under a sub menu for cursor settings, in which we would include the color/b&w setting. |
|
@ihhub and @zenseii, we can add a UI option for "numeric army estimate" in this PR after #9678 is merged. @zenseii We can move the made options to the other dialog. It is not difficult. :) Making an extra dialog for two options sounds not good to me: a user has to make more clicks to get to the option ... but I'll give it a chance. :) And IMHO we can make not all lines with 3 options, what do you think about the next approach: PS |
zenseii
left a comment
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.
Looked over the strings and didn't find much. I'll test on Vita and report back soon.
|
@Districh-ru, I agree about your sentiments about 2 options for cursor so we can drop that idea. My main concern is that the cursor rendering setting is so technical that having it on the main page of settings will confuse users, which means it might be better on the graphics page. Ideally we would not need an option for it but apply this whenever an integer or larger than 640x480 resolution is selected (?). But this is a much bigger discussion and not necessary here. I think it looks good to have the grid you showed: |
|
Hi @Districh-ru please note that on devices with touchpad/touchscreen software-rendered mouse cursor is mandatory, because automatic conversion of mouse events to touch events and vice versa is disabled because we need to reliably distinguish between them. Please see the |
Co-authored-by: Zenseii <[email protected]>
… to force nearest scaling of the game image
Thanks for the warning, @oleg-derevenetz! But as I can see the cursor "software emulation" stays only for how to render it on the screen:
The events processing in |
Please note the |
You are absolutely right. I guess for now we need to disable this option for systems with touchscreen by making it gray or simply not showing it. Later we can think about if we can use |
I strongly doubt that |
Agree. If there is no cursor then there is nothing to move and the only way is to use software cursor. I'll add the corresponding comments about why we must use hardware cursor for touchscreen devices. I did a test for Android and it acts the same as Windows - the system (hardware) cursor is visible only if mouse if plugged. |
|
Hi @Districh-ru what do you think about making the software cursor the only option (or perhaps a default with config file-only configuration)? Pros of the software cursor:
Cons of the software cursor:
|
|
Hi @oleg-derevenetz, I prefer to keep as it is now - "software" default with config file-only configuration. But I'm also OK with leaving only software cursor. We can discuss it separately with the team and active players and remove the hardware cursor ability from the engine in a new PR if we decide to do this. |
|
Hi @ihhub, sadly I'll have no time in the next days - tomorrow I'll be preparing for a long business trip and will be on a train until November 1st. I believe I'll have some time while in the business trip, I'll take my laptop. Hi @zenseii, if you have some time could you please assist with updating the icons. I'll update the other logic if it is needed. |
|
@Districh-ru, I'll finish it. Have a nice trip! |
|
Hi, @Districh-ru. I realized that the engine's own transparency for the inner lens created a much worse effect than the one @PusshPop made in their images. This lead me to believe that we need to "pre-render" the inner lens shine and just paste it on top of the upscaled halflings. What I was going to do:
|
|
Hi @zenseii, many thanks for adding the monocle. Code
#include "h2d_file.h"
#include "image_tool.h"
fheroes2::H2DReader re;
re.open( "..\\files\\data\\resurrection.h2d" );
fheroes2::H2DWriter wr;
wr.add( re );
const std::string imgPath = "..\\filter_button\\";
fheroes2::Sprite temp;
fheroes2::Load( imgPath + "Monocle.bmp", temp );
uint8_t transp = temp.image()[0];
fheroes2::ReplaceColorIdByTransformId( temp, transp, 1 );
fheroes2::ReplaceColorId( temp, transp, 0 );
// Shadows
// transp = temp.image()[0];
fheroes2::ReplaceColorIdByTransformId( temp, 58, 4U );
fheroes2::ReplaceColorId( temp, 58, 0 );
fheroes2::ReplaceColorIdByTransformId( temp, 60, 3U );
fheroes2::ReplaceColorId( temp, 60, 0 );
fheroes2::ReplaceColorIdByTransformId( temp, 62, 2U );
fheroes2::ReplaceColorId( temp, 62, 0 );
// Inner lens glass shine
fheroes2::ReplaceColorIdByTransformId( temp, 19, 9U );
fheroes2::ReplaceColorId( temp, 19, 0 );
fheroes2::ReplaceColorIdByTransformId( temp, 18, 8U );
fheroes2::ReplaceColorId( temp, 18, 0 );
fheroes2::ReplaceColorIdByTransformId( temp, 17, 7U );
fheroes2::ReplaceColorId( temp, 17, 0 );
fheroes2::writeImageToH2D( wr, "monocle.image", temp );
wr.write( imgPath + "resurrection.h2d" ); |
@zenseii, yes, we can add these two special lens for the images. Only the lower-left shine covers the Halfling sprite, so we can have one image for the upper-right shine and two lower-left for two types of scales. Could you please contact @PusshPop. |
|
@Districh-ru, I agree about the lower left shine. I will contact @PusshPop. |
@Districh-ru @zenseii Sorry for the late reply. But the zip file I posted contained 2 versions of the monocle. 1 with the Shine baked in where the engine is not supposed to make the glare transparent. This should be able to be pasted on top of the menu button. Or is the result of that one not good enough? Does it create weird pixels/artifacts? |
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.
Clang-Tidy found issue(s) with the introduced code (1/1)
|
Hi @zenseii and @PusshPop, I've updated the "subpixel" scaling algorithm to do scaling when the next right or bottom pixel is transparent. Previously these pixels were not interpolated so we had the square left eye (or it is nose) of Halfling.
Also I've updated the |
|
@Districh-ru, thanks for fixing this and good job fixing that contour too! In the end I think we can go with the engine transparency effect as this will allow us to use the monocle on top of other backgrounds/objects if we ever want to for whatever reason. The only thing that remains to be solved now is the contour of the halfling's feet that are sticking out from the bottom edge of the monocle. |
|
@zenseii, done: |
zenseii
left a comment
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.
Well done!




Thanks to @PusshPop for the Linear/Nearest scaling icon!
This PR adds new settings:
The parameter names, description texts and place in the dialog can be discussed.
The new Screen Scaling Type option must be tested on all supported platforms.