auto select last role
This commit is contained in:
@@ -31,6 +31,7 @@ namespace BrewMonster.UI
|
||||
|
||||
private Coroutine _showModelReadyCoroutine;
|
||||
private int _pendingShowModelRoleId = -1;
|
||||
private bool _needFocusLastCharacter;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -50,6 +51,8 @@ namespace BrewMonster.UI
|
||||
{
|
||||
PlayerModelPreview.Instance?.ClearModels();
|
||||
}
|
||||
|
||||
_needFocusLastCharacter = true;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
@@ -175,12 +178,12 @@ namespace BrewMonster.UI
|
||||
|
||||
private void OnSelectCharacter(CharacterItemUI characterItemUI)
|
||||
{
|
||||
if (_selectingCharacterItemUI == characterItemUI)
|
||||
if (_selectingCharacterItemUI == characterItemUI && !_needFocusLastCharacter)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
if (_selectingCharacterItemUI != null)
|
||||
_needFocusLastCharacter = false;
|
||||
if (_selectingCharacterItemUI != characterItemUI)
|
||||
{
|
||||
_selectingCharacterItemUI.SetFocus(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user