File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 99class ENGINE_API IInputReceiver
1010{
1111public:
12- void IR_GetLastMouseDelta (Ivector2& p);
13- void IR_GetMousePosScreen (Ivector2& p);
14- void IR_GetMousePosReal (HWND hwnd, Ivector2 &p);
15- void IR_GetMousePosReal (Ivector2 &p);
16- void IR_GetMousePosIndependent (Fvector2 &f);
17- void IR_GetMousePosIndependentCrop (Fvector2 &f);
12+ static void IR_GetLastMouseDelta (Ivector2& p);
13+ static void IR_GetMousePosScreen (Ivector2& p);
14+ static void IR_GetMousePosReal (HWND hwnd, Ivector2 &p);
15+ static void IR_GetMousePosReal (Ivector2 &p);
16+ static void IR_GetMousePosIndependent (Fvector2 &f);
17+ static void IR_GetMousePosIndependentCrop (Fvector2 &f);
1818 BOOL IR_GetKeyState (int dik);
1919 BOOL IR_GetBtnState (int btn);
2020 void IR_Capture (void );
Original file line number Diff line number Diff line change 33
44#include " ui/UIStatic.h"
55#include " ui/UIBtnHint.h"
6-
6+ # include " xrEngine/IInputReceiver.h "
77
88#define C_DEFAULT D3DCOLOR_XRGB (0xff ,0xff ,0xff )
99
@@ -97,11 +97,10 @@ void CUICursor::UpdateCursorPosition(int _dx, int _dy)
9797{
9898 Fvector2 p;
9999 vPrevPos = vPos;
100- if (m_b_use_win_cursor)
100+ if (m_b_use_win_cursor)
101101 {
102- POINT pti;
103- BOOL r = GetCursorPos (&pti);
104- if (!r) return ;
102+ Ivector2 pti;
103+ IInputReceiver::IR_GetMousePosReal (pti);
105104 p.x = (float )pti.x ;
106105 p.y = (float )pti.y ;
107106 vPos.x = p.x * (UI_BASE_WIDTH/(float )Device.dwWidth );
@@ -122,6 +121,7 @@ void CUICursor::SetUICursorPosition(Fvector2 pos)
122121 POINT p;
123122 p.x = iFloor (vPos.x / (UI_BASE_WIDTH/(float )Device.dwWidth ));
124123 p.y = iFloor (vPos.y / (UI_BASE_HEIGHT/(float )Device.dwHeight ));
125-
126- SetCursorPos (p.x , p.y );
124+ if (m_b_use_win_cursor)
125+ ClientToScreen (Device.m_hWnd , (LPPOINT)&p);
126+ SetCursorPos (p.x , p.y );
127127}
You can’t perform that action at this time.
0 commit comments