mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 18:39:45 +01:00
Reposition game time and trinket count in game save box
The game time is moved a little to the left, and the trinket count a little to the right. To fix #376 for real, the trinket count is now positioned automatically based on its length. The trinket icon is now also displayed at the far right (instead of to the left of the count) for better symmetry, and so that switching between tele save and quick save doesn't make the trinket icon move if the trinket counts have different lengths.
This commit is contained in:
parent
6c02095d99
commit
4adcf7013c
1 changed files with 34 additions and 24 deletions
|
@ -632,6 +632,7 @@ void menurender()
|
||||||
switch (game.currentmenuoption)
|
switch (game.currentmenuoption)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
{
|
||||||
//Show teleporter save info
|
//Show teleporter save info
|
||||||
graphics.drawpixeltextbox(17, 65-20, 286, 90, 36,12, 65, 185, 207,0,4);
|
graphics.drawpixeltextbox(17, 65-20, 286, 90, 36,12, 65, 185, 207,0,4);
|
||||||
|
|
||||||
|
@ -641,13 +642,16 @@ void menurender()
|
||||||
{
|
{
|
||||||
graphics.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.tele_crewstats[i], true);
|
graphics.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.tele_crewstats[i], true);
|
||||||
}
|
}
|
||||||
graphics.Print(160 - 84, 132-20, game.tele_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
graphics.Print(59, 132-20, game.tele_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
graphics.Print(160 + 40, 132-20, help.number(game.tele_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
const std::string& trinketcount = help.number(game.tele_trinkets);
|
||||||
|
graphics.Print(262-graphics.len(trinketcount), 132-20, trinketcount, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
|
|
||||||
graphics.drawsprite(50, 126-20, 50, graphics.col_clock);
|
graphics.drawsprite(34, 126-20, 50, graphics.col_clock);
|
||||||
graphics.drawsprite(175, 126-20, 22, graphics.col_trinket);
|
graphics.drawsprite(270, 126-20, 22, graphics.col_trinket);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 1:
|
case 1:
|
||||||
|
{
|
||||||
//Show quick save info
|
//Show quick save info
|
||||||
graphics.drawpixeltextbox(17, 65-20, 286, 90, 36,12, 65, 185, 207,0,4);
|
graphics.drawpixeltextbox(17, 65-20, 286, 90, 36,12, 65, 185, 207,0,4);
|
||||||
|
|
||||||
|
@ -657,13 +661,15 @@ void menurender()
|
||||||
{
|
{
|
||||||
graphics.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.quick_crewstats[i], true);
|
graphics.drawcrewman(169-(3*42)+(i*42), 95-20, i, game.quick_crewstats[i], true);
|
||||||
}
|
}
|
||||||
graphics.Print(160 - 84, 132-20, game.quick_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
graphics.Print(59, 132-20, game.quick_gametime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
graphics.Print(160 + 40, 132-20, help.number(game.quick_trinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
const std::string& trinketcount = help.number(game.quick_trinkets);
|
||||||
|
graphics.Print(262-graphics.len(trinketcount), 132-20, trinketcount, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
|
|
||||||
graphics.drawsprite(50, 126-20, 50, graphics.col_clock);
|
graphics.drawsprite(34, 126-20, 50, graphics.col_clock);
|
||||||
graphics.drawsprite(175, 126-20, 22, graphics.col_trinket);
|
graphics.drawsprite(270, 126-20, 22, graphics.col_trinket);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Menu::gameover:
|
case Menu::gameover:
|
||||||
case Menu::gameover2:
|
case Menu::gameover2:
|
||||||
|
@ -2220,20 +2226,22 @@ void maprender()
|
||||||
if (graphics.flipmode)
|
if (graphics.flipmode)
|
||||||
{
|
{
|
||||||
graphics.Print(0, 122, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
|
graphics.Print(0, 122, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
|
||||||
graphics.Print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
graphics.Print(59, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
graphics.Print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
const std::string& trinketcount = help.number(game.savetrinkets);
|
||||||
|
graphics.Print(262-graphics.len(trinketcount), 78, trinketcount, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
|
|
||||||
graphics.drawsprite(50, 74, 50, graphics.col_clock);
|
graphics.drawsprite(34, 74, 50, graphics.col_clock);
|
||||||
graphics.drawsprite(175, 74, 22, graphics.col_trinket);
|
graphics.drawsprite(270, 74, 22, graphics.col_trinket);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
graphics.Print(0, 90, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
|
graphics.Print(0, 90, game.customleveltitle, 25, 255 - (help.glow / 2), 255 - (help.glow / 2), true);
|
||||||
graphics.Print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
graphics.Print(59, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
graphics.Print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
const std::string& trinketcount = help.number(game.savetrinkets);
|
||||||
|
graphics.Print(262-graphics.len(trinketcount), 132, trinketcount, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
|
|
||||||
graphics.drawsprite(50, 126, 50, graphics.col_clock);
|
graphics.drawsprite(34, 126, 50, graphics.col_clock);
|
||||||
graphics.drawsprite(175, 126, 22, graphics.col_trinket);
|
graphics.drawsprite(270, 126, 22, graphics.col_trinket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2267,11 +2275,12 @@ void maprender()
|
||||||
{
|
{
|
||||||
graphics.drawcrewman(169-(3*42)+(i*42), 98, i, game.crewstats[i], true);
|
graphics.drawcrewman(169-(3*42)+(i*42), 98, i, game.crewstats[i], true);
|
||||||
}
|
}
|
||||||
graphics.Print(160 - 84, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
graphics.Print(59, 78, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
graphics.Print(160 + 40, 78, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
const std::string& trinketcount = help.number(game.savetrinkets);
|
||||||
|
graphics.Print(262-graphics.len(trinketcount), 78, trinketcount, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
|
|
||||||
graphics.drawsprite(50, 74, 50, graphics.col_clock);
|
graphics.drawsprite(34, 74, 50, graphics.col_clock);
|
||||||
graphics.drawsprite(175, 74, 22, graphics.col_trinket);
|
graphics.drawsprite(270, 74, 22, graphics.col_trinket);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2280,11 +2289,12 @@ void maprender()
|
||||||
{
|
{
|
||||||
graphics.drawcrewman(169-(3*42)+(i*42), 95, i, game.crewstats[i], true);
|
graphics.drawcrewman(169-(3*42)+(i*42), 95, i, game.crewstats[i], true);
|
||||||
}
|
}
|
||||||
graphics.Print(160 - 84, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
graphics.Print(59, 132, game.savetime, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
graphics.Print(160 + 40, 132, help.number(game.savetrinkets), 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
const std::string& trinketcount = help.number(game.savetrinkets);
|
||||||
|
graphics.Print(262-graphics.len(trinketcount), 132, trinketcount, 255 - (help.glow / 2), 255 - (help.glow / 2), 255 - (help.glow / 2));
|
||||||
|
|
||||||
graphics.drawsprite(50, 126, 50, graphics.col_clock);
|
graphics.drawsprite(34, 126, 50, graphics.col_clock);
|
||||||
graphics.drawsprite(175, 126, 22, graphics.col_trinket);
|
graphics.drawsprite(270, 126, 22, graphics.col_trinket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue