Roxen.git/
server/
modules/
graphics/
gbutton.pike
Branch:
Tag:
Non-build tags
All tags
No tags
1999-11-24
1999-11-24 17:35:26 by Per Hedbor <ph@opera.com>
7597c886dcccc05c18abdb25e161b7fcb7d383dd (
15
lines) (+
9
/-
6
)
[
Show
|
Annotate
]
Branch:
5.2
This module can now be dumped to a .o file
Rev: server/modules/graphics/gbutton.pike:1.7
25:
// must also be aligned left or right.
-
constant cvs_version = "$Id: gbutton.pike,v 1.
6
1999/11/
16
13
:
53
:
02
jonasw
Exp $";
+
constant cvs_version = "$Id: gbutton.pike,v 1.
7
1999/11/
24
17
:
35
:
26
per
Exp $";
constant thread_safe = 1; #include <module.h>
34:
roxen.ImageCache button_cache;
-
object
button_font
= resolve_font("haru 32")
;
-
object
button_border;
-
object
button_mask;
+
Image.Font
button_font;
+
Image.Image
button_border;
+
Image.Image
button_mask;
// Distance between icon image and text
92:
void start() { button_cache = roxen.ImageCache("gbutton", draw_button);
+
button_font = resolve_font( "haru 32" );
}
117:
if (!args->dim) b = button_border->clone()->grey()-> modify_by_intensity(1, 1, 1, args->bo, ({ 255, 255, 255 }) );
-
else {
+
else
+
{
array dim_bg = ({ 255, 255, 255 }); array dim_bo = ({ 0, 0, 0 }); for (int i = 0; i < 3; i++) {
228:
int icn_y = (b_height - icon->img->ysize()) / 2; if (!icon->alpha)
-
icon->alpha = icon->img->clone()->clear(
Image.Color.white
);
+
icon->alpha = icon->img->clone()->clear(
({255,255,255}
)
)
;
if (args->dim) icon->alpha *= 0.3; button->paste_mask(icon->img, icon->alpha, icn_x, icn_y);