mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Add createtextboxreal() and createtextboxflipme()
createtextboxreal() is the same as createtextbox(), but with a flipme parameter added to create text boxes that have their flipme attribute set to true. createtextbox() just calls createtextboxreal() with flipme set to false, and createtextboxflipme() just calls createtextboxreal() with flipme set to true; this is because I do not want to use C++ function overloading.
This commit is contained in:
@@ -1282,8 +1282,15 @@ void Graphics::textboxadjust(void)
|
||||
}
|
||||
|
||||
|
||||
void Graphics::createtextbox( std::string t, int xp, int yp, int r, int g, int b)
|
||||
{
|
||||
void Graphics::createtextboxreal(
|
||||
std::string t,
|
||||
int xp,
|
||||
int yp,
|
||||
int r,
|
||||
int g,
|
||||
int b,
|
||||
bool flipme
|
||||
) {
|
||||
m = textbox.size();
|
||||
|
||||
if(m<20)
|
||||
@@ -1295,11 +1302,34 @@ void Graphics::createtextbox( std::string t, int xp, int yp, int r, int g, int b
|
||||
if (xp == -1) text.xp = 160 - (((length / 2) + 1) * 8);
|
||||
text.yp = yp;
|
||||
text.initcol(r, g, b);
|
||||
text.flipme = flipme;
|
||||
text.resize();
|
||||
textbox.push_back(text);
|
||||
}
|
||||
}
|
||||
|
||||
void Graphics::createtextbox(
|
||||
std::string t,
|
||||
int xp,
|
||||
int yp,
|
||||
int r,
|
||||
int g,
|
||||
int b
|
||||
) {
|
||||
createtextboxreal(t, xp, yp, r, g, b, false);
|
||||
}
|
||||
|
||||
void Graphics::createtextboxflipme(
|
||||
std::string t,
|
||||
int xp,
|
||||
int yp,
|
||||
int r,
|
||||
int g,
|
||||
int b
|
||||
) {
|
||||
createtextboxreal(t, xp, yp, r, g, b, true);
|
||||
}
|
||||
|
||||
void Graphics::drawfade(void)
|
||||
{
|
||||
int usethisamount = lerp(oldfadeamount, fadeamount);
|
||||
|
||||
Reference in New Issue
Block a user