Esempio n. 1
0
        // --- Constructors ---
        public AttackDecisionGui(GSGameplay pmGState, ref GameExt pmGame, ref BattleMap pmMap)
        {
            gstate=	pmGState;
            game=	pmGame;
            map=	pmMap;

            background=	new Control(game);
            leftPanel=	new Control(game);
            rightPanel=	new Control(game);
            lpName=	new Label(game);
            lpStats=	new Label[8];
            for(int i= 0; i< lpStats.Length; i++)
                lpStats[i]=	new Label(game);
            rpName=	new Label(game);
            rpStats=	new Label[8];
            for(int i= 0; i< rpStats.Length; i++)
                rpStats[i]=	new Label(game);
            accuracyLbl=	new Label(game);
            accuracy=	new Label(game);
            critLbl=	new Label(game);
            crit=	new Label(game);
            dmgLbl=	new Label(game);
            dmg=	new Label(game);
            commit=	new Button(game);
            cancel=	new Button(game);
        }
Esempio n. 2
0
        // --- Methods ---
        // Creates an icon of the passive's info
        public Control createIcon(GameExt game)
        {
            // Variable
            Control	ctrl=	new Control(game);
            Label	nameLbl=	new Label(game);

            ctrl.backColorStates.normal=	game.getColor("white");
            ctrl.texStates.normal=	icon;
            ctrl.setState(ControlState.Normal);
            ctrl.canHover=	false;

            ctrl.tooltip=	new Tooltip(game);
            ctrl.tooltip.font=	game.fonts.get("default_font");
            ctrl.tooltip.text=	getTooltipText();
            ctrl.tooltip.size=	new Point(488, 96);
            ctrl.tooltip.backColorStates.normal=	game.getColor("paleturquoise");
            ctrl.tooltip.setState(ControlState.Normal);
            ctrl.tooltip.border.size=	1;
            ctrl.tooltip.xPad=	-ctrl.tooltip.size.X;
            ctrl.tooltip.yPad=	24;

            nameLbl.text=	name+":";
            nameLbl.bounds.X=	16;
            nameLbl.bounds.Y=	8;

            ctrl.tooltip.addChild(nameLbl);

            return ctrl;
        }
Esempio n. 3
0
        // --- Constructors ---
        public UnitLevelUpGui(ref GameExt pmGame, ref BattleMap pmMap)
        {
            game=	pmGame;
            map=	pmMap;

            background=	new Control(game);
            name=	new Label(game);
            level=	new Label(game);
            statsLbl=	new Label[8];
            stats=	new Button[8];
            for(int i= 0; i< statsLbl.Length; i++)
            {
                statsLbl[i]=	new Label(game);
                stats[i]=	new Button(game);
            }

            isOpened=	false;
            unit=	null;
        }
Esempio n. 4
0
        // Creates a button from the information provided
        public Button createButton(ref GameExt game)
        {
            // Variables
            Button	btn=	new Button(game);
            Label	mcLbl=	new Label(game);
            Label	nameLbl=	new Label(game);

            btn.backColorStates=	new ControlStateItems<Color>(
                game.getColor("white"),
                game.getColor("dimgray"),
                game.getColor("white"),
                game.getColor("white"),
                btn
            );
            btn.text=	name;
            btn.tag=	tag;

            btn.tooltip=	new Tooltip(game);
            btn.tooltip.font=	game.fonts.get("default_font");
            btn.tooltip.text=	getTooltipText();
            btn.tooltip.size=	new Point(488, 96);
            btn.tooltip.backColorStates.normal=	game.getColor("paleturquoise");
            btn.tooltip.setState(ControlState.Normal);
            btn.tooltip.border.size=	1;
            btn.tooltip.xPad=	-14;
            btn.tooltip.yPad=	16;

            mcLbl.text=	"Cost: "+manaCost+" mana";
            mcLbl.bounds.X=	16;
            mcLbl.bounds.Y=	btn.tooltip.size.Y-(int)(btn.font.MeasureString("g").Y+8);
            mcLbl.font=	game.fonts.get("default_font");

            nameLbl.text=	name+":";
            nameLbl.bounds.X=	16;
            nameLbl.bounds.Y=	8;
            nameLbl.font=	game.fonts.get("default_font");

            btn.tooltip.addChild(mcLbl);
            btn.tooltip.addChild(nameLbl);

            return btn;
        }
Esempio n. 5
0
 // --- Constructors ---
 public UnitStatsGui(GSGameplay pmGState, ref GameExt game)
 {
     gstate=	pmGState;
     set=	new Control(game);
     background=	new Control(game);
     unitName=	new Label(game);
     unitProf=	new Label(game);
     unitLv=	new Label(game);
     unitExp=	new Label(game);
     hpBar=	new ProgressBar(game);
     manaBar=	new ProgressBar(game);
     hpLbl=	new Label(game);
     manaLbl=	new Label(game);
     atk=	new Label(game);
     def=	new Label(game);
     mag=	new Label(game);
     res=	new Label(game);
     spd=	new Label(game);
     move=	new Label(game);
     passivesLbl=	new Label(game);
     passives=	new Control(game);
 }