更新快捷菜单
This commit is contained in:
@@ -11,6 +11,24 @@ public class InputMenu : InputControl {
|
||||
|
||||
private UIMenuPanel menu;
|
||||
|
||||
private void Start() {
|
||||
ShortcutMenu.I.Add("测试1/测试11", () => { Debug.Log("测试1/测试11"); });
|
||||
ShortcutMenu.I.Add("测试1/测试12", () => { Debug.Log("测试1/测试12"); });
|
||||
|
||||
ShortcutMenu.I.Add("删除测试5", () => {
|
||||
ShortcutMenu.I.Remove("测试5");
|
||||
});
|
||||
ShortcutMenu.I.Add("删除测试51", () => {
|
||||
ShortcutMenu.I.Remove("测试5/测试51");
|
||||
});
|
||||
ShortcutMenu.I.Add("删除测试52", () => {
|
||||
ShortcutMenu.I.Remove("测试5/测试52");
|
||||
});
|
||||
|
||||
ShortcutMenu.I.Add("测试5/测试51", () => { Debug.Log("测试51"); });
|
||||
ShortcutMenu.I.Add("测试5/测试52", () => { Debug.Log("测试52"); });
|
||||
}
|
||||
|
||||
protected override void ModuleInput_OnInputMode(InputMode mode) {
|
||||
// throw new System.NotImplementedException();
|
||||
}
|
||||
@@ -19,16 +37,11 @@ public class InputMenu : InputControl {
|
||||
/// <summary> 鼠标左键 </summary>
|
||||
public void OnMouseLeft(InputValue inputValue) {
|
||||
if (inputValue.isPressed) return;
|
||||
UIShortcutMenu.I.Close();
|
||||
ShortcutMenu.I.Close();
|
||||
}
|
||||
/// <summary> 鼠标右键 </summary>
|
||||
public void OnMouseRight(InputValue inputValue) {
|
||||
UIShortcutMenu.I.Add("测试1/测试11", () => { Debug.Log("测试1/测试11"); });
|
||||
UIShortcutMenu.I.Add("测试1/测试12", () => { Debug.Log("测试1/测试12"); });
|
||||
|
||||
UIShortcutMenu.I.Add("测试2", () => { Debug.Log("测试2"); });
|
||||
|
||||
UIShortcutMenu.I.Open();
|
||||
ShortcutMenu.I.Open();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user