mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Scroll fix, protect scrolling 2 windows at the same time
This commit is contained in:
parent
896ef2f235
commit
210d98666c
|
@ -154,9 +154,9 @@ void CMenus::RenderServerbrowserServerList(CUIRect View)
|
|||
int ScrollNum = NumServers-Num+1;
|
||||
if(ScrollNum > 0)
|
||||
{
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_UP))
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_UP) && UI()->MouseInside(&View))
|
||||
s_ScrollValue -= 3.0f/ScrollNum;
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN))
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN) && UI()->MouseInside(&View))
|
||||
s_ScrollValue += 3.0f/ScrollNum;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -289,9 +289,9 @@ void CMenus::UiDoListboxStart(const void *pID, const CUIRect *pRect, float RowHe
|
|||
Num = 0;
|
||||
if(Num > 0)
|
||||
{
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_UP))
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_UP) && UI()->MouseInside(&View))
|
||||
gs_ListBoxScrollValue -= 3.0f/Num;
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN))
|
||||
if(Input()->KeyPresses(KEY_MOUSE_WHEEL_DOWN) && UI()->MouseInside(&View))
|
||||
gs_ListBoxScrollValue += 3.0f/Num;
|
||||
|
||||
if(gs_ListBoxScrollValue < 0.0f) gs_ListBoxScrollValue = 0.0f;
|
||||
|
|
Loading…
Reference in a new issue