Beispiel #1
0
        public WindowCharacterCreateMenu(int x, int y, int w, int h, string title, EBorderStyle borderStyle, Entity player, HUD parent)
            : base(x, y, w, h, title, borderStyle, player, parent)
        {
            borderStyle     = EBorderStyle.NONE;
            availablePoints = NUMBER_OF_POINTS;

            dragdrop = new HUD.DragDrop();

            characterNameField = new TextField(3, 5, MAX_NAME_LENGTH, 1, elementDarker, elementDark, foregroundColor, CharacterNameCompleted);

            // sub windows for inspecitng the starrting skills and starting items
            skillInspector = new WindowSkillInfo(0, 0, 30, 12, "[skill]", EBorderStyle.ALL, null, null);
            itemInspector  = new WindowItemInfo(0, 0, 30, 12, "[item]", EBorderStyle.ALL, null, null);
        }
Beispiel #2
0
        public WindowInventory(int x, int y, int w, int h, string title, EBorderStyle borderStyle, Entity player, HUD parent)
            : base(x, y, w, h, title, borderStyle, player, parent)
        {
            itemInfoWindow = new WindowItemInfo(0, 0, 30, 12, "[details]", EBorderStyle.ALL, player, parent);
            parent.windows.Add(itemInfoWindow);

            // cache the players inventory: NOTE: this needs to be updated if teh player is destroyed so that the component can be GC'd
            inventory = player.Get <InvComponent>();
            equipment = player.Get <EquipmentComponent>();

            equipSection.starty = 4;
            equipSection.endy   = 24;
            invSection.starty   = 25;
            invSection.endy     = h;
        }