fix style

This commit is contained in:
Edgar 2022-02-14 13:57:15 +01:00
parent 17d93f63e3
commit 527835e171
No known key found for this signature in database
GPG key ID: 8731E6C0166EAA85
2 changed files with 5 additions and 5 deletions

View file

@ -2834,7 +2834,7 @@ bool CMenus::HandleListInputs(const CUIRect &View, float &ScrollValue, const flo
return NewIndex != -1;
}
void CMenus::DoToolTip(const CUIRect *pNearRect, const char* pText, float WidthHint)
void CMenus::DoToolTip(const CUIRect *pNearRect, const char *pText, float WidthHint)
{
if(!UI()->MouseInside(pNearRect))
return;
@ -2848,9 +2848,9 @@ void CMenus::DoToolTip(const CUIRect *pNearRect, const char* pText, float WidthH
if(WidthHint < 0.0f)
Rect.w = TextRender()->TextWidth(0, 14.0f, pText, -1, -1.0f) + 4.0f;
Rect.h = 30.0f;
CUIRect *pScreen = UI()->Screen();
// Try the top side.
if(pNearRect->y - Rect.h - MARGIN > pScreen->y)
{
@ -2858,7 +2858,7 @@ void CMenus::DoToolTip(const CUIRect *pNearRect, const char* pText, float WidthH
Rect.y = pNearRect->y - Rect.h - MARGIN;
}
// Try the bottom side.
else if(pNearRect->y + pNearRect->h + MARGIN < pScreen->h)
else if(pNearRect->y + pNearRect->h + MARGIN < pScreen->h)
{
Rect.x = UI()->MouseX() - Rect.w / 2.0f;
Rect.y = pNearRect->y + pNearRect->h + MARGIN;

View file

@ -212,7 +212,7 @@ class CMenus : public CComponent
* @param pNearTo Place the tooltip near this rect.
* @param pText The text to display in the tooltip
*/
void DoToolTip(const CUIRect *pNearRect, const char* pText, float WidthHint = -1.0f);
void DoToolTip(const CUIRect *pNearRect, const char *pText, float WidthHint = -1.0f);
// menus_settings_assets.cpp
public:
struct SCustomItem