Bitte melden Sie sich an, um dieses Bild zu sehen.
PythonApplicatioEvent.cpp (Replace)
Code
PythonWindowManager.cpp
Code
- /*
- void CWindowManager::RunIMEUpdate()
- Find that function and add before that code
- /*
- bool CWindowManager::RunMouseWheelEvent(long nLen)
- {
- CWindow * pWin;
- if (pWin = GetPointWindow())
- {
- if (pWin->IsRendering() || pWin->IsShow())
- {
- if (pWin->RunMouseWheelEvent(nLen))
- return true;
- else if (pWin->GetRoot()->RunMouseWheelEvent(nLen))
- return true;
- }
- }
- return false;
- }
PythonWindowManager.h
PythonWindow.cpp
Code
PythonWindow.h
ui.py
Python
- # in Window class
- # find this
- self.onMouseLeftButtonUpEvent = None
- # and add this
- self.onRunMouseWheelEvent = None
- # At the end of this class add
- def OnRunMouseWheel(self, nLen):
- if not self.onRunMouseWheelEvent:
- return False
- apply(self.onRunMouseWheelEvent, (bool(nLen < 0), ))
- return True
- def SetOnRunMouseWheelEvent(self, event):
- self.onRunMouseWheelEvent = __mem_func__(event)