示例#1
0
        /// <summary>
        /// The button is centered on the position;
        /// </summary>
        /// <param name="_parent"></param>
        public UiMainMenuButton(int _x, int _y, MenuButtonType _type, NxOverlay _parent) : base(_parent)
        {
            x      = _x;
            y      = _y;
            m_Type = _type;

            //background
            Color        = EDColors.getColor(EDColors.ORANGE, 0.2f);
            m_originRec  = new Rectangle(x - (WIDTH / 2), y - (HEIGHT / 2), WIDTH, HEIGHT);
            m_background = new NxRectangle(m_originRec.X, m_originRec.Y, m_originRec.Width, m_originRec.Height, Color);
            Add(m_background);

            //Title
            m_TopText = new NxSimpleText(x, m_background.y + 5, getMenuTitle(), EDColors.ORANGE, 34, NxFonts.EuroCapital);
            m_TopText.centerHorizontal = true;
            Add(m_TopText);

            //Icon
            m_Icon = new NxImage(m_background.x + (WIDTH - ICON_SIZE) / 2, m_background.y + 50, ResHelper.GetResourceImage(Assembly.GetExecutingAssembly(), getIconPath()));
            Add(m_Icon);

            //Bottom Text
            int _botHeight = 80;
            int _padding   = 5;

            m_BottomText             = new NxTextbox(m_background.x + _padding, m_background.y + (HEIGHT - _botHeight) - _padding, WIDTH - _padding * 2, _botHeight, getBottomText(), EDColors.ORANGE, 19);
            m_BottomText.showBounds  = true;
            m_BottomText.boundColors = EDColors.getColor(EDColors.ORANGE, .5f);
            Add(m_BottomText);
        }
示例#2
0
 private static void InitLogs()
 {
     //Core Log event
     NexHudEngine.LogEvent += OnNexHudEngineLog;
     //Create the vrConsole to register whatever happen before VR is initialized
     m_vrConsoleTb = new NxTextbox(0, 0, 700, 500, "", EDColors.ORANGE, 24);
     m_vrConsoleTb.reverseDrawing   = true;
     m_vrConsoleTb.reverseLineOrder = true;
 }