Compare commits

..

No commits in common. "0f12044fcd56ff10b501fbf75c7eb4f4d024b387" and "dcd02b50bb49038c51c11dcd6eabf0b1f13598b4" have entirely different histories.

2 changed files with 19 additions and 28 deletions

View file

@ -424,10 +424,7 @@ void CServerBrowserHttp::Refresh()
}
bool ServerbrowserParseUrl(NETADDR *pOut, const char *pUrl)
{
int Failure = net_addr_from_url(pOut, pUrl, nullptr, 0);
if(Failure || pOut->port == 0)
return true;
return false;
return net_addr_from_url(pOut, pUrl, nullptr, 0) != 0;
}
bool CServerBrowserHttp::Validate(json_value *pJson)
{

View file

@ -1301,24 +1301,21 @@ float CUi::DoScrollbarV(const void *pId, const CUIRect *pRect, float Current)
}
else if(HotItem() == pId)
{
if(InsideHandle)
{
if(MouseButton(0))
{
SetActiveItem(pId);
m_ActiveScrollbarOffset = MouseY() - Handle.y;
Grabbed = true;
}
}
else if(MouseButtonClicked(0))
if(MouseButton(0))
{
SetActiveItem(pId);
m_ActiveScrollbarOffset = Handle.h / 2.0f;
m_ActiveScrollbarOffset = MouseY() - Handle.y;
Grabbed = true;
}
}
else if(MouseButtonClicked(0) && !InsideHandle && InsideRail)
{
SetActiveItem(pId);
m_ActiveScrollbarOffset = Handle.h / 2.0f;
Grabbed = true;
}
if(InsideRail && !MouseButton(0))
if(InsideHandle && !MouseButton(0))
{
SetHotItem(pId);
}
@ -1383,22 +1380,19 @@ float CUi::DoScrollbarH(const void *pId, const CUIRect *pRect, float Current, co
}
else if(HotItem() == pId)
{
if(InsideHandle)
{
if(MouseButton(0))
{
SetActiveItem(pId);
m_ActiveScrollbarOffset = MouseX() - Handle.x;
Grabbed = true;
}
}
else if(MouseButtonClicked(0))
if(MouseButton(0))
{
SetActiveItem(pId);
m_ActiveScrollbarOffset = Handle.w / 2.0f;
m_ActiveScrollbarOffset = MouseX() - Handle.x;
Grabbed = true;
}
}
else if(MouseButtonClicked(0) && !InsideHandle && InsideRail)
{
SetActiveItem(pId);
m_ActiveScrollbarOffset = Handle.w / 2.0f;
Grabbed = true;
}
if(!pColorInner && (InsideHandle || Grabbed) && (CheckActiveItem(pId) || HotItem() == pId))
{
@ -1406,7 +1400,7 @@ float CUi::DoScrollbarH(const void *pId, const CUIRect *pRect, float Current, co
Handle.y -= 1.5f;
}
if(InsideRail && !MouseButton(0))
if(InsideHandle && !MouseButton(0))
{
SetHotItem(pId);
}