コード例 #1
0
void CNetworkJoinMenu::Initialize_t(void)
{
  // title
  gm_mgTitle.mg_boxOnScreen = BoxTitle();
  gm_mgTitle.mg_strText = TRANS("JOIN GAME");
  gm_lhGadgets.AddTail(gm_mgTitle.mg_lnNode);

  gm_mgLAN.mg_bfsFontSize = BFS_LARGE;
  gm_mgLAN.mg_boxOnScreen = BoxBigRow(1.0f);
  gm_mgLAN.mg_pmgUp = &gm_mgOpen;
  gm_mgLAN.mg_pmgDown = &gm_mgNET;
  gm_mgLAN.mg_strText = TRANS("SEARCH LAN");
  gm_mgLAN.mg_strTip = TRANS("search local network for servers");
  gm_lhGadgets.AddTail(gm_mgLAN.mg_lnNode);
  gm_mgLAN.mg_pActivatedFunction = NULL;

  gm_mgNET.mg_bfsFontSize = BFS_LARGE;
  gm_mgNET.mg_boxOnScreen = BoxBigRow(2.0f);
  gm_mgNET.mg_pmgUp = &gm_mgLAN;
  gm_mgNET.mg_pmgDown = &gm_mgOpen;
  gm_mgNET.mg_strText = TRANS("SEARCH INTERNET");
  gm_mgNET.mg_strTip = TRANS("search internet for servers");
  gm_lhGadgets.AddTail(gm_mgNET.mg_lnNode);
  gm_mgNET.mg_pActivatedFunction = NULL;

  gm_mgOpen.mg_bfsFontSize = BFS_LARGE;
  gm_mgOpen.mg_boxOnScreen = BoxBigRow(3.0f);
  gm_mgOpen.mg_pmgUp = &gm_mgNET;
  gm_mgOpen.mg_pmgDown = &gm_mgLAN;
  gm_mgOpen.mg_strText = TRANS("SPECIFY SERVER");
  gm_mgOpen.mg_strTip = TRANS("type in server address to connect to");
  gm_lhGadgets.AddTail(gm_mgOpen.mg_lnNode);
  gm_mgOpen.mg_pActivatedFunction = NULL;
}
コード例 #2
0
void CDisabledMenu::Initialize_t(void)
{
  gm_mgTitle.mg_boxOnScreen = BoxTitle();
  gm_lhGadgets.AddTail(gm_mgTitle.mg_lnNode);

  gm_mgButton.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgButton.mg_boxOnScreen = BoxBigRow(0.0f);
  gm_lhGadgets.AddTail(gm_mgButton.mg_lnNode);
  gm_mgButton.mg_pActivatedFunction = NULL;
}
コード例 #3
0
void CPlayerProfileMenu::Initialize_t(void)
{
  // intialize player and controls menu
  _bPlayerMenuFromSinglePlayer = FALSE;
  gm_mgProfileTitle.mg_boxOnScreen = BoxTitle();
  gm_mgProfileTitle.mg_strText = TRANS("PLAYER PROFILE");
  gm_lhGadgets.AddTail(gm_mgProfileTitle.mg_lnNode);

  gm_mgNoLabel.mg_strText = TRANS("PROFILE:");
  gm_mgNoLabel.mg_boxOnScreen = BoxMediumLeft(0.0f);
  gm_mgNoLabel.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgNoLabel.mg_iCenterI = -1;
  gm_lhGadgets.AddTail(gm_mgNoLabel.mg_lnNode);

  ADD_SELECT_PLAYER_MG(0, gm_mgNumber[0], gm_mgNumber[7], gm_mgNumber[1], gm_mgNumber[0]);
  ADD_SELECT_PLAYER_MG(1, gm_mgNumber[1], gm_mgNumber[0], gm_mgNumber[2], gm_mgNumber[1]);
  ADD_SELECT_PLAYER_MG(2, gm_mgNumber[2], gm_mgNumber[1], gm_mgNumber[3], gm_mgNumber[2]);
  ADD_SELECT_PLAYER_MG(3, gm_mgNumber[3], gm_mgNumber[2], gm_mgNumber[4], gm_mgNumber[3]);
  ADD_SELECT_PLAYER_MG(4, gm_mgNumber[4], gm_mgNumber[3], gm_mgNumber[5], gm_mgNumber[4]);
  ADD_SELECT_PLAYER_MG(5, gm_mgNumber[5], gm_mgNumber[4], gm_mgNumber[6], gm_mgNumber[5]);
  ADD_SELECT_PLAYER_MG(6, gm_mgNumber[6], gm_mgNumber[5], gm_mgNumber[7], gm_mgNumber[6]);
  ADD_SELECT_PLAYER_MG(7, gm_mgNumber[7], gm_mgNumber[6], gm_mgNumber[0], gm_mgNumber[7]);
  gm_mgNumber[7].mg_pmgRight = &gm_mgModel;

  gm_mgNameLabel.mg_strText = TRANS("NAME:");
  gm_mgNameLabel.mg_boxOnScreen = BoxMediumLeft(1.25f);
  gm_mgNameLabel.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgNameLabel.mg_iCenterI = -1;
  gm_lhGadgets.AddTail(gm_mgNameLabel.mg_lnNode);

  // setup of player name button is done on start menu
  gm_mgNameField.mg_strText = "<???>";
  gm_mgNameField.mg_ctMaxStringLen = 25;
  gm_mgNameField.mg_boxOnScreen = BoxPlayerEdit(1.25);
  gm_mgNameField.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgNameField.mg_iCenterI = -1;
  gm_mgNameField.mg_pmgUp = &gm_mgNumber[0];
  gm_mgNameField.mg_pmgDown = &gm_mgTeam;
  gm_mgNameField.mg_pmgRight = &gm_mgModel;
  gm_mgNameField.mg_strTip = TRANS("rename currently active player");
  gm_lhGadgets.AddTail(gm_mgNameField.mg_lnNode);

  gm_mgTeamLabel.mg_strText = TRANS("TEAM:");
  gm_mgTeamLabel.mg_boxOnScreen = BoxMediumLeft(2.25f);
  gm_mgTeamLabel.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgTeamLabel.mg_iCenterI = -1;
  gm_lhGadgets.AddTail(gm_mgTeamLabel.mg_lnNode);

  // setup of player name button is done on start menu
  gm_mgTeam.mg_strText = "<???>";
  gm_mgTeam.mg_ctMaxStringLen = 25;
  gm_mgTeam.mg_boxOnScreen = BoxPlayerEdit(2.25f);
  gm_mgTeam.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgTeam.mg_iCenterI = -1;
  gm_mgTeam.mg_pmgUp = gm_mgNameField.mg_pmgUp = &gm_mgNumber[0];

  gm_mgTeam.mg_pmgDown = &gm_mgCrosshair;
  gm_mgTeam.mg_pmgRight = &gm_mgModel;
  //gm_mgTeam.mg_strTip = TRANS("teamplay is disabled in this version");
  gm_mgTeam.mg_strTip = TRANS("enter team name, if playing in team");
  gm_lhGadgets.AddTail(gm_mgTeam.mg_lnNode);

  TRIGGER_MG(gm_mgCrosshair, 4.0, gm_mgTeam, gm_mgWeaponSelect, TRANS("CROSSHAIR"), astrCrosshair);
  gm_mgCrosshair.mg_bVisual = TRUE;
  gm_mgCrosshair.mg_boxOnScreen = BoxPlayerSwitch(5.0f);
  gm_mgCrosshair.mg_iCenterI = -1;
  gm_mgCrosshair.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgWeaponSelect, 4.0, gm_mgCrosshair, gm_mgWeaponHide, TRANS("AUTO SELECT WEAPON"), astrWeapon);
  gm_mgWeaponSelect.mg_boxOnScreen = BoxPlayerSwitch(6.0f);
  gm_mgWeaponSelect.mg_iCenterI = -1;
  gm_mgWeaponSelect.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgWeaponHide, 4.0, gm_mgWeaponSelect, gm_mg3rdPerson, TRANS("HIDE WEAPON MODEL"), astrNoYes);
  gm_mgWeaponHide.mg_boxOnScreen = BoxPlayerSwitch(7.0f);
  gm_mgWeaponHide.mg_iCenterI = -1;
  gm_mgWeaponHide.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mg3rdPerson, 4.0, gm_mgWeaponHide, gm_mgQuotes, TRANS("PREFER 3RD PERSON VIEW"), astrNoYes);
  gm_mg3rdPerson.mg_boxOnScreen = BoxPlayerSwitch(8.0f);
  gm_mg3rdPerson.mg_iCenterI = -1;
  gm_mg3rdPerson.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgQuotes, 4.0, gm_mg3rdPerson, gm_mgAutoSave, TRANS("VOICE QUOTES"), astrNoYes);
  gm_mgQuotes.mg_boxOnScreen = BoxPlayerSwitch(9.0f);
  gm_mgQuotes.mg_iCenterI = -1;
  gm_mgQuotes.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgAutoSave, 4.0, gm_mgQuotes, gm_mgCompDoubleClick, TRANS("AUTO SAVE"), astrNoYes);
  gm_mgAutoSave.mg_boxOnScreen = BoxPlayerSwitch(10.0f);
  gm_mgAutoSave.mg_iCenterI = -1;
  gm_mgAutoSave.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgCompDoubleClick, 4.0, gm_mgAutoSave, gm_mgSharpTurning, TRANS("INVOKE COMPUTER"), astrComputerInvoke);
  gm_mgCompDoubleClick.mg_boxOnScreen = BoxPlayerSwitch(11.0f);
  gm_mgCompDoubleClick.mg_iCenterI = -1;
  gm_mgCompDoubleClick.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgSharpTurning, 4.0, gm_mgCompDoubleClick, gm_mgViewBobbing, TRANS("SHARP TURNING"), astrNoYes);
  gm_mgSharpTurning.mg_boxOnScreen = BoxPlayerSwitch(12.0f);
  gm_mgSharpTurning.mg_iCenterI = -1;
  gm_mgSharpTurning.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgViewBobbing, 4.0, gm_mgSharpTurning, gm_mgCustomizeControls, TRANS("VIEW BOBBING"), astrNoYes);
  gm_mgViewBobbing.mg_boxOnScreen = BoxPlayerSwitch(13.0f);
  gm_mgViewBobbing.mg_iCenterI = -1;
  gm_mgViewBobbing.mg_pOnTriggerChange = NULL;

  gm_mgCustomizeControls.mg_strText = TRANS("CUSTOMIZE CONTROLS");
  gm_mgCustomizeControls.mg_boxOnScreen = BoxMediumLeft(14.5f);
  gm_mgCustomizeControls.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgCustomizeControls.mg_iCenterI = -1;
  gm_mgCustomizeControls.mg_pmgUp = &gm_mgViewBobbing;
  gm_mgCustomizeControls.mg_pActivatedFunction = NULL;
  gm_mgCustomizeControls.mg_pmgDown = &gm_mgNumber[0];
  gm_mgCustomizeControls.mg_pmgRight = &gm_mgModel;
  gm_mgCustomizeControls.mg_strTip = TRANS("customize controls for this player");
  gm_lhGadgets.AddTail(gm_mgCustomizeControls.mg_lnNode);

  gm_mgModel.mg_boxOnScreen = BoxPlayerModel();
  gm_mgModel.mg_pmgLeft = &gm_mgNameField;
  gm_mgModel.mg_pActivatedFunction = NULL;
  gm_mgModel.mg_pmgDown = &gm_mgNameField;
  gm_mgModel.mg_pmgLeft = &gm_mgNameField;
  gm_mgModel.mg_strTip = TRANS("change model for this player");
  gm_lhGadgets.AddTail(gm_mgModel.mg_lnNode);
}
コード例 #4
0
void CSelectPlayersMenu::Initialize_t(void)
{
  // intialize split screen menu
  gm_mgTitle.mg_boxOnScreen = BoxTitle();
  gm_mgTitle.mg_strText = TRANS("SELECT PLAYERS");
  gm_lhGadgets.AddTail(gm_mgTitle.mg_lnNode);

  TRIGGER_MG(gm_mgDedicated, 0, gm_mgStart, gm_mgObserver, TRANS("Dedicated:"), astrNoYes);
  gm_mgDedicated.mg_strTip = TRANS("select to start dedicated server");
  gm_mgDedicated.mg_pOnTriggerChange = NULL;

  TRIGGER_MG(gm_mgObserver, 1, gm_mgDedicated, gm_mgSplitScreenCfg, TRANS("Observer:"), astrNoYes);
  gm_mgObserver.mg_strTip = TRANS("select to join in for observing, not for playing");
  gm_mgObserver.mg_pOnTriggerChange = NULL;

  // split screen config trigger
  TRIGGER_MG(gm_mgSplitScreenCfg, 2, gm_mgObserver, gm_mgPlayer0Change, TRANS("Number of players:"), astrSplitScreenRadioTexts);
  gm_mgSplitScreenCfg.mg_strTip = TRANS("choose more than one player to play in split screen");
  gm_mgSplitScreenCfg.mg_pOnTriggerChange = NULL;

  gm_mgPlayer0Change.mg_iCenterI = -1;
  gm_mgPlayer1Change.mg_iCenterI = -1;
  gm_mgPlayer2Change.mg_iCenterI = -1;
  gm_mgPlayer3Change.mg_iCenterI = -1;
  gm_mgPlayer0Change.mg_boxOnScreen = BoxMediumMiddle(4);
  gm_mgPlayer1Change.mg_boxOnScreen = BoxMediumMiddle(5);
  gm_mgPlayer2Change.mg_boxOnScreen = BoxMediumMiddle(6);
  gm_mgPlayer3Change.mg_boxOnScreen = BoxMediumMiddle(7);
  gm_mgPlayer0Change.mg_strTip =
    gm_mgPlayer1Change.mg_strTip =
    gm_mgPlayer2Change.mg_strTip =
    gm_mgPlayer3Change.mg_strTip = TRANS("select profile for this player");
  gm_lhGadgets.AddTail(gm_mgPlayer0Change.mg_lnNode);
  gm_lhGadgets.AddTail(gm_mgPlayer1Change.mg_lnNode);
  gm_lhGadgets.AddTail(gm_mgPlayer2Change.mg_lnNode);
  gm_lhGadgets.AddTail(gm_mgPlayer3Change.mg_lnNode);

  gm_mgNotes.mg_boxOnScreen = BoxMediumRow(9.0);
  gm_mgNotes.mg_bfsFontSize = BFS_MEDIUM;
  gm_mgNotes.mg_iCenterI = -1;
  gm_mgNotes.mg_bEnabled = FALSE;
  gm_mgNotes.mg_bLabel = TRUE;
  gm_lhGadgets.AddTail(gm_mgNotes.mg_lnNode);
  gm_mgNotes.mg_strText = "";

  /*  // options button
  mgSplitOptions.mg_strText = TRANS("Game options");
  mgSplitOptions.mg_boxOnScreen = BoxMediumRow(3);
  mgSplitOptions.mg_bfsFontSize = BFS_MEDIUM;
  mgSplitOptions.mg_iCenterI = 0;
  mgSplitOptions.mg_pmgUp = &mgSplitLevel;
  mgSplitOptions.mg_pmgDown = &mgSplitStartStart;
  mgSplitOptions.mg_strTip = TRANS("adjust game rules");
  mgSplitOptions.mg_pActivatedFunction = &StartGameOptionsFromSplitScreen;
  gm_lhGadgets.AddTail( mgSplitOptions.mg_lnNode);*/

  /*  // start button
  mgSplitStartStart.mg_bfsFontSize = BFS_LARGE;
  mgSplitStartStart.mg_boxOnScreen = BoxBigRow(4);
  mgSplitStartStart.mg_pmgUp = &mgSplitOptions;
  mgSplitStartStart.mg_pmgDown = &mgSplitGameType;
  mgSplitStartStart.mg_strText = TRANS("START");
  gm_lhGadgets.AddTail( mgSplitStartStart.mg_lnNode);
  mgSplitStartStart.mg_pActivatedFunction = &StartSelectPlayersMenuFromSplit;
  */

  ADD_GADGET(gm_mgStart, BoxMediumRow(11), &gm_mgSplitScreenCfg, &gm_mgPlayer0Change, NULL, NULL, TRANS("START"));
  gm_mgStart.mg_bfsFontSize = BFS_LARGE;
  gm_mgStart.mg_iCenterI = 0;
}