2003-12-15
2003-12-15 15:51:58 by 0
-
8ac5124b07623813b7850c8aef43cbfceccd9930
(13 lines)
(+11/-2)
[
Show
| Annotate
]
Branch: 5.2
Added title attribute for tooltips.
Rev: server/modules/graphics/gbutton.pike:1.103
11:
// textcolor -- button text color
// href -- button URL
// alt -- alternative button alt text
+ // title -- button tooltip
// border -- image border
// state -- enabled|disabled button state
// textstyle -- normal|consensed text
25:
// must also be aligned left or right.
- constant cvs_version = "$Id: gbutton.pike,v 1.102 2003/10/30 12:58:50 anders Exp $";
+ constant cvs_version = "$Id: gbutton.pike,v 1.103 2003/12/15 15:51:58 jonasw Exp $";
constant thread_safe = 1;
#include <module.h>
105: Inside #if defined(manual)
Alternative button and alt text.</p>
</attr>
+ <attr name='title' value='string'><p>
+ Button tooltip.</p>
+ </attr>
+
<attr name='href' value='uri'><p>
Button URI.</p>
</attr>
874:
// Peek at img-align and remove it so it won't be copied by "*-*" glob
// in mk_url().
string img_align = args["img-align"];
+ string title = args->title;
m_delete(args, "img-align");
[string img_src, mapping new_args]=mk_url(id);
885:
"vspace" : args->vspace ]);
if (img_align)
img_attrs->align = img_align;
+ if (title)
+ img_attrs->title = title;
int no_draw = !id->misc->generate_images;
if (mapping size = button_cache->metadata( ({ new_args, (string)content }),