Exemplo n.º 1
0
        private static void makeCombatGUI()
        {
            GUIMan.ClearGUIs();
            int statBoxX, statBoxY, statBoxW, statBoxH,
                abilityBoxX, abilityBoxY, abilityBoxW, abilityBoxH;

            statBoxX    = 0;
            statBoxY    = (int)((1 - (1.35 * ConstantHolder.relativeMinimapSizeY)) * ConstantHolder.GAME_HEIGHT);
            statBoxW    = 120;
            statBoxH    = ConstantHolder.GAME_HEIGHT - statBoxY;
            abilityBoxX = statBoxW;
            abilityBoxY = (int)((1 - ConstantHolder.relativeMinimapSizeY) * ConstantHolder.GAME_HEIGHT);
            //20 offset at the end here handles the fact that the Minimap clears a slight larger space for itself. Reference Mainframe.Core.Grid, line 280, in the Draw function, minimap section.
            abilityBoxW = (int)((1 - ConstantHolder.relativeMinimapSizeX) * ConstantHolder.GAME_WIDTH) - statBoxW - 20;
            abilityBoxH = ConstantHolder.GAME_HEIGHT - abilityBoxY;
            GUIMan.createStatBox(new Rectangle(statBoxX, statBoxY, statBoxW, statBoxH), new Rectangle(abilityBoxX, abilityBoxY, abilityBoxW, abilityBoxH));
        }