cleaned up the scaling options.
- all 5 settings affected by uiscale have been changed to have the exact same semantics: -1, if supported means special scaling, this is available for HUD and status bar, 0 means to use uiscale, any larger value is a direct scaling factor. - scaling is cut off when the factor is larger than screenwidth/320 or screenheight/200 because anything larger will definitely not fit. - a lot of code has been cleaned up and consolidated. Especially the message code had an incredible amount of redundancy. - all scaling options have been moved into a submenu. This menu is not complete, though - it still requires a special menu widget to convey the intended information without confusing the user.
This commit is contained in:
parent
1dcc017daf
commit
f95c29ad28
12 changed files with 166 additions and 343 deletions
|
|
@ -227,16 +227,8 @@ void CT_Drawer (void)
|
|||
int i, x, scalex, y, promptwidth;
|
||||
|
||||
y = (viewactive || gamestate != GS_LEVEL) ? -10 : -30;
|
||||
if (active_con_scaletext() == 0)
|
||||
{
|
||||
scalex = CleanXfac;
|
||||
y *= CleanYfac;
|
||||
}
|
||||
else
|
||||
{
|
||||
scalex = 1;
|
||||
}
|
||||
|
||||
scalex = 1;
|
||||
int scale = active_con_scaletext();
|
||||
int screen_width = SCREENWIDTH / scale;
|
||||
int screen_height= SCREENHEIGHT / scale;
|
||||
|
|
@ -266,18 +258,10 @@ void CT_Drawer (void)
|
|||
// draw the prompt, text, and cursor
|
||||
ChatQueue[len] = SmallFont->GetCursor();
|
||||
ChatQueue[len+1] = '\0';
|
||||
if (active_con_scaletext() < 2)
|
||||
{
|
||||
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt, DTA_CleanNoMove, active_con_scaletext() == 0, TAG_DONE);
|
||||
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i), DTA_CleanNoMove, active_con_scaletext() == 0, TAG_DONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt,
|
||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i),
|
||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||
}
|
||||
screen->DrawText (SmallFont, CR_GREEN, 0, y, prompt,
|
||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||
screen->DrawText (SmallFont, CR_GREY, promptwidth, y, (char *)(ChatQueue + i),
|
||||
DTA_VirtualWidth, screen_width, DTA_VirtualHeight, screen_height, DTA_KeepRatio, true, TAG_DONE);
|
||||
ChatQueue[len] = '\0';
|
||||
|
||||
BorderTopRefresh = screen->GetPageCount ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue