forked from metin2/client
add: Mouse wheel top window.
This commit is contained in:
parent
7c4bd90e29
commit
13496016cf
@ -100,6 +100,26 @@ namespace UI
|
|||||||
m_bShow = false;
|
m_bShow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
bool CWindow::OnMouseWheelButtonUp()
|
||||||
|
{
|
||||||
|
bool bValue = false;
|
||||||
|
if (PyCallClassMemberFunc(m_poHandler, "OnMouseWheelButtonUp", BuildEmptyTuple(), &bValue))
|
||||||
|
return bValue;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWindow::OnMouseWheelButtonDown()
|
||||||
|
{
|
||||||
|
bool bValue = false;
|
||||||
|
if (PyCallClassMemberFunc(m_poHandler, "OnMouseWheelButtonDown", BuildEmptyTuple(), &bValue))
|
||||||
|
return bValue;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// NOTE : IsShow<6F><77> "<22>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD>̴°<CCB4>?" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, __IsShowing<6E><67> "<22>ڽ<EFBFBD><DABD><EFBFBD> <20><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD> <20>ִ°<D6B4>?" <20><> üũ<C3BC>Ѵ<EFBFBD>
|
// NOTE : IsShow<6F><77> "<22>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD>̴°<CCB4>?" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, __IsShowing<6E><67> "<22>ڽ<EFBFBD><DABD><EFBFBD> <20><EFBFBD><D7B7><EFBFBD><EFBFBD><EFBFBD> <20>ִ°<D6B4>?" <20><> üũ<C3BC>Ѵ<EFBFBD>
|
||||||
// <20>ڽ<EFBFBD><DABD><EFBFBD> Show <20><><EFBFBD><EFBFBD> Tree <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Parent <20><> <20>ϳ<EFBFBD><CFB3><EFBFBD> Hide <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>.. - [levites]
|
// <20>ڽ<EFBFBD><DABD><EFBFBD> Show <20><><EFBFBD><EFBFBD> Tree <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Parent <20><> <20>ϳ<EFBFBD><CFB3><EFBFBD> Hide <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>.. - [levites]
|
||||||
bool CWindow::IsRendering()
|
bool CWindow::IsRendering()
|
||||||
|
@ -163,6 +163,10 @@ namespace UI
|
|||||||
#if defined(__BL_CLIP_MASK__)
|
#if defined(__BL_CLIP_MASK__)
|
||||||
virtual void SetClippingMaskRect(const RECT& rMask);
|
virtual void SetClippingMaskRect(const RECT& rMask);
|
||||||
virtual void SetClippingMaskWindow(CWindow* pMaskWindow);
|
virtual void SetClippingMaskWindow(CWindow* pMaskWindow);
|
||||||
|
#endif
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
virtual bool OnMouseWheelButtonUp();
|
||||||
|
virtual bool OnMouseWheelButtonDown();
|
||||||
#endif
|
#endif
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ namespace UI
|
|||||||
m_pMiddleCaptureWindow(NULL),
|
m_pMiddleCaptureWindow(NULL),
|
||||||
m_pRightCaptureWindow(NULL),
|
m_pRightCaptureWindow(NULL),
|
||||||
m_pLockWindow(NULL),
|
m_pLockWindow(NULL),
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
m_pTopWindow(NULL),
|
||||||
|
#endif
|
||||||
m_bAttachingFlag(FALSE),
|
m_bAttachingFlag(FALSE),
|
||||||
m_dwAttachingType(0),
|
m_dwAttachingType(0),
|
||||||
m_dwAttachingIndex(0),
|
m_dwAttachingIndex(0),
|
||||||
@ -70,6 +73,9 @@ namespace UI
|
|||||||
|
|
||||||
delete m_pRootWindow;
|
delete m_pRootWindow;
|
||||||
m_pRootWindow = NULL;
|
m_pRootWindow = NULL;
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
m_pTopWindow = NULL;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void CWindowManager::Destroy()
|
void CWindowManager::Destroy()
|
||||||
@ -403,6 +409,11 @@ namespace UI
|
|||||||
if (pWindow == m_pLockWindow)
|
if (pWindow == m_pLockWindow)
|
||||||
m_pLockWindow = NULL;
|
m_pLockWindow = NULL;
|
||||||
|
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
if (pWindow == m_pTopWindow)
|
||||||
|
m_pTopWindow = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
m_LockWindowList.remove(pWindow);
|
m_LockWindowList.remove(pWindow);
|
||||||
m_ActiveWindowList.remove(pWindow);
|
m_ActiveWindowList.remove(pWindow);
|
||||||
m_PickAlwaysWindowList.remove(pWindow);
|
m_PickAlwaysWindowList.remove(pWindow);
|
||||||
@ -529,6 +540,34 @@ namespace UI
|
|||||||
m_iIgnoreEndTime = timeGetTime() + 500;
|
m_iIgnoreEndTime = timeGetTime() + 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
bool CWindowManager::OnMouseWheelButtonUp()
|
||||||
|
{
|
||||||
|
if (m_pTopWindow)
|
||||||
|
return m_pTopWindow->OnMouseWheelButtonUp();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CWindowManager::OnMouseWheelButtonDown()
|
||||||
|
{
|
||||||
|
if (m_pTopWindow)
|
||||||
|
return m_pTopWindow->OnMouseWheelButtonDown();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWindowManager::SetWheelTopWindow(CWindow* pWindow)
|
||||||
|
{
|
||||||
|
m_pTopWindow = pWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CWindowManager::ClearWheelTopWindow()
|
||||||
|
{
|
||||||
|
m_pTopWindow = NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void CWindowManager::LockWindow(CWindow * pWin)
|
void CWindowManager::LockWindow(CWindow * pWin)
|
||||||
{
|
{
|
||||||
if (m_pActiveWindow)
|
if (m_pActiveWindow)
|
||||||
@ -638,6 +677,9 @@ namespace UI
|
|||||||
{
|
{
|
||||||
SetTop(pTopWindow);
|
SetTop(pTopWindow);
|
||||||
}
|
}
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
m_pTopWindow = pTopWindow;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
CWindow * CWindowManager::GetActivateWindow()
|
CWindow * CWindowManager::GetActivateWindow()
|
||||||
|
@ -40,6 +40,12 @@ namespace UI
|
|||||||
|
|
||||||
void SetParent(CWindow * pWindow, CWindow * pParentWindow);
|
void SetParent(CWindow * pWindow, CWindow * pParentWindow);
|
||||||
void SetPickAlways(CWindow * pWindow);
|
void SetPickAlways(CWindow * pWindow);
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
bool OnMouseWheelButtonUp();
|
||||||
|
bool OnMouseWheelButtonDown();
|
||||||
|
void SetWheelTopWindow(CWindow* pWindow);
|
||||||
|
void ClearWheelTopWindow();
|
||||||
|
#endif
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -169,6 +175,9 @@ namespace UI
|
|||||||
CWindow * m_pActiveWindow;
|
CWindow * m_pActiveWindow;
|
||||||
TWindowContainer m_ActiveWindowList;
|
TWindowContainer m_ActiveWindowList;
|
||||||
CWindow * m_pLockWindow;
|
CWindow * m_pLockWindow;
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
CWindow* m_pTopWindow;
|
||||||
|
#endif
|
||||||
TWindowContainer m_LockWindowList;
|
TWindowContainer m_LockWindowList;
|
||||||
CWindow * m_pPointWindow;
|
CWindow * m_pPointWindow;
|
||||||
CWindow * m_pLeftCaptureWindow;
|
CWindow * m_pLeftCaptureWindow;
|
||||||
|
@ -51,6 +51,24 @@ PyObject* wndMgrSetClippingMaskWindow(PyObject* poSelf, PyObject* poArgs)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
PyObject* wndMgrSetWheelTopWindow(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
UI::CWindow* pWindow;
|
||||||
|
if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
|
||||||
|
return Py_BuildException();
|
||||||
|
|
||||||
|
UI::CWindowManager::Instance().SetWheelTopWindow(pWindow);
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject* wndMgrClearWheelTopWindow(PyObject* poSelf, PyObject* poArgs)
|
||||||
|
{
|
||||||
|
UI::CWindowManager::Instance().ClearWheelTopWindow();
|
||||||
|
return Py_BuildNone();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
PyObject * wndMgrGetAspect(PyObject * poSelf, PyObject * poArgs)
|
PyObject * wndMgrGetAspect(PyObject * poSelf, PyObject * poArgs)
|
||||||
{
|
{
|
||||||
return Py_BuildValue("f", UI::CWindowManager::Instance().GetAspect());
|
return Py_BuildValue("f", UI::CWindowManager::Instance().GetAspect());
|
||||||
@ -2341,6 +2359,11 @@ void initwndMgr()
|
|||||||
{ "SetClippingMaskWindow", wndMgrSetClippingMaskWindow, METH_VARARGS },
|
{ "SetClippingMaskWindow", wndMgrSetClippingMaskWindow, METH_VARARGS },
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
{ "SetWheelTopWindow", wndMgrSetWheelTopWindow, METH_VARARGS },
|
||||||
|
{ "ClearWheelTopWindow", wndMgrClearWheelTopWindow, METH_VARARGS },
|
||||||
|
#endif
|
||||||
|
|
||||||
// WindowManager
|
// WindowManager
|
||||||
{ "SetMouseHandler", wndMgrSetMouseHandler, METH_VARARGS },
|
{ "SetMouseHandler", wndMgrSetMouseHandler, METH_VARARGS },
|
||||||
{ "SetScreenSize", wndMgrSetScreenSize, METH_VARARGS },
|
{ "SetScreenSize", wndMgrSetScreenSize, METH_VARARGS },
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
#define ENABLE_DRAGON_SOUL_SYSTEM
|
#define ENABLE_DRAGON_SOUL_SYSTEM
|
||||||
#define ENABLE_NEW_EQUIPMENT_SYSTEM
|
#define ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
#define __BL_CLIP_MASK__
|
#define __BL_CLIP_MASK__
|
||||||
|
#define __BL_MOUSE_WHEEL_TOP_WINDOW__
|
||||||
|
|
||||||
bool LocaleService_IsYMIR();
|
bool LocaleService_IsYMIR();
|
||||||
bool LocaleService_IsJAPAN();
|
bool LocaleService_IsJAPAN();
|
||||||
|
@ -60,13 +60,29 @@ void CPythonApplication::OnMouseMiddleButtonUp(int x, int y)
|
|||||||
|
|
||||||
void CPythonApplication::OnMouseWheel(int nLen)
|
void CPythonApplication::OnMouseWheel(int nLen)
|
||||||
{
|
{
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
bool bUIWheel = false;
|
||||||
|
|
||||||
|
if (nLen > 0)
|
||||||
|
bUIWheel = UI::CWindowManager::Instance().OnMouseWheelButtonUp();
|
||||||
|
else
|
||||||
|
bUIWheel = UI::CWindowManager::Instance().OnMouseWheelButtonDown();
|
||||||
|
|
||||||
|
if (!bUIWheel)
|
||||||
|
{
|
||||||
|
CCameraManager& rkCmrMgr = CCameraManager::Instance();
|
||||||
|
CCamera* pkCmrCur = rkCmrMgr.GetCurrentCamera();
|
||||||
|
if (pkCmrCur)
|
||||||
|
pkCmrCur->Wheel(nLen);
|
||||||
|
}
|
||||||
|
#else
|
||||||
CCameraManager& rkCmrMgr=CCameraManager::Instance();
|
CCameraManager& rkCmrMgr=CCameraManager::Instance();
|
||||||
CCamera* pkCmrCur=rkCmrMgr.GetCurrentCamera();
|
CCamera* pkCmrCur=rkCmrMgr.GetCurrentCamera();
|
||||||
if (pkCmrCur)
|
if (pkCmrCur)
|
||||||
pkCmrCur->Wheel(nLen);
|
pkCmrCur->Wheel(nLen);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CPythonApplication::OnMouseMove(int x, int y)
|
void CPythonApplication::OnMouseMove(int x, int y)
|
||||||
{
|
{
|
||||||
CCameraManager& rkCmrMgr=CCameraManager::Instance();
|
CCameraManager& rkCmrMgr=CCameraManager::Instance();
|
||||||
@ -81,7 +97,7 @@ void CPythonApplication::OnMouseMove(int x, int y)
|
|||||||
y = Point.y;
|
y = Point.y;
|
||||||
ClientToScreen(m_hWnd, &Point);
|
ClientToScreen(m_hWnd, &Point);
|
||||||
|
|
||||||
// 2004.07.26.myevan.안철수HackShield와 충돌
|
// 2004.07.26.myevan.<EFBFBD><EFBFBD>ö<EFBFBD><EFBFBD>HackShield<EFBFBD><EFBFBD> <20>浹
|
||||||
SetCursorPos(Point.x, Point.y);
|
SetCursorPos(Point.x, Point.y);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -111,7 +127,9 @@ void CPythonApplication::OnMouseLeftButtonUp(int x, int y)
|
|||||||
void CPythonApplication::OnMouseLeftButtonDoubleClick(int x, int y)
|
void CPythonApplication::OnMouseLeftButtonDoubleClick(int x, int y)
|
||||||
{
|
{
|
||||||
UI::CWindowManager& rkWndMgr=UI::CWindowManager::Instance();
|
UI::CWindowManager& rkWndMgr=UI::CWindowManager::Instance();
|
||||||
|
#if !defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
rkWndMgr.RunMouseLeftButtonDown(x, y);
|
rkWndMgr.RunMouseLeftButtonDown(x, y);
|
||||||
|
#endif
|
||||||
rkWndMgr.RunMouseLeftButtonDoubleClick(x, y);
|
rkWndMgr.RunMouseLeftButtonDoubleClick(x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1513,6 +1513,12 @@ void initapp()
|
|||||||
PyModule_AddIntConstant(poModule, "__BL_CLIP_MASK__", false);
|
PyModule_AddIntConstant(poModule, "__BL_CLIP_MASK__", false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__BL_MOUSE_WHEEL_TOP_WINDOW__)
|
||||||
|
PyModule_AddIntConstant(poModule, "__BL_MOUSE_WHEEL_TOP_WINDOW__", true);
|
||||||
|
#else
|
||||||
|
PyModule_AddIntConstant(poModule, "__BL_MOUSE_WHEEL_TOP_WINDOW__", false);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
|
||||||
PyModule_AddIntConstant(poModule, "ENABLE_NEW_EQUIPMENT_SYSTEM", 1);
|
PyModule_AddIntConstant(poModule, "ENABLE_NEW_EQUIPMENT_SYSTEM", 1);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user