mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
Added: Show image tooltips even if not inside link
--HG-- branch : develop
This commit is contained in:
parent
9394906182
commit
c6a0b3ed9b
1 changed files with 15 additions and 5 deletions
|
@ -1686,18 +1686,28 @@ namespace NLGUI
|
||||||
if (present[MY_HTML_IMG_STYLE] && value[MY_HTML_IMG_STYLE])
|
if (present[MY_HTML_IMG_STYLE] && value[MY_HTML_IMG_STYLE])
|
||||||
getStyleParams(value[MY_HTML_IMG_STYLE], style);
|
getStyleParams(value[MY_HTML_IMG_STYLE], style);
|
||||||
|
|
||||||
|
// Tooltip
|
||||||
|
const char *tooltip = NULL;
|
||||||
|
// keep "alt" attribute for backward compatibility
|
||||||
|
if (present[MY_HTML_IMG_ALT] && value[MY_HTML_IMG_ALT])
|
||||||
|
tooltip = value[MY_HTML_IMG_ALT];
|
||||||
|
// tooltip
|
||||||
|
if (present[MY_HTML_IMG_TITLE] && value[MY_HTML_IMG_TITLE])
|
||||||
|
tooltip = value[MY_HTML_IMG_TITLE];
|
||||||
|
|
||||||
if (getA() && getParent () && getParent ()->getParent())
|
if (getA() && getParent () && getParent ()->getParent())
|
||||||
{
|
{
|
||||||
// Tooltip
|
|
||||||
const char *tooltip = NULL;
|
|
||||||
if (present[MY_HTML_IMG_ALT] && value[MY_HTML_IMG_ALT])
|
|
||||||
tooltip = value[MY_HTML_IMG_ALT];
|
|
||||||
|
|
||||||
string params = "name=" + getId() + "|url=" + getLink ();
|
string params = "name=" + getId() + "|url=" + getLink ();
|
||||||
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],
|
||||||
"", "browse", params.c_str(), tooltip, style);
|
"", "browse", params.c_str(), tooltip, style);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
if (tooltip)
|
||||||
|
{
|
||||||
|
addButton(CCtrlButton::PushButton, value[MY_HTML_IMG_SRC], value[MY_HTML_IMG_SRC], value[MY_HTML_IMG_SRC],
|
||||||
|
"", "", "", tooltip, style);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
// Get the option to reload (class==reload)
|
// Get the option to reload (class==reload)
|
||||||
bool reloadImg = false;
|
bool reloadImg = false;
|
||||||
|
|
Loading…
Reference in a new issue