Skip to content

Commit

Permalink
position(force) -> position(absolute)
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakoFox authored and InfoTeddy committed Nov 7, 2024
1 parent 98a0931 commit 6174d62
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions desktop_version/src/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion desktop_version/src/Graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Graphics
int r, int g, int b
);

void textboxforcepos(int x, int y);
void textboxabsolutepos(int x, int y);

void textboxcenterx(void);

Expand Down
14 changes: 7 additions & 7 deletions desktop_version/src/Script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -567,15 +567,15 @@ 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;
}
else if (words[0] == "position")
{
//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")
Expand All @@ -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...?
Expand Down Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion desktop_version/src/Script.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class scriptclass
int textboxtimer;
std::vector<TextboxSprite> textbox_sprites;
TextboxImage textbox_image;
bool textbox_forcepos;
bool textbox_absolutepos;
bool textbox_force_outline;
bool textbox_outline;

Expand Down
4 changes: 2 additions & 2 deletions desktop_version/src/Textbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ textboxclass::textboxclass(int gap)

large = false;

position_forced = false;
position_absolute = false;

should_centerx = false;
should_centery = false;
Expand Down Expand Up @@ -83,7 +83,7 @@ void textboxclass::centery(void)
void textboxclass::applyposition(void)
{
resize();
if (!position_forced)
if (!position_absolute)
{
reposition();
if (should_centerx)
Expand Down
2 changes: 1 addition & 1 deletion desktop_version/src/Textbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class textboxclass

bool large;

bool position_forced;
bool position_absolute;

bool should_centerx;
bool should_centery;
Expand Down

0 comments on commit 6174d62

Please sign in to comment.