예제 #1
0
NamedScript void UpdateOverviewPanel(GUIPanel *OverviewPanel)
{
    //-------------------------
    //Character
    //-------------------------
    
    GUILabels.NameLabel->Text = StrParam("%tS", PlayerNumber() + 1);
    GUILabels.LevelLabel->Text = StrParam("Level: %d", Player.Level);
    GUILabels.XPLabel->Text = StrParam("XP: %ld / %ld", Player.XP, Player.XPNext);
    GUILabels.TitleLabel->Text = StrParam("Title: %S (%d/%d)", Ranks[Player.RankLevel], Player.RankLevel, MAX_RANK);
    GUILabels.RankLabel->Text = StrParam("Rank: %ld / %ld", Player.Rank, Player.RankNext);
    if (Player.PayReady && !Player.PayingOut)
        GUILabels.PPLabel->Text = StrParam("PP: %d (%S) [\C[%S]Ready\C-]", Player.PP, FormatTime(Player.PayTimer), PayReadyColor);
    else
        GUILabels.PPLabel->Text = StrParam("PP: %d (%S)", Player.PP, FormatTime(Player.PayTimer));
    
    //-------------------------
    //Inventory
    //-------------------------
    
    GUILabels.ModuleLabel->Text = StrParam("%d", CheckInventory("DRPGModule"));
    GUILabels.TurretPartsLabel->Text = StrParam("%d", CheckInventory("DRPGTurretPart"));
    GUILabels.AugChargeLabel->Text = StrParam("%d%% / %d%%", (int)Player.Augs.Battery, (int)Player.Augs.BatteryMax);
    GUILabels.AugSlotsLabel->Text = StrParam("%d / %d", Player.Augs.SlotsUsed, Player.Augs.Slots);
    GUILabels.AugUpgradesLabel->Text = StrParam("%d / %d", CheckInventory("DRPGAugCanister"), CheckInventory("DRPGAugUpgradeCanister"));
    GUILabels.StimsLabel->Text = StrParam("S: %d\nM: %d\nL: %d\nXL: %d", CheckInventory("DRPGStimSmall"), CheckInventory("DRPGStimMedium"), CheckInventory("DRPGStimLarge"), CheckInventory("DRPGStimXL"));
    GUILabels.ChipsGoldLabel->Text = StrParam("%d", CheckInventory("DRPGChipGold"));
    GUILabels.ChipsPlatLabel->Text = StrParam("%d", CheckInventory("DRPGChipPlatinum"));
    GUILabels.InventoryLabel->Text = StrParam("Inventory: %d / %d\n\CaBullets: %d / %d\n\CiShells: %d / %d\n\CcRockets: %d / %d\n\CdCells: %d / %d",
                                    Player.InvItems, CheckInventoryMax(),
                                    CheckInventory("Clip"), GetAmmoCapacity("Clip"),
                                    CheckInventory("Shell"), GetAmmoCapacity("Shell"),
                                    CheckInventory("RocketAmmo"), GetAmmoCapacity("RocketAmmo"),
                                    CheckInventory("Cell"), GetAmmoCapacity("Cell"));


    //-----------------------------
    //DRLA Inventory
    //
    
    if (CompatMode == COMPAT_DRLA)
    {
        int IsTechnician = (PlayerClass(PlayerNumber()) == 2);
        int Weapons = CheckInventory("RLWeaponLimit");
        int Armors = CheckInventory("RLArmorInInventory");
        int ModPacks = (IsTechnician ? CheckInventory("RLScavengerModLimit") : CheckInventory("RLModLimit"));
        int Skulls = CheckInventory("RLSkullLimit");
        int Devices = CheckInventory("RLPhaseDeviceLimit");
        
        GUILabels.DRLALabel->Text = StrParam("DRLA Inventory:\n%SWeapons: %d / 6\n%SArmor: %d / %d\n%SModpacks: %d / %d\n%SSkulls: %d / %d\n%SDevices: %d / %d",
            (Weapons >= 6 ? "\Cf" : "\Ca"), Weapons,
            (Armors >= DRLA_ARMOR_MAX ? "\Cf" : "\Cd"), Armors, DRLA_ARMOR_MAX,
            (((!IsTechnician && ModPacks >= 4) || (IsTechnician && ModPacks >= 8)) ? "\Cf" : "\Cc"),
            ModPacks, (IsTechnician ? 8 : 4),
            (Skulls >= DRLA_SKULL_MAX ? "\Cf" : "\Cr"), Skulls, DRLA_SKULL_MAX,
            (Devices >= DRLA_DEVICE_MAX ? "\Cf" : "\Ct"), Devices, DRLA_DEVICE_MAX);
    }
예제 #2
0
// Open the Shop
NamedScript KeyBind void OpenShop(bool OpenLocker)
{
    // If you're dead, return
    if (GetActorProperty(0, APROP_Health) <= 0) return;

    // If you're in an Outpost menu, return
    if (Player.OutpostMenu > 0) return;

    // If you're in any minigames, return
    if (Player.InMinigame) return;

    // If you're looking inside a crate, return
    if (Player.CrateOpen) return;

    // Close the main menu if it's open
    Player.InMenu = false;

    // Sanity check for pressing use while the shop is open in front of the counter in the Outpost
    if (Player.InShop && CheckInput(BT_USE, KEY_HELD, false, PlayerNumber())) return;

    if (Player.InShop)
    {
        ActivatorSound("menu/leave", 127);
        SetPlayerProperty(0, 0, PROP_TOTALLYFROZEN);
        Player.InShop = false;
    }
    else
    {
        ActivatorSound("menu/shop", 127);
        Player.InShop = true;
        if (OpenLocker)
            Player.LockerMode = true;
    }
}
예제 #3
0
script GRAPPLE_REEL (int grappleTid, int strength, int firetype)
{
    int nX;   int nY;   int nZ;
    int plX;  int plY;  int plZ;
    int vX;   int vY;   int vZ;
    int velX; int velY; int velZ;

    int breakLoop = false;

    int magnitude;

    int pln = PlayerNumber();
    int playerTid = ActivatorTID();

    if (playerTid == 0) // can we give him a TID without breaking anything?
    {
        playerTid = unusedTID(TIDSTART, -1);
        Thing_ChangeTID(0, playerTid);
    }

    // if not, then okay, just use the one he has already

    int grX = GetActorX(grappleTid);
    int grY = GetActorY(grappleTid);
    int grZ = GetActorZ(grappleTid);

    while (!breakLoop)
    {
        if (ThingCount(0, grappleTID) != 1)
        {
            break;
        }
        
        plX  = GetActorX(0);    plY  = GetActorY(0);    plZ  = GetActorZ(0);
        vX   = grX - plX;       vY   = grY - plY;       vZ   = grZ - plZ;

        // NOTE: I had to drop precision here in exchange for not overflowing
        magnitude = magnitudeThree(vX >> 16, vY >> 16, vZ >> 16);

        if (magnitude != 0)
        {
            nX = vX / magnitude; nY = vY / magnitude; nZ = vZ / magnitude;
            ACS_ExecuteAlways(GRAPPLE_DRAWLINE, 0, grappleTid, playerTid, 16);
        }
        else
        {
            nX = 0; nY = 0; nZ = 0;
        }

        SetActorVelocity(0, nX*strength, nY*strength, nZ*strength, true, true);

        if (CheckInventory("Grappling") == 0)
            { breakLoop = true; }

        Delay(1);
    }

    Thing_Remove(grappleTid);
}
예제 #4
0
script GETFIRERPLN (void)
{
    int switchWorked = SetActivatorToTarget(0);

    if (switchWorked)
    {
        SetResultValue( PlayerNumber() );
    }
    else
    {
        SetResultValue(-1);
    }
}
void ScreenOptionsMaster::Init()
{
	ScreenOptions::Init();

	// make sure volume is set to full in options, and menu lights are on
	ScreenAttract::SetAttractVolume( false );
	LIGHTSMAN->SetLightsMode( LIGHTSMODE_MENU );

	CStringArray asLineNames;
	split( LINE_NAMES, ",", asLineNames );
	if( asLineNames.empty() )
		RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() );


	CStringArray Flags;
	split( OPTION_MENU_FLAGS, ";", Flags, true );
	InputMode im = INPUTMODE_INDIVIDUAL;
	
	for( unsigned i = 0; i < Flags.size(); ++i )
	{
		CString sFlag = Flags[i];
		sFlag.MakeLower();

		if( sFlag == "together" )
			im = INPUTMODE_SHARE_CURSOR;
		else if( sFlag == "explanations" )
			;
		else if( sFlag == "forceallplayers" )
		{
			FOREACH_PlayerNumber( pn )
				GAMESTATE->m_bSideIsJoined[pn] = true;
			GAMESTATE->m_MasterPlayerNumber = PlayerNumber(0);
		}
		else if( sFlag == "smnavigation" )
			SetNavigation( NAV_THREE_KEY_MENU );
		else if( sFlag == "toggle" || sFlag == "firstchoicegoesdown" )
			SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY );
		else
			RageException::Throw( "Unknown flag \"%s\"", sFlag.c_str() );
	}

	vector<OptionRowDefinition> OptionRowDefs;
	OptionRowDefs.resize( asLineNames.size() );
	OptionRowHandlers.resize( asLineNames.size() );
	for( unsigned i = 0; i < asLineNames.size(); ++i )
	{
		CString sLineName = asLineNames[i];
		OptionRowDefinition &def = OptionRowDefs[i];
		CString sRowCommands = LINE(sLineName);
		OptionRowHandler* &pHand = OptionRowHandlers[i];
		pHand = NULL;
		
		Commands vCommands;
		ParseCommands( sRowCommands, vCommands );
		if( vCommands.v.size() != 1 )
			RageException::Throw( "Parse error in %s::Line%s", m_sName.c_str(), sLineName.c_str() );

		Command& command = vCommands.v[0];
		pHand = OptionRowHandlerUtil::Make( command, def );
		if( pHand == NULL )
            RageException::Throw( "Invalid OptionRowHandler '%s' in %s::%s", command.GetOriginalCommandString().c_str(), m_sName.c_str(), sLineName.c_str() );
	}

	ASSERT( OptionRowHandlers.size() == asLineNames.size() );

	InitMenu( im, OptionRowDefs, OptionRowHandlers );
}
예제 #6
0
#library "buttship"

#include "commonFuncs.h"

// Pretty much this entire thing was coded by ijon tichy.
// Yes, including the comments.

// Clearly this work is wasted on me. The project should be given to him.

int CL_ShipTIDs[PLAYERMAX];     // BUTT SHIP TIDS SON
int CL_ShipScripts[PLAYERMAX];  // WE TWERKING THE SEVEN SEAS YET
int CL_PlayerTIDS[PLAYERMAX];   // duh

script 173 (void)//enter
{
    int pln = PlayerNumber();
    int tid;
    int time = 0;

    while (1)
    {
        if (!isDead(0)) { tid = defaultTID(-1); }

        if (time % 18 == 0)
        {
            ACS_ExecuteAlways(174, 0, 0, tid);
            time %= 18;
        }

        time++;
        Delay(1);
예제 #7
0
script SAMSARA_DECORATE (int choice, int arg1, int arg2)
{
    int clipcount;
    int result;
    int i, j, k;
    int x, y, z;
    int armorIndex, armorToSet;
    int pln = PlayerNumber();
    
    switch (choice)
    {
      case 1:
        result = GetActorProperty(0, APROP_Dropped);
        break;
        
      case 2:
        if (CheckInventory("WolfenMovement") == 1) { SetActorState(0, "Spawn"); }
        break;
        
      case 3:
        result = !(GetCVar("sv_itemrespawn") || GetCVar("sv_weaponstay"));
        break;
        
      case 4:
        result = isInvasion() || !(isCoop() || isSinglePlayer());
        break;

      case 5:
        SetActivatorToTarget(0);
        result = CheckInventory("Cell");
        if (arg1) { TakeInventory("Cell", result); }
        break;

      case 6:
        result = GetCVar("skulltag");
        break;
      
      case 7:
        if (arg2 != 1)
        {
            GiveQuad(arg1);
        }
        else
        {
            if (isLMS())
            {
                if (GetCvar("samsara_permaquad") == 1)
                { GiveInventory("QuadDamageItem", 1); }
                break;
            }

            GiveQuad(arg1);

            if (GetCvar("samsara_permaquad") == 1)//if (isCoop() || isSinglePlayer())
            { GiveInventory("QuadDamageItem", 1); }
        }
        break;

      case 8:
        result = defaultCVar("samsara_cl_expparticles", 0);
        if (!result) { result = 100; }

        result = max(0, result);

        result *= max(arg1, 1);
        result /= max(arg2, 1);

        GiveInventory("QuakeExplosionCounter", result);
        break;

      case 9:
        clipcount = CheckInventory("Clip");

        if (clipcount < 50)
        {
            GiveInventory("Clip", 50 - clipcount);
            TakeInventory("Clip", CheckInventory("Clip") - 50);
            result = 1;
        }
        break;

      case 10:
        TakeInventory("QuakeExplosionCounter", arg1);
        result = CheckInventory("QuakeExplosionCounter");
        break;

      case 15:
        SetActorProperty(0, APROP_Speed, percFloat(arg1, arg2));
        break;
        
      case 16:
        if (GameType () != GAME_SINGLE_PLAYER)
        {
            SetHudSize(400, 300, 0);
            Hudmessage(s:"Press any button to respawn.";
            HUDMSG_PLAIN,1,CR_LIGHTBLUE,200.4,9.1,1.75);
            delay(15);

            if (!CheckInventory("DukeBallgag"))
            {
                LocalAmbientSound("duke/mpdeath",127);
                GiveInventory("DukeTauntCooldown",5);
                ACS_ExecuteAlways(205,0,0);
            }
        }
        break;

      case 17:
        if (arg1) { result = GetCVar("samsara_permault"); }
        else { result = GetCVar("sv_weaponstay"); }
        break;

      case 18:
        if (MapArmors[0] == -1) { CheckMapArmors(); }
        SetArmorMode();

        i = Timer() != 0;

        if (MapArmors[ARMOR_YELLOW] == 1) { i += 2; }

        SetActorState(0, ArmorModeStates[ArmorMode][i]);
        break;

      case 19:
        result = isLMS();
        break;

      case 20:
        SetArmorMode();

        armorIndex = -1;
        armorToSet = arg1;

        for (i = 0; i < ARMORCOUNT; i++)
        {
            if (GetArmorType(ArmorItems[ArmorMode][i][0], pln))
            {
                armorIndex = i;
                break;
            }
        }

        arg1 = middle(0, arg1, ARMORCOUNT-1);
        i = CheckInventory("Armor");
        j = ArmorItems[ArmorMode][arg1][1];

        if (j == 0) { result = 0; break; }


        /* If we're adding armor, always follow through
           Else, if the ending armor count is lower than the current armor count
           and we're not upgrading our armor, give up now */

        if (arg2 > 0)
        {
            if (arg1 <= armorIndex) { armorToSet = armorIndex; }
        }
        else if (((arg2 == 0 && i > j) || (arg2 < 0 && i > -arg2)) && (arg1 <= armorIndex))
        {
            result = 0;
            break;
        }

        if (arg2 <= 0)
        {
            TakeInventory("BasicArmor", i);
            GiveInventory(ArmorItems[ArmorMode][armorToSet][0], 1);

            k = CheckInventory("Armor");

            if (arg2 == 0) { break; }

            TakeInventory("BasicArmor", k-1);
            GiveInventory("InfiniteArmorBonus", -arg2 - 1);
        }
        else
        {
            TakeInventory("BasicArmor", i);
            GiveInventory(ArmorItems[ArmorMode][armorToSet][0], 1);

            k = CheckInventory("Armor");
            TakeInventory("BasicArmor", k-1);

            GiveInventory("InfiniteArmorBonus", (i + arg2) - 1);
        }

        result = 1;
        break;

      case 21:
        i = CheckInventory("Armor");
        if (i < arg1) { result = 0; break; }

        TakeInventory("BasicArmor", i-arg1);
        result = 1;
        break;

      case 22:
        result = GetCVar("samsara_nohealthcap");
        break;

      case 23:
        GiveInventory("TimeBombPause", 1);
        Delay(arg1);
        TakeInventory("TimeBombPause", 1);
        break;

      case 24:
        result = GetCVar("samsara_noult");
        break;

      case 25:
        if (GameType() == GAME_NET_COOPERATIVE)
		{ AmbientSound("quake/invisannouncer",127); }
		else
		{ LocalAmbientSound("quake/invisannouncer",127); }
        break;
		
	  case 26:
	    if (CheckInventory("PowerInvisibility") == 0)
		{ GiveInventory("PowerInvisibility",1); }
		else
		{ TakeInventory("PowerInvisibility",1); 
		delay(1);
		GiveInventory("PowerShadow",1);
		delay(1);
		GiveInventory("PowerShadow",1); }
	    break;

      case 27:
        result = GetCVar("samsara_nounique");
        break;

      case 28:
        result = GetCVar("samsara_noinvuln");
        break;

      case 29:
        result = GetCVar("instagib");
        break;

      case 30:
        result = GetCVar("samsara_cl_bloodyhell");
        break;

      case 31:
        result = GetCVar("samsara_cl_bloodypersistent");
        break;

      case 32:
        result = GetCVar("samsara_nohealth");
        break;

      case 33:
        result = GetCVar("samsara_vanillaquake");
        break;
    }
예제 #8
0
NamedScript void ShopItemAutoHandler()
{
    bool ItemsCurrent = false;
    bool ButtonHeld = false;
    // These are actually too big for the script auto handler to allocate properly, so they need to be static-scope here.
    RPGMap static int Items[ITEM_CATEGORIES][ITEM_MAX];
    RPGMap static int PrevItems[ITEM_CATEGORIES][ITEM_MAX];

    UpdateShopAutoList();

    while (true)
    {
        // Auto-Sell/Store doesn't need to run constantly like run-pickup does.
        if (!GetActivatorCVar("drpg_pickup_behavior")) Delay(5);

        // Auto-Sell
        bool CanSellItems = Player.RankLevel > 0 || CurrentLevel->UACBase;
        bool UseAutoDepositFallback = GetActivatorCVar("drpg_autosell_lockerfallback");
        if (CanSellItems || UseAutoDepositFallback)
            for (int i = 0; i < Player.AutoSellList.Position; i++)
            {
                ItemInfoPtr Item = ((ItemInfoPtr *)Player.AutoSellList.Data)[i];
                int Quantity = CheckInventory(Item->Actor);

                // Keep
                if (Player.ItemKeep[Item->Category][Item->Index])
                    Quantity--;

                if (Quantity > 0 && !(Player.Mission.Active && Player.Mission.Type == MT_COLLECT && !StrCmp(Player.Mission.Item->Actor, Item->Actor)))
                {
                    if (CanSellItems)
                        SellItem(Item->Actor, Quantity, true);
                    else if (UseAutoDepositFallback)
                        ShopItemTryAutoDeposit(Item);
                }
            }

        // Auto-Store
        if (Player.EP >= LOCKER_EPRATE || CurrentLevel->UACBase)
            for (int i = 0; i < Player.AutoStoreList.Position; i++)
            {
                ItemInfoPtr Item = ((ItemInfoPtr *)Player.AutoStoreList.Data)[i];

                if (CheckInventory(Item->Actor) > 0)
                    ShopItemTryAutoDeposit(Item);
            }

        // Run-pickup.
        if (GetActivatorCVar("drpg_pickup_behavior"))
        {
            // Get input.
            ButtonHeld = CheckInput(BT_SPEED, KEY_HELD, false, PlayerNumber());

            // For post-checks
            if (ButtonHeld)
                for (int i = 0; i < ItemCategories; i++)
                    for (int j = 0; j < ItemMax[i]; j++)
                        Items[i][j] = CheckInventory(ItemData[i][j].Actor);

            // Run-pickup behavior stuff
            if (ItemsCurrent && ButtonHeld)
            {
                for (int i = 0; i < ItemCategories; i++)
                    for (int j = 0; j < ItemMax[i]; j++)
                    {
                        ItemInfoPtr Item = &ItemData[i][j];

                        // Auto-Sell
                        if (!Player.InShop && GetActivatorCVar("drpg_pickup_behavior") == 1 && Items[i][j] > PrevItems[i][j])
                            if (CheckInventory(Item->Actor) > 0)
                                SellItem(Item->Actor, true, true);

                        // Auto-Store
                        if (!Player.InShop && GetActivatorCVar("drpg_pickup_behavior") == 2 && Items[i][j] > PrevItems[i][j])
                            ShopItemTryAutoDeposit(Item);
                    }
            }

            // Run-pickup has to run constantly or it might miss what the player ran over.
            Delay(1);

            // Prevent using old Items so we don't sell recently picked up stuff.
            if (!ButtonHeld)
                ItemsCurrent = false;

            if (ButtonHeld)
                ItemsCurrent = true;
            for (int i = 0; i < ItemCategories; i++)
                for (int j = 0; j < ItemMax[i]; j++)
                    PrevItems[i][j] = Items[i][j];
        }
    }
}
예제 #9
0
파일: Arena.c 프로젝트: subenji/DoomRPG
// Arena Script
NamedScript MapSpecial void ArenaLoop()
{
    int BonusRandomizer, Buttons, OldButtons;
    bool Ready;
    ArenaSetEnvironment(AEVENT_NONE);
    
    // Arena Loop
    while (true)
    {
        // Stop the script if the Arena is stopped or the Arena activator dies
        if (!ArenaActive || ClassifyActor(Players(ArenaPlayerNumber).TID) & ACTOR_DEAD)
        {
            ArenaStop();
            return;
        }
        
        // Arena HUD
        ArenaDrawHUD();
        
        // Arena Status Handling
        if (ArenaState == ARENA_INTERMISSION)
        {
            BonusRandomizer = Random(-10, ABONUS_MAX - 1);

            ArenaMod = -1;
            ArenaGetBonus(BonusRandomizer);
            ArenaSetEnvironment(AEVENT_NONE);
            ArenaState = ARENA_WAITING;
        }
        else if (ArenaState == ARENA_WAITING)
        {
            Buttons = GetPlayerInput(ArenaPlayerNumber, INPUT_BUTTONS);
            OldButtons = GetPlayerInput(ArenaPlayerNumber, INPUT_OLDBUTTONS);
            Ready = true;
            
            SetHudSize(0, 0, false);
            SetFont("BIGFONT");
            
            if (ArenaPlayerNumber == PlayerNumber())
            {
                if (!Player.InMenu && !Player.InShop && !Player.OutpostMenu)
                {
                    HudMessage("Press \Cd%jS\C- to start the next wave\nPress \Cd%jS\C- to exit the Arena", "+use" , "+speed");
                    EndHudMessage(HUDMSG_PLAIN, 0, "White", 1.5, 0.75, 0.05);
                }
                
                if (Buttons & BT_USE && (!Player.InMenu && !Player.InShop && !Player.OutpostMenu && !Player.CrateOpen) && !Player.MenuBlock)
                {
                    // Check to see if others are still in the menu
                    for (int i = 0; i < MAX_PLAYERS; i++)
                        if (Players(i).InMenu || Players(i).InShop)
                            Ready = false;
                    
                    if (Ready)
                    {
                        ArenaKeyTimer++;
                        ArenaKeyTimerType = AKTIMER_CONTINUE;
                        if (ArenaKeyTimer > ARENA_HOLDTIME)
                        {
                            // Multiplayer Countdown
                            if (InMultiplayer)
                            {
                                SetFont("BIGFONT");
                                for (int i = 3; i > 0; i--)
                                {
                                    HudMessage("%d", i);
                                    EndHudMessageBold(HUDMSG_FADEOUT, 0, "Green", 0.5, 0.5, 0.25, 0.75);
                                    Delay(35);
                                }
                            }
                            
                            ArenaWave++;
                            ArenaState = ARENA_READY;
                        }
                    }
                    else
                    {
                        PrintError("Someone is currently in a menu");
                        ActivatorSound("menu/error", 127);
                    }
                }
                else if (Buttons & BT_SPEED && (!Player.InMenu && !Player.InShop && !Player.OutpostMenu && !Player.CrateOpen))
                {
                    ArenaKeyTimer++;
                    ArenaKeyTimerType = AKTIMER_STOP;
                    if (ArenaKeyTimer > ARENA_HOLDTIME)
                    {
                        ArenaStop();
                        return;
                    }
                }
                else
                    ArenaKeyTimer = 0;
                
                // Reset menu block
                if (Buttons == 0 && OldButtons == 0)
                    Player.MenuBlock = false;
            }
        }
예제 #10
0
ScreenOptionsMaster::ScreenOptionsMaster( const CString &sClassName ):
	ScreenOptions( sClassName )
{
	LOG->Trace("ScreenOptionsMaster::ScreenOptionsMaster(%s)", m_sName.c_str() );

	/* If this file doesn't exist, leave the music alone (eg. ScreenPlayerOptions music sample
	 * left over from ScreenSelectMusic).  If you really want to play no music, add a redir
	 * to _silent. */
	CString MusicPath = THEME->GetPathToS( ssprintf("%s music", m_sName.c_str()), true );
	if( MusicPath != "" )
		SOUND->PlayMusic( MusicPath );

	CStringArray asLineNames;
	split( LINE_NAMES, ",", asLineNames );
	if( asLineNames.empty() )
		RageException::Throw( "%s::LineNames is empty.", m_sName.c_str() );


	CStringArray Flags;
	split( OPTION_MENU_FLAGS, ";", Flags, true );
	InputMode im = INPUTMODE_INDIVIDUAL;
	bool Explanations = false;
	
	unsigned i;
	for( i = 0; i < Flags.size(); ++i )
	{
		CString &flag = Flags[i];
		flag.MakeLower();

		if( flag == "together" )
			im = INPUTMODE_SHARE_CURSOR;
		else if( flag == "explanations" )
			Explanations = true;
		else if( flag == "forceallplayers" )
		{
			FOREACH_PlayerNumber( pn )
				GAMESTATE->m_bSideIsJoined[pn] = true;
			GAMESTATE->m_MasterPlayerNumber = PlayerNumber(0);
		}
		else if( flag == "smnavigation" )
			SetNavigation( NAV_THREE_KEY_MENU );
		else if( flag == "toggle" || flag == "firstchoicegoesdown" )
			SetNavigation( PREFSMAN->m_bArcadeOptionsNavigation? NAV_TOGGLE_THREE_KEY:NAV_TOGGLE_FIVE_KEY );
	}

	m_OptionRowAlloc = new OptionRowData[asLineNames.size()];
	for( i = 0; i < asLineNames.size(); ++i )
	{
		OptionRowData &row = m_OptionRowAlloc[i];
		
		vector<ParsedCommand> vCommands;
		ParseCommands( LINE(asLineNames[i]), vCommands );
		
		if( vCommands.size() < 1 )
			RageException::Throw( "Parse error in %s::Line%i", m_sName.c_str(), i+1 );

		OptionRowHandler hand;
		for( unsigned part = 0; part < vCommands.size(); ++part)
		{
			ParsedCommand& command = vCommands[part];

			HandleParams;

			const CString name = sParam(0);

			if( !name.CompareNoCase("list") )
			{
				SetList( row, hand, sParam(1), row.name );
			}
			else if( !name.CompareNoCase("steps") )
			{
				SetStep( row, hand );
				row.name = "Steps";
			}
			else if( !name.CompareNoCase("conf") )
			{
				SetConf( row, hand, sParam(1), row.name );
			}
			else if( !name.CompareNoCase("characters") )
			{
				SetCharacter( row, hand );
				row.name = "Characters";
			}
			else
				RageException::Throw( "Unexpected type '%s' in %s::Line%i", name.c_str(), m_sName.c_str(), i );

			CheckHandledParams;
		}

		// TRICKY:  Insert a down arrow as the first choice in the row.
		if( m_OptionsNavigation == NAV_TOGGLE_THREE_KEY )
		{
			row.choices.insert( row.choices.begin(), ENTRY_NAME("NextRow") );
			hand.ListEntries.insert( hand.ListEntries.begin(), ModeChoice() );
		}

		OptionRowHandlers.push_back( hand );
	}

	ASSERT( OptionRowHandlers.size() == asLineNames.size() );

	Init( im, m_OptionRowAlloc, asLineNames.size() );
}
예제 #11
0
NamedScript void CreateOverviewPanel()
{
    GUIPanel *OverviewPanel = GUICreatePanel();
    Player.GUI.TabStrip.Tabs[PANEL_MAIN].Panel = OverviewPanel;
    
    OverviewPanel->Update = (PanelUpdateFunc)UpdateOverviewPanel;
    OverviewPanel->Close = (PanelCloseFunc)CloseOverviewPanel;
    
    int GUIElementID = GUI_CONTENTS_ID;
    
    // --------------------------------------------------
    // Player Sprite
    //
    
    str PlayerSprite = "PLAYA1";
    
    GUIIcons.PlayerSpriteIcon = GUIAddIcon(OverviewPanel, "Player Sprite");
    
    if (CompatMode == COMPAT_DRLA)
    {
        if (PlayerClass(PlayerNumber()) == 0) // Marine
            PlayerSprite = "PMARA1";
        if (PlayerClass(PlayerNumber()) == 1) // Scout
            PlayerSprite = "PSCOA1";
        if (PlayerClass(PlayerNumber()) == 2) // Technician
            PlayerSprite = "PTECA1";
        if (PlayerClass(PlayerNumber()) == 3) // Renegade
            PlayerSprite = "PRENA1";
        if (PlayerClass(PlayerNumber()) == 4) // Demolitionist
            PlayerSprite = "PDMOA1";
    }
    
    GUIIcons.PlayerSpriteIcon->Texture = PlayerSprite;
    GUIIcons.PlayerSpriteIcon->Control.X = 16;
    GUIIcons.PlayerSpriteIcon->Control.Y = 40;
    GUIIcons.PlayerSpriteIcon->Control.id = ++GUIElementID;
    
    // --------------------------------------------------
    // Player Info
    //
    
    GUILabels.NameLabel = GUIAddLabel(OverviewPanel, "Player Name");
    GUILabels.LevelLabel = GUIAddLabel(OverviewPanel, "Player Level");
    GUILabels.XPLabel = GUIAddLabel(OverviewPanel, "Player XP");
    GUILabels.TitleLabel = GUIAddLabel(OverviewPanel, "Player Rank Title");
    GUILabels.RankLabel = GUIAddLabel(OverviewPanel, "Player Rank");
    GUILabels.PPLabel = GUIAddLabel(OverviewPanel, "Player Payout Status");
    
    GUILabels.NameLabel->Control.X = 64;
    GUILabels.NameLabel->Control.Y = 16;
    GUILabels.NameLabel->Control.id = ++GUIElementID;
    GUILabels.NameLabel->Color = "White";
    GUILabels.NameLabel->Big = true;
    
    GUILabels.LevelLabel->Control.X = 64;
    GUILabels.LevelLabel->Control.Y = 28;
    GUILabels.LevelLabel->Control.id = ++GUIElementID;
    GUILabels.LevelLabel->Color = "White";
    GUILabels.LevelLabel->Big = true;
    
    GUILabels.XPLabel->Control.X = 64;
    GUILabels.XPLabel->Control.Y = 40;
    GUILabels.XPLabel->Control.id = ++GUIElementID;
    GUILabels.XPLabel->Color = "White";
    GUILabels.XPLabel->Big = true;
    
    GUILabels.TitleLabel->Control.X = 64;
    GUILabels.TitleLabel->Control.Y = 52;
    GUILabels.TitleLabel->Control.id = ++GUIElementID;
    GUILabels.TitleLabel->Color = "Yellow";
    GUILabels.TitleLabel->Big = true;
    
    GUILabels.RankLabel->Control.X = 64;
    GUILabels.RankLabel->Control.Y = 64;
    GUILabels.RankLabel->Control.id = ++GUIElementID;
    GUILabels.RankLabel->Color = "Yellow";
    GUILabels.RankLabel->Big = true;
    
    GUILabels.PPLabel->Control.X = 64;
    GUILabels.PPLabel->Control.Y = 76;
    GUILabels.PPLabel->Control.id = ++GUIElementID;
    GUILabels.PPLabel->Color = "Gold";
    GUILabels.PPLabel->Big = true;
    
    // --------------------------------------------------
    // Totals
    //
    
    
    GUIIcons.ModuleIcon = GUIAddIcon(OverviewPanel, "Module Icon");
    GUIIcons.TurretPartsIcon = GUIAddIcon(OverviewPanel, "Turret Parts Icon");
    GUIIcons.AugChargeIcon = GUIAddIcon(OverviewPanel, "Aug Charge icon");
    GUIIcons.AugSlotsIcon = GUIAddIcon(OverviewPanel, "Aug Slots Icon");
    GUIIcons.AugCanistersIcon = GUIAddIcon(OverviewPanel, "Aug Canisters Icon");
    GUIIcons.AugUpgradesIcon = GUIAddIcon(OverviewPanel, "Aug Upgrades Icon");
    GUIIcons.StimsIcon = GUIAddIcon(OverviewPanel, "Stims Icon");
    GUIIcons.ChipsGoldIcon = GUIAddIcon(OverviewPanel, "Gold Chips Icon");
    GUIIcons.ChipsPlatIcon = GUIAddIcon(OverviewPanel, "Platinum Chips Icon");
    GUIIcons.InventoryIcon = GUIAddIcon(OverviewPanel, "Inventory Icon");
    
    GUILabels.ModuleLabel = GUIAddLabel(OverviewPanel, "Module Count");
    GUILabels.TurretPartsLabel = GUIAddLabel(OverviewPanel, "Turret Part Count");
    GUILabels.AugChargeLabel = GUIAddLabel(OverviewPanel, "Aug Charge");
    GUILabels.AugSlotsLabel = GUIAddLabel(OverviewPanel, "Aug Slots");
    GUILabels.AugUpgradesLabel = GUIAddLabel(OverviewPanel, "Aug Upgrades");
    GUILabels.StimsLabel = GUIAddLabel(OverviewPanel, "Stim Counts");
    GUILabels.ChipsGoldLabel = GUIAddLabel(OverviewPanel, "Gold Chip Count");
    GUILabels.ChipsPlatLabel = GUIAddLabel(OverviewPanel, "Platinum Chip Count");
    GUILabels.InventoryLabel = GUIAddLabel(OverviewPanel, "Inventory Count");
    
    if (CompatMode == COMPAT_DRLA)
    {
        GUIIcons.DRLAWeaponIcon = GUIAddIcon(OverviewPanel, "DRLA Weapon Icon");
        GUIIcons.DRLAArmorIcon = GUIAddIcon(OverviewPanel, "DRLA Armor Icon");
        GUIIcons.DRLAModpackIcon = GUIAddIcon(OverviewPanel, "DRLA Modpack Icon");
        GUIIcons.DRLASkullIcon = GUIAddIcon(OverviewPanel, "DRLA Skull Icon");
        GUIIcons.DRLADeviceIcon = GUIAddIcon(OverviewPanel, "DRLA Device Icon");
        
        GUILabels.DRLALabel = GUIAddLabel(OverviewPanel, "DRLA Label");
        
        GUIIcons.DRLAWeaponIcon->Texture = "PISGX0";
        GUIIcons.DRLAWeaponIcon->Control.X = 14 - 4;
        GUIIcons.DRLAWeaponIcon->Control.Y = 466 - 16;
        GUIIcons.DRLAWeaponIcon->Control.id = ++GUIElementID;
        
        GUIIcons.DRLAArmorIcon->Texture = "HARMOR";
        GUIIcons.DRLAArmorIcon->Control.X = 44 - 16;
        GUIIcons.DRLAArmorIcon->Control.Y = 468 - 30;
        GUIIcons.DRLAArmorIcon->Control.id = ++GUIElementID;
        
        GUIIcons.DRLAModpackIcon->Texture = "GMODICON";
        GUIIcons.DRLAModpackIcon->Control.X = 18 - 16;
        GUIIcons.DRLAModpackIcon->Control.Y = 488 - 30;
        GUIIcons.DRLAModpackIcon->Control.id = ++GUIElementID;
        
        GUIIcons.DRLASkullIcon->Texture = "ISKLC0";
        GUIIcons.DRLASkullIcon->Control.X = 44 - 6;
        GUIIcons.DRLASkullIcon->Control.Y = 486 - 10;
        GUIIcons.DRLASkullIcon->Control.id = ++GUIElementID;
        
        GUIIcons.DRLADeviceIcon->Texture = "PHS1I0";
        GUIIcons.DRLADeviceIcon->Control.X = 32 - 24;
        GUIIcons.DRLADeviceIcon->Control.Y = 506 - 30;
        GUIIcons.DRLADeviceIcon->Control.id = ++GUIElementID;
        
        GUILabels.DRLALabel->Control.X = 84;
        GUILabels.DRLALabel->Control.Y = 500;
        GUILabels.DRLALabel->Control.id = ++GUIElementID;
        GUILabels.DRLALabel->Color = "White";
        GUILabels.DRLALabel->Big = true;
    }
    
    GUIIcons.ModuleIcon->Texture = "UMODA0";
    GUIIcons.ModuleIcon->Control.X = 24;
    GUIIcons.ModuleIcon->Control.Y = 96;
    GUIIcons.ModuleIcon->Control.id = ++GUIElementID;
    
    GUIIcons.TurretPartsIcon->Texture = "TPRTA0";
    GUIIcons.TurretPartsIcon->Control.X = 24;
    GUIIcons.TurretPartsIcon->Control.Y = 128;
    GUIIcons.TurretPartsIcon->Control.id = ++GUIElementID;
    
    GUIIcons.AugChargeIcon->Texture = "AUGBATT";
    GUIIcons.AugChargeIcon->Control.X = 24;
    GUIIcons.AugChargeIcon->Control.Y = 148;
    GUIIcons.AugChargeIcon->Control.id = ++GUIElementID;
    
    GUIIcons.AugSlotsIcon->Texture = "AUGUB0";
    GUIIcons.AugSlotsIcon->Control.X = 24;
    GUIIcons.AugSlotsIcon->Control.Y = 178;
    GUIIcons.AugSlotsIcon->Control.id = ++GUIElementID;
    
    GUIIcons.AugCanistersIcon->Texture = "AUGCA0";
    GUIIcons.AugCanistersIcon->Control.X = 16;
    GUIIcons.AugCanistersIcon->Control.Y = 204;
    GUIIcons.AugCanistersIcon->Control.id = ++GUIElementID;
    
    GUIIcons.AugUpgradesIcon->Texture = "AUGUA0";
    GUIIcons.AugUpgradesIcon->Control.X = 32;
    GUIIcons.AugUpgradesIcon->Control.Y = 198;
    GUIIcons.AugUpgradesIcon->Control.id = ++GUIElementID;
    
    GUIIcons.StimsIcon->Texture = "STIMB0";
    GUIIcons.StimsIcon->Control.X = 24;
    GUIIcons.StimsIcon->Control.Y = 248;
    GUIIcons.StimsIcon->Control.id = ++GUIElementID;
    
    GUIIcons.ChipsGoldIcon->Texture = "CHIPGOLD";
    GUIIcons.ChipsGoldIcon->Control.X = 8;
    GUIIcons.ChipsGoldIcon->Control.Y = 268;
    GUIIcons.ChipsGoldIcon->Control.id = ++GUIElementID;
    
    GUIIcons.ChipsPlatIcon->Texture = "CHIPPLAT";
    GUIIcons.ChipsPlatIcon->Control.X = 8;
    GUIIcons.ChipsPlatIcon->Control.Y = 304;
    GUIIcons.ChipsPlatIcon->Control.id = ++GUIElementID;
    
    GUIIcons.InventoryIcon->Texture = "GPAKA0";
    GUIIcons.InventoryIcon->Control.X = 24;
    GUIIcons.InventoryIcon->Control.Y = 396;
    GUIIcons.InventoryIcon->Control.id = ++GUIElementID;
    
    GUILabels.ModuleLabel->Control.X = 84;
    GUILabels.ModuleLabel->Control.Y = 116;
    GUILabels.ModuleLabel->Control.id = ++GUIElementID;
    GUILabels.ModuleLabel->Color = "Green";
    GUILabels.ModuleLabel->Big = true;
    
    GUILabels.TurretPartsLabel->Control.X = 84;
    GUILabels.TurretPartsLabel->Control.Y = 148;
    GUILabels.TurretPartsLabel->Control.id = ++GUIElementID;
    GUILabels.TurretPartsLabel->Color = "White";
    GUILabels.TurretPartsLabel->Big = true;
    
    GUILabels.AugChargeLabel->Control.X = 84;
    GUILabels.AugChargeLabel->Control.Y = 180;
    GUILabels.AugChargeLabel->Control.id = ++GUIElementID;
    GUILabels.AugChargeLabel->Color = "Yellow";
    GUILabels.AugChargeLabel->Big = true;
    
    GUILabels.AugSlotsLabel->Control.X = 84;
    GUILabels.AugSlotsLabel->Control.Y = 200;
    GUILabels.AugSlotsLabel->Control.id = ++GUIElementID;
    GUILabels.AugSlotsLabel->Color = "Green";
    GUILabels.AugSlotsLabel->Big = true;
    
    GUILabels.AugUpgradesLabel->Control.X = 84;
    GUILabels.AugUpgradesLabel->Control.Y = 224;
    GUILabels.AugUpgradesLabel->Control.id = ++GUIElementID;
    GUILabels.AugUpgradesLabel->Color = "Green";
    GUILabels.AugUpgradesLabel->Big = true;
    
    GUILabels.StimsLabel->Control.X = 84;
    GUILabels.StimsLabel->Control.Y = 264;
    GUILabels.StimsLabel->Control.id = ++GUIElementID;
    GUILabels.StimsLabel->Color = "White";
    GUILabels.StimsLabel->Big = true;
    
    GUILabels.ChipsGoldLabel->Control.X = 84;
    GUILabels.ChipsGoldLabel->Control.Y = 314;
    GUILabels.ChipsGoldLabel->Control.id = ++GUIElementID;
    GUILabels.ChipsGoldLabel->Color = "Gold";
    GUILabels.ChipsGoldLabel->Big = true;
    
    GUILabels.ChipsPlatLabel->Control.X = 84;
    GUILabels.ChipsPlatLabel->Control.Y = 350;
    GUILabels.ChipsPlatLabel->Control.id = ++GUIElementID;
    GUILabels.ChipsPlatLabel->Color = "White";
    GUILabels.ChipsPlatLabel->Big = true;
    
    GUILabels.InventoryLabel->Control.X = 84;
    GUILabels.InventoryLabel->Control.Y = 412;
    GUILabels.InventoryLabel->Control.id = ++GUIElementID;
    GUILabels.InventoryLabel->Color = "White";
    GUILabels.InventoryLabel->Big = true;
    
    // --------------------------------------------------
    // Map Stats
    //
    
    GUIIcons.MapIcon = GUIAddIcon(OverviewPanel, "Map Icon");
    
    GUILabels.MapNameLabel = GUIAddLabel(OverviewPanel, "Map Name");
    GUILabels.MapInfoLabel = GUIAddLabel(OverviewPanel, "Map Info");
    GUILabels.MapTimeLabel = GUIAddLabel(OverviewPanel, "Map Time");
    GUILabels.MapKillsLabel = GUIAddLabel(OverviewPanel, "Map Kills");
    GUILabels.MapItemsLabel = GUIAddLabel(OverviewPanel, "Map Items");
    GUILabels.MapSecretsLabel = GUIAddLabel(OverviewPanel, "Map Secrets");
    
    GUIIcons.MapIcon->Texture = "PMAPA0";
    GUIIcons.MapIcon->Control.X = 284;
    GUIIcons.MapIcon->Control.Y = 96;
    GUIIcons.MapIcon->Control.id = ++GUIElementID;
    
    GUILabels.MapNameLabel->Control.X = 328;
    GUILabels.MapNameLabel->Control.Y = 110;
    GUILabels.MapNameLabel->Control.id = ++GUIElementID;
    GUILabels.MapNameLabel->Color = "White";
    GUILabels.MapNameLabel->Big = true;
    
    GUILabels.MapInfoLabel->Control.X = 328;
    GUILabels.MapInfoLabel->Control.Y = 122;
    GUILabels.MapInfoLabel->Control.id = ++GUIElementID;
    GUILabels.MapInfoLabel->Color = "Green";
    GUILabels.MapInfoLabel->Big = true;
    
    GUILabels.MapTimeLabel->Control.X = 328;
    GUILabels.MapTimeLabel->Control.Y = 134;
    GUILabels.MapTimeLabel->Control.id = ++GUIElementID;
    GUILabels.MapTimeLabel->Color = "Orange";
    GUILabels.MapTimeLabel->Big = true;
    
    GUILabels.MapKillsLabel->Control.X = 328;
    GUILabels.MapKillsLabel->Control.Y = 146;
    GUILabels.MapKillsLabel->Control.id = ++GUIElementID;
    GUILabels.MapKillsLabel->Big = true;
    
    GUILabels.MapItemsLabel->Control.X = 328;
    GUILabels.MapItemsLabel->Control.Y = 158;
    GUILabels.MapItemsLabel->Control.id = ++GUIElementID;
    GUILabels.MapItemsLabel->Big = true;
    
    GUILabels.MapSecretsLabel->Control.X = 328;
    GUILabels.MapSecretsLabel->Control.Y = 170;
    GUILabels.MapSecretsLabel->Control.id = ++GUIElementID;
    GUILabels.MapSecretsLabel->Big = true;
    
    // --------------------------------------------------
    // Shield
    //
    GUIIcons.ShAccIcon = GUIAddIcon(OverviewPanel, "Shield Accessory");
    GUIIcons.ShBatIcon = GUIAddIcon(OverviewPanel, "Shield Battery");
    GUIIcons.ShCapIcon = GUIAddIcon(OverviewPanel, "Shield Capacitor");
    GUIIcons.ShBodIcon = GUIAddIcon(OverviewPanel, "Shield Body");
    
    GUIIcons.ShAccIcon->Texture = "SHA2A0";
    GUIIcons.ShAccIcon->Control.X = 286;
    GUIIcons.ShAccIcon->Control.Y = 205;
    GUIIcons.ShAccIcon->Control.id = ++GUIElementID;
    
    GUIIcons.ShBatIcon->Texture = "SHBAA0";
    GUIIcons.ShBatIcon->Control.X = 286;
    GUIIcons.ShBatIcon->Control.Y = 205;
    GUIIcons.ShBatIcon->Control.id = ++GUIElementID;
    
    GUIIcons.ShCapIcon->Texture = "SHCAA0";
    GUIIcons.ShCapIcon->Control.X = 286;
    GUIIcons.ShCapIcon->Control.Y = 205;
    GUIIcons.ShCapIcon->Control.id = ++GUIElementID;
    
    GUIIcons.ShBodIcon->Texture = "SHBOA0";
    GUIIcons.ShBodIcon->Control.X = 286;
    GUIIcons.ShBodIcon->Control.Y = 205;
    GUIIcons.ShBodIcon->Control.id = ++GUIElementID;
    
    GUILabels.ShNameLabel = GUIAddLabel(OverviewPanel, "Shield Name");
    GUILabels.ShCapLabel = GUIAddLabel(OverviewPanel, "Shield Capacity");
    GUILabels.ShCrgLabel = GUIAddLabel(OverviewPanel, "Shield Charge");
    GUILabels.ShDlyLabel = GUIAddLabel(OverviewPanel, "Shield Delay");
    
    GUILabels.ShNameLabel->Control.X = 324;
    GUILabels.ShNameLabel->Control.Y = 210;
    GUILabels.ShNameLabel->Control.id = ++GUIElementID;
    GUILabels.ShNameLabel->Color = "White";
    
    GUILabels.ShCapLabel->Control.X = 324;
    GUILabels.ShCapLabel->Control.Y = 218;
    GUILabels.ShCapLabel->Control.id = ++GUIElementID;
    GUILabels.ShCapLabel->Color = "White";
    
    GUILabels.ShCrgLabel->Control.X = 324;
    GUILabels.ShCrgLabel->Control.Y = 226;
    GUILabels.ShCrgLabel->Control.id = ++GUIElementID;
    GUILabels.ShCrgLabel->Color = "White";
    
    GUILabels.ShDlyLabel->Control.X = 324;
    GUILabels.ShDlyLabel->Control.Y = 234;
    GUILabels.ShDlyLabel->Control.id = ++GUIElementID;
    GUILabels.ShDlyLabel->Color = "White";
    
    // --------------------------------------------------
    // Current Stim / Toxicity
    //
    
    GUILabels.CurStimLabel = GUIAddLabel(OverviewPanel, "Current Stim");
    GUILabels.CurStimLabel->Control.X = 324;
    GUILabels.CurStimLabel->Control.Y = 260;
    GUILabels.CurStimLabel->Control.id = ++GUIElementID;
    GUILabels.CurStimLabel->Color = "Green";
    GUILabels.CurStimLabel->Big = true;
    
    GUITooltip *CurStimTooltip = GUICreateTooltip();
    CurStimTooltip->Type = TT_TITLE;
    CurStimTooltip->Title = "";
    CurStimTooltip->Text = "";
    
    for (int i = 0; i < STIM_MAX; i++)
    {
        CurStimBar[i] = GUIAddBar(OverviewPanel, StrParam("Stim Bar %d", i));
       
        CurStimBar[i]->Control.X = 326;
        CurStimBar[i]->Control.Y = 270;
        CurStimBar[i]->Control.id = ++GUIElementID;
        CurStimBar[i]->Texture = StrParam("Stim%d", i + 1);
        CurStimBar[i]->ValueMax = 100;
        CurStimBar[i]->Control.Tooltip = CurStimTooltip;
        
        GUIElementID = GUIElementID + 100;
    }    
    
    GUILabels.ToxicityLabel = GUIAddLabel(OverviewPanel, "Toxicity");
    GUILabels.ToxicityLabel->Control.X = 324;
    GUILabels.ToxicityLabel->Control.Y = 300;
    GUILabels.ToxicityLabel->Control.id = ++GUIElementID;
    GUILabels.ToxicityLabel->Color = "Green";
    GUILabels.ToxicityLabel->Big = true;
    
    for (int i = 0; i < sizeof(ToxicityBar); i++)
    {
        ToxicityBar[i] = GUIAddBar(OverviewPanel, StrParam("Toxicity Bar %d", i));
        ToxicityBar[i]->Control.X = 335 + i;
        ToxicityBar[i]->Control.Y = 305;
        ToxicityBar[i]->Control.id = TOXMETER_ID + i;
        ToxicityBar[i]->Texture = StrParam("PGreen");
        ToxicityBar[i]->Value = 1;
        ToxicityBar[i]->ValueMax = 1;
        ToxicityBar[i]->Type = GUI_BAR_FADE;
        ToxicityBar[i]->FadeLength = 1.0;
    }
    
    GUILabels.ToxicityRegenLabel = GUIAddLabel(OverviewPanel, "Toxicity Regen");
    GUILabels.ToxicityEnergyLabel = GUIAddLabel(OverviewPanel, "Toxicity Energy");
    GUILabels.ToxicitySpeedLabel = GUIAddLabel(OverviewPanel, "Toxicity Speed");
    
    GUILabels.ToxicityRegenLabel->Control.X = 450;
    GUILabels.ToxicityRegenLabel->Control.Y = 314;
    GUILabels.ToxicityRegenLabel->Control.id = ++GUIElementID;
    GUILabels.ToxicityRegenLabel->Color = "Brick";
    GUILabels.ToxicityRegenLabel->Text = "- No Regeneration";
    
    
    GUILabels.ToxicityEnergyLabel->Control.X = 450;
    GUILabels.ToxicityEnergyLabel->Control.Y = 322;
    GUILabels.ToxicityEnergyLabel->Control.id = ++GUIElementID;
    GUILabels.ToxicityEnergyLabel->Color = "Brick";
    GUILabels.ToxicityEnergyLabel->Text = "- Energy Loss";
    
    GUILabels.ToxicitySpeedLabel->Control.X = 450;
    GUILabels.ToxicitySpeedLabel->Control.Y = 330;
    GUILabels.ToxicitySpeedLabel->Control.id = ++GUIElementID;
    GUILabels.ToxicitySpeedLabel->Color = "Brick";
    GUILabels.ToxicitySpeedLabel->Text = "- Reduced Movement Speed";
    
}