Exemplo n.º 1
0
        private void UpdateConsoleVariables(bool read, bool force = false)
        {
            if ((this.Buddy != null) || (_cvar == null))
            {
                return;
            }

            if ((force == true) || (_liveUpdate == true))
            {
                _value.Set(_cvar.ToFloat());

                if (_value != this.UserInterface.State.GetFloat(_cvarStr))
                {
                    if (read == true)
                    {
                        this.UserInterface.State.Set(_cvarStr, _value);
                    }
                    else
                    {
                        _value.Set(this.UserInterface.State.GetFloat(_cvarStr));
                        _cvar.Set(_value);
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void UpdateConsoleVariables(bool read, bool force = false)
        {
            if ((force == true) || (_liveUpdate == true))
            {
                if (_cvar != null)
                {
                    if (read == true)
                    {
                        this.Text = _cvar.ToString();
                    }
                    else
                    {
                        _cvar.Set(this.Text);

                        if ((_cvarMax > 0) && (_cvar.ToInt() > _cvarMax))
                        {
                            _cvar.Set(_cvarMax);
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        private void UpdateVariables(bool read, bool force)
        {
            if ((force == true) || (_liveUpdate == true))
            {
                if ((_cvar != null) && (_cvarStr.NeedsUpdate == true))
                {
                    if (read == true)
                    {
                        _cvarStr.Set(_cvarStr.ToString());
                    }
                    else
                    {
                        _cvar.Set(_cvarStr.ToString());
                    }
                }

                if ((read == false) && (_guiStr.NeedsUpdate == true))
                {
                    _guiStr.Set(_currentChoice.ToString());
                }
            }
        }