コード例 #1
0
        public void Init()
        {
            _screenRect = new idRectangle(0, 0, 640, 480);

            _deviceContext = new idDeviceContext();
            _deviceContext.Init();
        }
コード例 #2
0
ファイル: idListWindow.cs プロジェクト: iainmckay/idtech4.net
		public idListWindow(idDeviceContext context, idUserInterface gui)
			: base(gui, context)
		{
			Init();
		}
コード例 #3
0
 public idSliderWindow(idDeviceContext context, idUserInterface gui)
     : base(gui, context)
 {
     Init();
 }
コード例 #4
0
		public idSimpleWindow(idWindow win)
		{
			_gui = win.UserInterface;
			_context = win.DeviceContext;

			_drawRect = win.DrawRectangle;
			_clientRect = win.ClientRectangle;
			_textRect = win.TextRectangle;

			_origin = win.Origin;
			_fontFamily = win.FontFamily;
			_name = win.Name;

			_materialScaleX = win.MaterialScaleX;
			_materialScaleY = win.MaterialScaleY;

			_borderSize = win.BorderSize;
			_textAlign = win.TextAlign;
			_textAlignX = win.TextAlignX;
			_textAlignY = win.TextAlignY;
			_background = win.Background;
			_flags = win.Flags;
			_textShadow = win.TextShadow;

			_visible.Set(win.IsVisible);
			_text.Set(win.Text);
			_rect.Set(win.Rectangle);
			_backColor.Set(win.BackColor);
			_materialColor.Set(win.MaterialColor);
			_foreColor.Set(win.ForeColor);
			_borderColor.Set(win.BorderColor);
			_textScale.Set(win.TextScale);
			_rotate.Set(win.Rotate);
			_shear.Set(win.Shear);
			_backgroundName.Set(win.BackgroundName);

			if(_backgroundName != string.Empty)
			{
				_background = idE.DeclManager.FindMaterial(_backgroundName);
				_background.Sort = (float) MaterialSort.Gui; ;
				_background.ImageClassification = 1; // just for resource tracking
			}

			_backgroundName.Material = _background;

			_parent = win.Parent;
			_hideCursor.Set(win.HideCursor);

			if(_parent != null)
			{
				if(_text.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_text);
				}

				if(_visible.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_visible);
				}

				if(_rect.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_rect);
				}

				if(_backColor.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_backColor);
				}

				if(_materialColor.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_materialColor);
				}

				if(_foreColor.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_foreColor);
				}

				if(_borderColor.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_borderColor);
				}

				if(_textScale.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_textScale);
				}

				if(_rotate.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_rotate);
				}

				if(_shear.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_shear);
				}

				if(_backgroundName.NeedsUpdate == true)
				{
					_parent.AddUpdateVariable(_backgroundName);
				}
			}
		}
コード例 #5
0
		public void Init()
		{
			_screenRect = new idRectangle(0, 0, 640, 480);

			_deviceContext = new idDeviceContext();
			_deviceContext.Init();			
		}
コード例 #6
0
        public idSimpleWindow(idWindow win)
        {
            _gui     = win.UserInterface;
            _context = win.DeviceContext;

            _drawRect   = win.DrawRectangle;
            _clientRect = win.ClientRectangle;
            _textRect   = win.TextRectangle;

            _origin     = win.Origin;
            _fontFamily = win.FontFamily;
            _name       = win.Name;

            _materialScaleX = win.MaterialScaleX;
            _materialScaleY = win.MaterialScaleY;

            _borderSize = win.BorderSize;
            _textAlign  = win.TextAlign;
            _textAlignX = win.TextAlignX;
            _textAlignY = win.TextAlignY;
            _background = win.Background;
            _flags      = win.Flags;
            _textShadow = win.TextShadow;

            _visible.Set(win.IsVisible);
            _text.Set(win.Text);
            _rect.Set(win.Rectangle);
            _backColor.Set(win.BackColor);
            _materialColor.Set(win.MaterialColor);
            _foreColor.Set(win.ForeColor);
            _borderColor.Set(win.BorderColor);
            _textScale.Set(win.TextScale);
            _rotate.Set(win.Rotate);
            _shear.Set(win.Shear);
            _backgroundName.Set(win.BackgroundName);

            if (_backgroundName != string.Empty)
            {
                _background      = idE.DeclManager.FindMaterial(_backgroundName);
                _background.Sort = (float)MaterialSort.Gui;;
                _background.ImageClassification = 1;                 // just for resource tracking
            }

            _backgroundName.Material = _background;

            _parent = win.Parent;
            _hideCursor.Set(win.HideCursor);

            if (_parent != null)
            {
                if (_text.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_text);
                }

                if (_visible.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_visible);
                }

                if (_rect.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_rect);
                }

                if (_backColor.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_backColor);
                }

                if (_materialColor.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_materialColor);
                }

                if (_foreColor.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_foreColor);
                }

                if (_borderColor.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_borderColor);
                }

                if (_textScale.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_textScale);
                }

                if (_rotate.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_rotate);
                }

                if (_shear.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_shear);
                }

                if (_backgroundName.NeedsUpdate == true)
                {
                    _parent.AddUpdateVariable(_backgroundName);
                }
            }
        }
コード例 #7
0
ファイル: idWindow.cs プロジェクト: iainmckay/idtech4.net
		public idWindow(idUserInterface gui, idDeviceContext context)
		{
			_context = context;
			_gui = gui;

			Init();
		}
コード例 #8
0
ファイル: idWindow.cs プロジェクト: iainmckay/idtech4.net
		private void Dispose(bool disposing)
		{
			if(this.Disposed == true)
			{
				throw new ObjectDisposedException(this.GetType().Name);
			}

			if(disposing == true)
			{
				CleanUp();

				_gui = null;
				_context = null;
				_parent = null;
				_background = null;
				_focusedChild = null;
				_captureChild = null;
				_overChild = null;				
				_children = null;
				_drawWindows = null;
				_definedVariables = null;
				_updateVariables = null;
				_scripts = null;
				_timeLineEvents = null;
				_transitions = null;
				_namedEvents = null;
				_expressionRegisters = null;
				_ops = null;
				_regList = null;
				_lastEval = null;
				_builtInVariables = null;
			}

			_disposed = true;
		}