Exemplo n.º 1
0
        public override void Start()
        {
            m_uiManager = new UIManager();
            m_label = new UILabel()
            {
                Color = new Color4ub(0xFF, 0x80, 0x80, 0xFF),
                Font = InternalFonts.BoldSmallVariableWidthFont
            };
            m_uiManager.Root = m_label;

            Engine.Display.SetCursor(Cursor.IBeam);

            var template = UITemplate<Menu>.Load(typeof(Menu).GetAssociatedResource("xml"));

            m_menu = template.Create(new Menu());
        }
Exemplo n.º 2
0
        public UIFloatingText()
        {
            var size = Engine.Display.GetSize();

            m_uiManager = new UIManager();

            m_floatingTexts = new Queue<FloatingText>();
            m_floatingTextsLoaded = new List<FloatingText>();

            m_floatingTextType = new Dictionary<FloatingTextType, Color4ub>();

            m_floatingTextType.Add(FloatingTextType.Damage, new Color4ub(255, 0, 0, 255));
            m_floatingTextType.Add(FloatingTextType.Heal, new Color4ub(0, 255, 0, 255));
            m_floatingTextType.Add(FloatingTextType.Action, new Color4ub(255, 255, 0, 255));
            m_floatingTextType.Add(FloatingTextType.Other, new Color4ub(0, 0, 255, 255));

            //m_uiManager.Root = m_lblWeaponInfos;
        }
Exemplo n.º 3
0
        public UIGame()
        {
            var size = Engine.Display.GetSize();

            m_uiManager = new UIManager();

            m_lblWeaponInfos = new UILabel()
            {
                Color = new Color4ub(0xFF, 0x80, 0x80, 0xFF),
                Font = InternalFonts.BoldSmallVariableWidthFont,
                Bounds = new Box2(size.X - 450, size.Y - 25, 450, 25)
            };

            m_lblWeaponName = new UILabel()
            {
                Color = new Color4ub(0xFF, 0x80, 0x80, 0xFF),
                Font = InternalFonts.BoldSmallVariableWidthFont,
                Bounds = new Box2(0, 0, 100, 25)

            };

            m_lblWeaponCurrentAmmo = new UILabel()
            {
                Color = new Color4ub(0xFF, 0x80, 0x80, 0xFF),
                Font = InternalFonts.BoldSmallVariableWidthFont,
                Bounds = new Box2(0, 25, 100, 25)
            };

            m_lblWeaponTotalAmmo = new UILabel()
            {
                Color = new Color4ub(0xFF, 0x80, 0x80, 0xFF),
                Font = InternalFonts.BoldSmallVariableWidthFont,
                Bounds = new Box2(0, 50, 100, 25)
            };

            m_uiManager.Root = m_lblWeaponInfos;
        }