mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03:00
Completely remove Graphics::len
I migrated all graphics.len calls over to font::len (and also migrated prints mainly surrounding those graphics.len's) so the old len function is now completely removed.
This commit is contained in:
committed by
Misa Elizabeth Kai
parent
a706fb249a
commit
da6be09993
@@ -297,11 +297,11 @@ void Graphics::map_tab(int opt, const char* text, bool selected /*= false*/)
|
||||
{
|
||||
char buffer[SCREEN_WIDTH_CHARS + 1];
|
||||
vformat_buf(buffer, sizeof(buffer), loc::get_langmeta()->menu_select_tight.c_str(), "label:str", text);
|
||||
Print(x - len(buffer)/2, 220, buffer, 196, 196, 255 - help.glow);
|
||||
font::print(PR_CEN, x, 220, buffer, 196, 196, 255 - help.glow);
|
||||
}
|
||||
else
|
||||
{
|
||||
Print(x - len(text)/2, 220, text, 64, 64, 64);
|
||||
font::print(PR_CEN, x, 220, text, 64, 64, 64);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -393,12 +393,6 @@ void Graphics::bigbprint(int x, int y, const std::string& text, int r, int g, in
|
||||
font::print(PR_scX | PR_BOR, x, y, text, r, g, b);
|
||||
}
|
||||
|
||||
int Graphics::len(const std::string& t)
|
||||
{
|
||||
// DEPRECATED
|
||||
return font::len(0, t);
|
||||
}
|
||||
|
||||
void Graphics::bprint( int x, int y, const std::string& text, int r, int g, int b, bool cen /*= false*/ ) {
|
||||
// DEPRECATED
|
||||
if (cen)
|
||||
@@ -907,7 +901,7 @@ void Graphics::drawgui(void)
|
||||
{
|
||||
int sc = 2;
|
||||
int y = 28;
|
||||
if (len(translation) > 144)
|
||||
if (font::len(0, translation) > 144)
|
||||
{
|
||||
// We told translators how long it could be... Ah well, mitigate the damage.
|
||||
sc = 1;
|
||||
@@ -917,7 +911,7 @@ void Graphics::drawgui(void)
|
||||
{
|
||||
y = 240 - y - 8*sc;
|
||||
}
|
||||
bigprint(-1, y, translation, 164, 164, 255, true, sc);
|
||||
font::print(sc==2 ? PR_2X : PR_1X | PR_CEN, -1, y, translation, 164, 164, 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -943,7 +937,7 @@ void Graphics::drawgui(void)
|
||||
{
|
||||
int sc = 2;
|
||||
int y = 28;
|
||||
if (len(translation) > 144)
|
||||
if (font::len(0, translation) > 144)
|
||||
{
|
||||
// We told translators how long it could be... Ah well, mitigate the damage.
|
||||
sc = 1;
|
||||
@@ -953,7 +947,7 @@ void Graphics::drawgui(void)
|
||||
{
|
||||
y = 240 - y - 8*sc;
|
||||
}
|
||||
bigprint(-1, y, translation, 164, 164, 255, true, sc);
|
||||
font::print(sc==2 ? PR_2X : PR_1X | PR_CEN, -1, y, translation, 196, 196, 243);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user