오류수정
This commit is contained in:
@@ -38,6 +38,7 @@ void Awake()
|
||||
|
||||
const int ID_TOGGLE = 1;
|
||||
const int ID_EXIT = 2;
|
||||
const int ID_AUTOCLIMB = 3;
|
||||
|
||||
delegate IntPtr WndProcDelegate(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
@@ -191,6 +192,15 @@ void ShowContextMenu()
|
||||
if (menu == IntPtr.Zero) return;
|
||||
|
||||
AppendMenuW(menu, MF_STRING, ID_TOGGLE, characterVisible ? "캐릭터 숨기기" : "캐릭터 보이기");
|
||||
|
||||
// 자동 올라타기는 켜고 끄는 항목이라 체크 표시로 현재 상태를 보여준다.
|
||||
var climber = FindFirstObjectByType<WindowClimber>();
|
||||
if (climber != null)
|
||||
{
|
||||
uint flags = MF_STRING | (climber.AutoClimb ? MF_CHECKED : 0);
|
||||
AppendMenuW(menu, flags, ID_AUTOCLIMB, "자동으로 창에 올라가기");
|
||||
}
|
||||
|
||||
AppendMenuW(menu, MF_SEPARATOR, 0, null);
|
||||
AppendMenuW(menu, MF_STRING, ID_EXIT, "종료");
|
||||
|
||||
@@ -216,6 +226,15 @@ void ShowContextMenu()
|
||||
{
|
||||
ToggleCharacter();
|
||||
}
|
||||
else if (cmd == ID_AUTOCLIMB)
|
||||
{
|
||||
var target = FindFirstObjectByType<WindowClimber>();
|
||||
if (target != null)
|
||||
{
|
||||
target.AutoClimb = !target.AutoClimb;
|
||||
Debug.Log($"[TrayIcon] 자동으로 창에 올라가기 = {target.AutoClimb}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToggleCharacter()
|
||||
@@ -288,6 +307,7 @@ void Cleanup()
|
||||
|
||||
const uint MF_STRING = 0x0000;
|
||||
const uint MF_SEPARATOR = 0x0800;
|
||||
const uint MF_CHECKED = 0x0008; // 항목 앞에 체크 표시
|
||||
|
||||
const uint TPM_RIGHTBUTTON = 0x0002;
|
||||
const uint TPM_RETURNCMD = 0x0100;
|
||||
|
||||
Reference in New Issue
Block a user