Build questionnaire center UI
This commit is contained in:
parent
1742d0a495
commit
37b75756ff
@ -142,7 +142,7 @@ namespace TH1_UI.View.Outside
|
||||
StoryButton.onClick.RemoveAllListeners();
|
||||
StoryButton.onClick.AddListener(OnStoryClicked);
|
||||
BindTransReportButton();
|
||||
HideQuestionnaireButton();
|
||||
BindQuestionnaireButton();
|
||||
|
||||
SettingButton.onClick.RemoveAllListeners();
|
||||
SettingButton.onClick.AddListener(OnSettingClicked);
|
||||
@ -282,6 +282,7 @@ namespace TH1_UI.View.Outside
|
||||
}
|
||||
|
||||
if (QuestionnaireButton == null) return;
|
||||
QuestionnaireButton.gameObject.SetActive(true);
|
||||
RestoreButtonTargetAlpha(QuestionnaireButton);
|
||||
SetQuestionnaireButtonText();
|
||||
QuestionnaireButton.onClick.RemoveAllListeners();
|
||||
|
||||
@ -39,6 +39,14 @@ namespace TH1_UI.View.Outside
|
||||
Toggle?.SetIsOnWithoutNotify(value);
|
||||
}
|
||||
|
||||
public void SetInteractable(bool value)
|
||||
{
|
||||
if (Toggle != null)
|
||||
{
|
||||
Toggle.interactable = value;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnToggleChanged(bool value)
|
||||
{
|
||||
_onValueChanged?.Invoke(this, value);
|
||||
|
||||
@ -103,6 +103,19 @@ namespace TH1_UI.View.Outside
|
||||
_onAnswerChanged?.Invoke();
|
||||
}
|
||||
|
||||
public void SetReadOnly(bool readOnly)
|
||||
{
|
||||
if (OpenInput != null)
|
||||
{
|
||||
OpenInput.interactable = !readOnly;
|
||||
}
|
||||
|
||||
foreach (var item in _optionItems)
|
||||
{
|
||||
item.SetInteractable(!readOnly);
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasAnswer()
|
||||
{
|
||||
if (QuestionInfo == null) return false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user