mirror of
https://github.com/id-Software/DOOM-iOS.git
synced 2025-05-30 00:31:15 +00:00
Fix alignment of text and buttons
This commit is contained in:
parent
eea609c09e
commit
0b571e4120
1 changed files with 8 additions and 8 deletions
|
@ -221,11 +221,11 @@ void SetButtonPics( ibutton_t *button, const char *picBase, const char *title, i
|
|||
button->scale = 1.0f;
|
||||
button->title = title;
|
||||
|
||||
button->x = x * ((float)displaywidth) / 480.0f;
|
||||
button->y = y * ((float)displayheight) / 320.0f;
|
||||
button->x = x * ((float)SCREENWIDTH) / 480.0f;
|
||||
button->y = y * ((float)SCREENHEIGHT) / 320.0f;
|
||||
|
||||
float xRatio = ((float)displaywidth) / 480.0f;
|
||||
float yRatio = ((float)displayheight) / 320.0f;
|
||||
float xRatio = ((float)SCREENWIDTH) / 480.0f;
|
||||
float yRatio = ((float)SCREENHEIGHT) / 320.0f;
|
||||
|
||||
float themin = MIN( xRatio, yRatio );
|
||||
|
||||
|
@ -236,8 +236,8 @@ void SetButtonPics( ibutton_t *button, const char *picBase, const char *title, i
|
|||
void SetButtonPicsAndSizes( ibutton_t *button, const char *picBase, const char *title, int x, int y, int w, int h ) {
|
||||
SetButtonPics( button, picBase, title, x, y );
|
||||
|
||||
float xRatio = ((float)displaywidth) / 480.0f;
|
||||
float yRatio = ((float)displayheight) / 320.0f;
|
||||
float xRatio = ((float)SCREENWIDTH) / 480.0f;
|
||||
float yRatio = ((float)SCREENHEIGHT) / 320.0f;
|
||||
|
||||
float themin = MIN( xRatio, yRatio );
|
||||
|
||||
|
@ -526,8 +526,8 @@ return fx - x;
|
|||
float iphoneCenterText( float x, float y, float scale, const char *str ) {
|
||||
float l = StringFontWidth( str );
|
||||
|
||||
x *= ((float)displaywidth) / 480.0f;
|
||||
y *= ((float)displayheight) / 320.0f;
|
||||
x *= ((float)SCREENWIDTH) / 480.0f;
|
||||
y *= ((float)SCREENHEIGHT) / 320.0f;
|
||||
|
||||
x -= l * scale * 0.5 * screenResolutionScale * 2;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue