mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
position(force) -> position(absolute)
This commit is contained in:
parent
98a0931225
commit
6174d62f6f
6 changed files with 15 additions and 15 deletions
|
@ -3223,15 +3223,15 @@ SDL_Color Graphics::bigchunkygetcol(int t)
|
|||
return color;
|
||||
}
|
||||
|
||||
void Graphics::textboxforcepos(int x, int y)
|
||||
void Graphics::textboxabsolutepos(int x, int y)
|
||||
{
|
||||
if (!INBOUNDS_VEC(m, textboxes))
|
||||
{
|
||||
vlog_error("textboxforcepos() out-of-bounds!");
|
||||
vlog_error("textboxabsolutepos() out-of-bounds!");
|
||||
return;
|
||||
}
|
||||
|
||||
textboxes[m].position_forced = true;
|
||||
textboxes[m].position_absolute = true;
|
||||
textboxes[m].xp = x;
|
||||
textboxes[m].yp = y;
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
int r, int g, int b
|
||||
);
|
||||
|
||||
void textboxforcepos(int x, int y);
|
||||
void textboxabsolutepos(int x, int y);
|
||||
|
||||
void textboxcenterx(void);
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ scriptclass::scriptclass(void)
|
|||
textlarge = false;
|
||||
textbox_sprites.clear();
|
||||
textbox_image = TEXTIMAGE_NONE;
|
||||
textbox_forcepos = false;
|
||||
textbox_absolutepos = false;
|
||||
}
|
||||
|
||||
void scriptclass::add_default_colours(void)
|
||||
|
@ -567,7 +567,7 @@ void scriptclass::run(void)
|
|||
textcrewmateposition = TextboxCrewmatePosition();
|
||||
textbox_sprites.clear();
|
||||
textbox_image = TEXTIMAGE_NONE;
|
||||
textbox_forcepos = false;
|
||||
textbox_absolutepos = false;
|
||||
textbox_force_outline = false;
|
||||
textbox_outline = false;
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ void scriptclass::run(void)
|
|||
{
|
||||
//are we facing left or right? for some objects we don't care, default at 0.
|
||||
j = 0;
|
||||
textbox_forcepos = false;
|
||||
textbox_absolutepos = false;
|
||||
|
||||
//the first word is the object to position relative to
|
||||
if (words[1] == "centerx")
|
||||
|
@ -597,11 +597,11 @@ void scriptclass::run(void)
|
|||
textx = -500;
|
||||
texty = -500;
|
||||
}
|
||||
else if (words[1] == "force")
|
||||
else if (words[1] == "absolute")
|
||||
{
|
||||
words[2] = "donothing";
|
||||
j = -1;
|
||||
textbox_forcepos = true;
|
||||
textbox_absolutepos = true;
|
||||
|
||||
}
|
||||
else // Well, are they asking for a crewmate...?
|
||||
|
@ -803,9 +803,9 @@ void scriptclass::run(void)
|
|||
|
||||
graphics.setimage(textbox_image);
|
||||
|
||||
if (textbox_forcepos)
|
||||
if (textbox_absolutepos)
|
||||
{
|
||||
graphics.textboxforcepos(textx, texty);
|
||||
graphics.textboxabsolutepos(textx, texty);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ public:
|
|||
int textboxtimer;
|
||||
std::vector<TextboxSprite> textbox_sprites;
|
||||
TextboxImage textbox_image;
|
||||
bool textbox_forcepos;
|
||||
bool textbox_absolutepos;
|
||||
bool textbox_force_outline;
|
||||
bool textbox_outline;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ textboxclass::textboxclass(int gap)
|
|||
|
||||
large = false;
|
||||
|
||||
position_forced = false;
|
||||
position_absolute = false;
|
||||
|
||||
should_centerx = false;
|
||||
should_centery = false;
|
||||
|
@ -83,7 +83,7 @@ void textboxclass::centery(void)
|
|||
void textboxclass::applyposition(void)
|
||||
{
|
||||
resize();
|
||||
if (!position_forced)
|
||||
if (!position_absolute)
|
||||
{
|
||||
reposition();
|
||||
if (should_centerx)
|
||||
|
|
|
@ -125,7 +125,7 @@ public:
|
|||
|
||||
bool large;
|
||||
|
||||
bool position_forced;
|
||||
bool position_absolute;
|
||||
|
||||
bool should_centerx;
|
||||
bool should_centery;
|
||||
|
|
Loading…
Reference in a new issue