diff options
Diffstat (limited to 'src/game/client/ui.cpp')
| -rw-r--r-- | src/game/client/ui.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/client/ui.cpp b/src/game/client/ui.cpp index 2161bc77..c5219575 100644 --- a/src/game/client/ui.cpp +++ b/src/game/client/ui.cpp @@ -53,6 +53,13 @@ int CUI::MouseInside(const CUIRect *r) return 0; } +void CUI::ConvertMouseMove(float *x, float *y) +{ + float Fac = (float)(g_Config.m_UiMousesens)/g_Config.m_InpMousesens; + *x = *x*Fac; + *y = *y*Fac; +} + CUIRect *CUI::Screen() { float Aspect = Graphics()->ScreenAspect(); @@ -67,6 +74,11 @@ CUIRect *CUI::Screen() return &m_Screen; } +float CUI::PixelSize() +{ + return Screen()->w/Graphics()->ScreenWidth(); +} + void CUI::SetScale(float s) { g_Config.m_UiScale = (int)(s*100.0f); |