对话框
This commit is contained in:
@@ -15,8 +15,6 @@ namespace AibisDream
|
||||
private IDialogView _defaultView;
|
||||
private IDialogView _showingView;
|
||||
|
||||
public TempTextBox tempText;
|
||||
|
||||
private IActionController _autoNext;
|
||||
private IActionController _block;
|
||||
private IActionController _hideDialog;
|
||||
@@ -50,10 +48,6 @@ namespace AibisDream
|
||||
RegisterDialogView(DialogViewType.CenterText, centerText);
|
||||
var centerOption = transform.Find("Center Option").GetComponent<IDialogView>();
|
||||
RegisterDialogView(DialogViewType.CenterOption, centerOption);
|
||||
if (tempText != null)
|
||||
{
|
||||
RegisterDialogView(DialogViewType.Temp, tempText);
|
||||
}
|
||||
|
||||
_defaultView = _dialogViewDict[DialogViewType.OldBox];
|
||||
}
|
||||
@@ -205,7 +199,7 @@ namespace AibisDream
|
||||
// 根据状况选择不同的选择框
|
||||
if (viewType == DialogViewType.Default)
|
||||
{
|
||||
if (_showingView != _dialogViewDict[DialogViewType.OldBox])
|
||||
if (_showingView != _defaultView)
|
||||
{
|
||||
_showingView?.HideDialog();
|
||||
}
|
||||
@@ -214,12 +208,13 @@ namespace AibisDream
|
||||
_hideDialog?.Deinit();
|
||||
_hideDialog = null;
|
||||
}
|
||||
_showingView = _defaultView;
|
||||
|
||||
_dialogViewDict[DialogViewType.OldBox].ShowOptions(dialogueOptions);
|
||||
_showingView.ShowOptions(dialogueOptions);
|
||||
}
|
||||
else
|
||||
else if(_dialogViewDict.TryGetValue(viewType, out var view))
|
||||
{
|
||||
if (_showingView != _dialogViewDict[viewType])
|
||||
if (_showingView != view)
|
||||
{
|
||||
_showingView?.HideDialog();
|
||||
}
|
||||
@@ -228,8 +223,8 @@ namespace AibisDream
|
||||
_hideDialog?.Deinit();
|
||||
_hideDialog = null;
|
||||
}
|
||||
|
||||
_dialogViewDict[viewType].ShowOptions(dialogueOptions);
|
||||
_showingView = view;
|
||||
_showingView.ShowOptions(dialogueOptions);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,6 +314,7 @@ namespace AibisDream
|
||||
CenterText,
|
||||
CenterOption,
|
||||
Task,
|
||||
Temp
|
||||
ClinicBubble,
|
||||
ModuleBubble
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user