if (pos == MAIN_CONTROL_NAME)
{
- SetGameStatus(GAME_MODE_PSEUDO_TYPENAME);
+ if ((mx || my) &&
+ insideTextPosRect(main_controls[i].pos_text, mx - mSX, my - mSY))
+ {
+ // special case: menu text "name/team" clicked -- toggle team mode
+ setup.team_mode = !setup.team_mode;
+
+ InitializeMainControls();
+ DrawCursorAndText_Main(choice, TRUE, FALSE);
- HandleTypeName(strlen(setup.player_name), 0);
+ DrawPreviewPlayers();
+ }
+ else
+ {
+ SetGameStatus(GAME_MODE_PSEUDO_TYPENAME);
+
+ HandleTypeName(strlen(setup.player_name), 0);
+ }
}
else if (pos == MAIN_CONTROL_LEVELS)
{
}
}
-static void DrawPreviewPlayers(void)
+void DrawPreviewPlayers(void)
{
if (game_status != GAME_MODE_MAIN)
return;
- if (!network.enabled && !setup.team_mode)
- return;
-
boolean player_found[MAX_PLAYERS];
int num_players = 0;
int i, x, y;
ClearRectangleOnBackground(drawto, max_xpos, max_ypos,
max_players_width, max_players_height);
+ if (!network.enabled && !setup.team_mode)
+ return;
+
// only draw players if level is suited for team mode
if (num_players < 2)
return;
void DrawLevel(int);
void DrawSizedLevel(int, int, int, int, int);
void DrawMiniLevel(int, int, int, int);
+void DrawPreviewPlayers(void);
void DrawPreviewLevelInitial(void);
void DrawPreviewLevelAnimation(void);