Add sub action button.
This commit is contained in:
@@ -7,13 +7,20 @@ namespace Cryville.Crtr.Browsing.UI {
|
|||||||
internal class ActionBar : MonoBehaviour {
|
internal class ActionBar : MonoBehaviour {
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
ActionButton m_mainButton;
|
ActionButton m_mainButton;
|
||||||
|
[SerializeField]
|
||||||
|
ActionButton m_subButton;
|
||||||
|
|
||||||
public void Load(ResourceBrowser browser, IReadOnlyCollection<IResourceAction> actions) {
|
public void Load(ResourceBrowser browser, IReadOnlyCollection<IResourceAction> actions) {
|
||||||
var enumerator = actions.OrderBy(i => i.Priority).GetEnumerator();
|
var enumerator = actions.OrderBy(i => i.Priority).GetEnumerator();
|
||||||
if (enumerator.MoveNext()) {
|
if (enumerator.MoveNext()) {
|
||||||
gameObject.SetActive(true);
|
gameObject.SetActive(true);
|
||||||
m_mainButton.Load(browser, enumerator.Current);
|
m_mainButton.Load(browser, enumerator.Current);
|
||||||
// TODO Subactions
|
if (enumerator.MoveNext()) {
|
||||||
|
m_subButton.Load(browser, enumerator.Current);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_subButton.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_mainButton.Clear();
|
m_mainButton.Clear();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user