Example #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());
        }
Example #2
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;
        }