Changed: Minor fix for mouseover image

--HG--
branch : develop
This commit is contained in:
Nimetu 2017-07-23 22:40:07 +03:00
parent e35195252f
commit 8300821d0e

View file

@ -1774,7 +1774,7 @@ namespace NLGUI
tooltip = value[MY_HTML_IMG_TITLE]; tooltip = value[MY_HTML_IMG_TITLE];
// Mouse over image // Mouse over image
const char *overSrc = value[MY_HTML_IMG_SRC]; string overSrc;
if (present[MY_HTML_IMG_DATA_OVER_SRC] && value[MY_HTML_IMG_DATA_OVER_SRC]) if (present[MY_HTML_IMG_DATA_OVER_SRC] && value[MY_HTML_IMG_DATA_OVER_SRC])
{ {
overSrc = value[MY_HTML_IMG_DATA_OVER_SRC]; overSrc = value[MY_HTML_IMG_DATA_OVER_SRC];
@ -1788,7 +1788,7 @@ namespace NLGUI
overSrc, "browse", params.c_str(), tooltip, style); overSrc, "browse", params.c_str(), tooltip, style);
} }
else else
if (tooltip || overSrc) if (tooltip || !overSrc.empty())
{ {
addButton(CCtrlButton::PushButton, value[MY_HTML_IMG_SRC], value[MY_HTML_IMG_SRC], value[MY_HTML_IMG_SRC], addButton(CCtrlButton::PushButton, value[MY_HTML_IMG_SRC], value[MY_HTML_IMG_SRC], value[MY_HTML_IMG_SRC],
overSrc, "", "", tooltip, style); overSrc, "", "", tooltip, style);