Skip to content

Commit

Permalink
dynamic default tab in Astrocomplex
Browse files Browse the repository at this point in the history
Now, if there are no nauts available in the AstroComplex,
the default tab is the facility transfer. But, if nauts are available,
the default tab is nauts transfer.
  • Loading branch information
alsed committed Aug 29, 2024
1 parent 224ce7a commit f913213
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions src/game/ast2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ void DrawLimbo(char plr)
fill_rectangle(10, 52, 89, 101, 7 + plr * 3);
InBox(165, 46, 315, 67);
fill_rectangle(166, 47, 314, 66, 0);
ShBox(167, 48, 225, 65);
InBox(167, 48, 225, 65); // Transfer Astronaut button
ShBox(167, 48, 225, 65); // Transfer Astronaut button
ShBox(227, 48, 256, 65); // Send All button
ShBox(258, 48, 313, 65); // Facility Transfer button
InBox(4, 128, 20, 196);
Expand Down Expand Up @@ -127,11 +126,8 @@ void DrawLimbo(char plr)
display::graphics.setForegroundColor(20);
draw_string(0, 0, "ACILITY");
draw_string(262, 62, "TRANSFER");

fill_rectangle(166, 78, 314, 88, 10);
display::graphics.setForegroundColor(11);
draw_string(185, 85, "TRANSFER TO LOCATION");



for (int i = 0; i < 5; i++) {
char str[21];

Expand Down Expand Up @@ -205,8 +201,7 @@ void DrawLimbo(char plr)

void Limbo(char plr)
{
int BarA, now2;
int tag = OP_TRANSFER;
int BarA, now2, tag ;
std::vector<int> AstroList;

DrawLimbo(plr);
Expand All @@ -225,8 +220,18 @@ void Limbo(char plr)
FadeIn(2, 10, 0, 0);

if (AstroList.size()) {
InBox(167, 48, 225, 65); // Default Transfer Astronaut button
tag = OP_TRANSFER;
fill_rectangle(166, 78, 314, 88, 10);
display::graphics.setForegroundColor(11);
draw_string(185, 85, "TRANSFER TO LOCATION");
LimboText(plr, AstroList.at(now2));
} else {
InBox(258, 48, 313, 65); // Default Facility transfer button
tag = OP_VISIT;
fill_rectangle(166, 78, 314, 88, 10);
display::graphics.setForegroundColor(11);
draw_string(203, 85, "VISIT LOCATION");
Help((plr == 0) ? "i176" : "i177");
}

Expand Down

0 comments on commit f913213

Please sign in to comment.