]> icculus.org git repositories - divverent/nexuiz.git/blob - data/qcsrc/menu-div0test/item/image.c
add "clear" button in join dialog
[divverent/nexuiz.git] / data / qcsrc / menu-div0test / item / image.c
1 #ifdef INTERFACE
2 CLASS(Image) EXTENDS(Item)
3         METHOD(Image, configureImage, void(entity, string))
4         METHOD(Image, draw, void(entity))
5         METHOD(Image, toString, string(entity))
6         ATTRIB(Image, src, string, string_null)
7         ATTRIB(Image, color, vector, '1 1 1')
8 ENDCLASS(Image)
9 #endif
10
11 #ifdef IMPLEMENTATION
12 string toStringImage(entity me)
13 {
14         return me.src;
15 }
16 void configureImageImage(entity me, string path)
17 {
18         me.src = path;
19 }
20 void drawImage(entity me)
21 {
22         draw_Picture('0 0 0', me.src, '1 1 0', me.color, 1);
23 };
24 #endif