public override void OnOpen()
        {
            //TODO: make this actually select the element so that the user can type in the planet name without having to click on the element or navigate to it using WASD (which seems to work, oddly)
            ArcenUI_Input elementAsType = (ArcenUI_Input)iPlanetName.Instance.Element;

            elementAsType.ReferenceInputField.ActivateInputField();
            elementAsType.ReferenceInputField.Select();
        }
            public override void OnUpdate()
            {
                ArcenUI_Input elementAsType = (ArcenUI_Input)Element;

                elementAsType.SetText(PlanetName);
                if (MoveToEndOfLineOnNextUpdate)
                {
                    MoveToEndOfLineOnNextUpdate = false;
                    elementAsType.ReferenceInputField.MoveToEndOfLine(false, false);
                }
            }
Exemple #3
0
            public override void OnUpdate()
            {
                string seedAsString = World_AIW2.Instance.Setup.Seed.ToString();

                if (this.LastSeedSeen != seedAsString)
                {
                    this.LastSeedSeen = seedAsString;
                    this.CurrentValue = seedAsString;
                    ArcenUI_Input elementAsType = (ArcenUI_Input)Element;
                    elementAsType.SetText(seedAsString);
                }
            }
Exemple #4
0
            //public override char ValidateInput( string input, int charIndex, char addedChar )
            //{
            //    if ( input.Length >= 10 )
            //        return '\0';
            //    if ( !char.IsDigit( addedChar ) )
            //        return '\0';

            //    ArcenSetting setting = GetSettingForController( this );
            //    if ( setting == null ) return '\0';

            //    string testInput = input.Insert( charIndex, addedChar.ToString() );
            //    int testInputAsType;
            //    if ( !Int32.TryParse( testInput, out testInputAsType ) )
            //        return '\0';

            //    if ( testInputAsType < setting.MinIntValue )
            //        return '\0';

            //    if ( setting.MaxIntValue > setting.MinIntValue && testInputAsType > setting.MaxIntValue )
            //        return '\0';

            //    return addedChar;
            //}

            public override void OnUpdate()
            {
                ArcenSetting setting = GetSettingForController(this);

                if (setting == null)
                {
                    return;
                }

                ArcenUI_Input elementAsType = (ArcenUI_Input)Element;

                elementAsType.SetText(setting.TempValue_String);
            }
            public override void OnUpdate()
            {
                ArcenUI_Input elementAsType = (ArcenUI_Input)Element;

                elementAsType.SetText(CampaignName);
            }