private void OnLoginStateChanged(object sender, HookableVariableValueChangedEventArgs <bool> e) { PendingRenderThreadActions += () => { //I don't know if we NEED to, but for safety we should //delete the textures from the GPU for dynamic image producers. foreach (var r in Renderables) { DeleteTexture(r.TextureId); } Renderables.Clear(); }; }
private void LoginScreenFocusOnVariableValueChanged(object sender, HookableVariableValueChangedEventArgs <TitleScreenUIElement> e) { lock (SyncObj) { if (TileScreenHookable.LoginScreenState.VariableValue != TitleScreenState.LoginBox) { ShouldBeShowingKeyboard = false; } else { //If we're already showing, we should siwtch then. if (ShouldBeShowingKeyboard && e.CurrentValue != e.NewValue) //don't need to switch if it's the same value. { NeedsKeyboardSwitch = true; } //Always want to show. ShouldBeShowingKeyboard = true; } } }
private void LoginScreenStateOnVariableValueChanged(object sender, HookableVariableValueChangedEventArgs <TitleScreenState> e) { lock (SyncObj) { //If they go back to title screen or if the new userbox is entered //we shouldn't show a keyboard. if (e.CurrentValue == TitleScreenState.Default) { ShouldBeShowingKeyboard = false; } if (e.CurrentValue == TitleScreenState.NewUserBox) { ShouldBeShowingKeyboard = false; } if (e.CurrentValue == TitleScreenState.LoginBox) { ShouldBeShowingKeyboard = true; } } }