Inheritance: GUIElement
Example #1
0
        public override void Initialize()
        {
            IOxRenderDebugController debug = (IOxRenderDebugController)Ox.Service.Get(typeof(IOxRenderDebugController));
            debug.CheckedChanged += new EventHandler(debug_CheckedChanged);

            elem = Render.GUI.AddStaticTextW(string.Empty, new Rect(new Position2D(0, 16), new Dimension2D(640, 240)), false, true, Render.GUI.RootElement, 0, false);
            elem.OverrideColor = Color.Red;

            base.Initialize();
        }
Example #2
0
        public override void Initialize()
        {
            #if YK_REMOVE_HELP
            MENU_WIDTH = 256;
            #else
            MENU_R_WIDTH = 208;
            MENU_OFFSET_X = 12;
            #endif

            m_menuBackground = Reference.GUIEnvironment.AddImage(Reference.VideoDriver.GetTexture(Util.ApplicationDataDirectory + @"\media\gui\menu\menu_background_r.tga"), new Position2D(Reference.Viewer.Width - MENU_R_WIDTH - MENU_OFFSET_X, 0), true, Reference.GUIEnvironment.RootElement, (int)GUIElementIDS.MENU_BACKGROUND, "background");
            if (Reference.Viewer.Width > 2*MENU_R_WIDTH+2*MENU_OFFSET_X)
            {
                m_textBackground = Reference.GUIEnvironment.AddImage(Reference.VideoDriver.GetTexture(Util.ApplicationDataDirectory + @"\media\gui\menu\menu_background_l.tga"), new Position2D(0, 0), true, Reference.GUIEnvironment.RootElement, (int)GUIElementIDS.MENU_BACKGROUND, "background");
                m_menuSIMName = Reference.GUIEnvironment.AddStaticTextW("", new Rect(5, 5, 295, 23), false, false, m_textBackground, (int)GUIElementIDS.MENU_SIMNAME, false);
                m_menuLocation = Reference.GUIEnvironment.AddStaticTextW("", new Rect(5, 25, 295, 43), false, false, m_textBackground, (int)GUIElementIDS.MENU_LOCATIONTEXT, false);
                m_textBackground.Visible = false;
            }
            else
            {
                m_textEnabled = false;
            }
            m_menuBackground.Visible = false;
        }