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 9
9
class ENGINE_API IInputReceiver
10
10
{
11
11
public:
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);
18
18
BOOL IR_GetKeyState (int dik);
19
19
BOOL IR_GetBtnState (int btn);
20
20
void IR_Capture (void );
Original file line number Diff line number Diff line change 3
3
4
4
#include " ui/UIStatic.h"
5
5
#include " ui/UIBtnHint.h"
6
-
6
+ # include " xrEngine/IInputReceiver.h "
7
7
8
8
#define C_DEFAULT D3DCOLOR_XRGB (0xff ,0xff ,0xff )
9
9
@@ -97,11 +97,10 @@ void CUICursor::UpdateCursorPosition(int _dx, int _dy)
97
97
{
98
98
Fvector2 p;
99
99
vPrevPos = vPos;
100
- if (m_b_use_win_cursor)
100
+ if (m_b_use_win_cursor)
101
101
{
102
- POINT pti;
103
- BOOL r = GetCursorPos (&pti);
104
- if (!r) return ;
102
+ Ivector2 pti;
103
+ IInputReceiver::IR_GetMousePosReal (pti);
105
104
p.x = (float )pti.x ;
106
105
p.y = (float )pti.y ;
107
106
vPos.x = p.x * (UI_BASE_WIDTH/(float )Device.dwWidth );
@@ -122,6 +121,7 @@ void CUICursor::SetUICursorPosition(Fvector2 pos)
122
121
POINT p;
123
122
p.x = iFloor (vPos.x / (UI_BASE_WIDTH/(float )Device.dwWidth ));
124
123
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 );
127
127
}
You can’t perform that action at this time.
0 commit comments