Skip to content

Commit

Permalink
UI size shouldn't change with the window resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
vitor251093 committed Feb 3, 2024
1 parent 76f6258 commit fe07680
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/GPU_OpenGL_shaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ vec2 getGenericHudTextureCoordinates(float xpos, float ypos)
vec2 getIngameHudTextureCoordinates(float xpos, float ypos)
{
int iuScale = KHUIScale;
float iuTexScale = (u3DScale*1.0)/iuScale;
float iuTexScale = (6.0)/iuScale;
vec2 texPosition3d = vec2(xpos, ypos)*iuTexScale;
float heightScale = (4.0/3)/TopScreenAspectRatio;
float widthScale = 1.0/heightScale;
Expand Down Expand Up @@ -315,7 +315,7 @@ vec2 getIngameHudTextureCoordinates(float xpos, float ypos)
ivec2 getPauseHudTextureCoordinates(float xpos, float ypos)
{
int iuScale = KHUIScale;
float iuTexScale = (u3DScale*1.0)/iuScale;
float iuTexScale = (6.0)/iuScale;
ivec2 texPosition3d = ivec2(vec2(xpos, ypos)*iuTexScale);
if (KHGameScene == 13) // gameScene_PauseMenuWithGauge
Expand Down Expand Up @@ -365,7 +365,7 @@ ivec4 getTopScreenColor(float xpos, float ypos, int index)
if (KHGameScene == 7 && isMinimapVisible() && !isMissionInformationVisible()) // gameScene_InGameWithMap
{
int iuScale = KHUIScale;
float iuTexScale = (u3DScale*1.0)/iuScale;
float iuTexScale = (6.0)/iuScale;
vec2 texPosition3d = vec2(xpos, ypos)*iuTexScale;
float heightScale = (4.0/3)/TopScreenAspectRatio;
float widthScale = 1.0/heightScale;
Expand Down

0 comments on commit fe07680

Please sign in to comment.