mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Compare commits
4 commits
dcd02b50bb
...
0f12044fcd
Author | SHA1 | Date | |
---|---|---|---|
0f12044fcd | |||
8f2c288698 | |||
4b6f2e22a8 | |||
7bbd51cf73 |
|
@ -424,7 +424,10 @@ void CServerBrowserHttp::Refresh()
|
||||||
}
|
}
|
||||||
bool ServerbrowserParseUrl(NETADDR *pOut, const char *pUrl)
|
bool ServerbrowserParseUrl(NETADDR *pOut, const char *pUrl)
|
||||||
{
|
{
|
||||||
return net_addr_from_url(pOut, pUrl, nullptr, 0) != 0;
|
int Failure = net_addr_from_url(pOut, pUrl, nullptr, 0);
|
||||||
|
if(Failure || pOut->port == 0)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
bool CServerBrowserHttp::Validate(json_value *pJson)
|
bool CServerBrowserHttp::Validate(json_value *pJson)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1300,6 +1300,8 @@ float CUi::DoScrollbarV(const void *pId, const CUIRect *pRect, float Current)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(HotItem() == pId)
|
else if(HotItem() == pId)
|
||||||
|
{
|
||||||
|
if(InsideHandle)
|
||||||
{
|
{
|
||||||
if(MouseButton(0))
|
if(MouseButton(0))
|
||||||
{
|
{
|
||||||
|
@ -1308,14 +1310,15 @@ float CUi::DoScrollbarV(const void *pId, const CUIRect *pRect, float Current)
|
||||||
Grabbed = true;
|
Grabbed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(MouseButtonClicked(0) && !InsideHandle && InsideRail)
|
else if(MouseButtonClicked(0))
|
||||||
{
|
{
|
||||||
SetActiveItem(pId);
|
SetActiveItem(pId);
|
||||||
m_ActiveScrollbarOffset = Handle.h / 2.0f;
|
m_ActiveScrollbarOffset = Handle.h / 2.0f;
|
||||||
Grabbed = true;
|
Grabbed = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(InsideHandle && !MouseButton(0))
|
if(InsideRail && !MouseButton(0))
|
||||||
{
|
{
|
||||||
SetHotItem(pId);
|
SetHotItem(pId);
|
||||||
}
|
}
|
||||||
|
@ -1379,6 +1382,8 @@ float CUi::DoScrollbarH(const void *pId, const CUIRect *pRect, float Current, co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(HotItem() == pId)
|
else if(HotItem() == pId)
|
||||||
|
{
|
||||||
|
if(InsideHandle)
|
||||||
{
|
{
|
||||||
if(MouseButton(0))
|
if(MouseButton(0))
|
||||||
{
|
{
|
||||||
|
@ -1387,12 +1392,13 @@ float CUi::DoScrollbarH(const void *pId, const CUIRect *pRect, float Current, co
|
||||||
Grabbed = true;
|
Grabbed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(MouseButtonClicked(0) && !InsideHandle && InsideRail)
|
else if(MouseButtonClicked(0))
|
||||||
{
|
{
|
||||||
SetActiveItem(pId);
|
SetActiveItem(pId);
|
||||||
m_ActiveScrollbarOffset = Handle.w / 2.0f;
|
m_ActiveScrollbarOffset = Handle.w / 2.0f;
|
||||||
Grabbed = true;
|
Grabbed = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!pColorInner && (InsideHandle || Grabbed) && (CheckActiveItem(pId) || HotItem() == pId))
|
if(!pColorInner && (InsideHandle || Grabbed) && (CheckActiveItem(pId) || HotItem() == pId))
|
||||||
{
|
{
|
||||||
|
@ -1400,7 +1406,7 @@ float CUi::DoScrollbarH(const void *pId, const CUIRect *pRect, float Current, co
|
||||||
Handle.y -= 1.5f;
|
Handle.y -= 1.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(InsideHandle && !MouseButton(0))
|
if(InsideRail && !MouseButton(0))
|
||||||
{
|
{
|
||||||
SetHotItem(pId);
|
SetHotItem(pId);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue