25 static Sound* button_sound = 0;
26 static Sound* click_sound = 0;
27 static Sound* swish_sound = 0;
28 static Sound* chirp_sound = 0;
29 static Sound* accept_sound = 0;
30 static Sound* reject_sound = 0;
31 static Sound* confirm_sound = 0;
32 static Sound* list_select_sound = 0;
33 static Sound* list_scroll_sound = 0;
34 static Sound* list_drop_sound = 0;
35 static Sound* combo_open_sound = 0;
36 static Sound* combo_close_sound = 0;
37 static Sound* combo_hilite_sound = 0;
38 static Sound* combo_select_sound = 0;
39 static Sound* menu_open_sound = 0;
40 static Sound* menu_close_sound = 0;
41 static Sound* menu_select_sound = 0;
42 static Sound* menu_hilite_sound = 0;
44 static int gui_volume = 0;
67 sprintf_s(buf,
"Button %d",
id);
72 :
ActiveWindow(p->GetScreen(), ax, ay, aw, ah, aid, 0, p)
90 sprintf_s(buf,
"Button %d",
id);
102 static void LoadInterfaceSound(
DataLoader* loader,
const char* wave,
Sound*& s)
116 LoadInterfaceSound(loader,
"button.wav", button_sound);
117 LoadInterfaceSound(loader,
"click.wav", click_sound);
118 LoadInterfaceSound(loader,
"swish.wav", swish_sound);
119 LoadInterfaceSound(loader,
"chirp.wav", chirp_sound);
120 LoadInterfaceSound(loader,
"accept.wav", accept_sound);
121 LoadInterfaceSound(loader,
"reject.wav", reject_sound);
122 LoadInterfaceSound(loader,
"confirm.wav", confirm_sound);
123 LoadInterfaceSound(loader,
"list_select.wav", list_select_sound);
124 LoadInterfaceSound(loader,
"list_scroll.wav", list_scroll_sound);
125 LoadInterfaceSound(loader,
"list_drop.wav", list_drop_sound);
126 LoadInterfaceSound(loader,
"combo_open.wav", combo_open_sound);
127 LoadInterfaceSound(loader,
"combo_close.wav", combo_close_sound);
128 LoadInterfaceSound(loader,
"combo_hilite.wav", combo_hilite_sound);
129 LoadInterfaceSound(loader,
"combo_select.wav", combo_select_sound);
130 LoadInterfaceSound(loader,
"menu_open.wav", menu_open_sound);
131 LoadInterfaceSound(loader,
"menu_close.wav", menu_close_sound);
132 LoadInterfaceSound(loader,
"menu_select.wav", menu_select_sound);
133 LoadInterfaceSound(loader,
"menu_hilite.wav", menu_hilite_sound);
149 delete confirm_sound;
150 delete list_select_sound;
151 delete list_scroll_sound;
152 delete list_drop_sound;
153 delete combo_open_sound;
154 delete combo_close_sound;
155 delete combo_hilite_sound;
156 delete combo_select_sound;
157 delete menu_open_sound;
158 delete menu_close_sound;
159 delete menu_select_sound;
160 delete menu_hilite_sound;
177 float old_alpha =
alpha;
182 Rect btn_rect(x,y,w,h);
235 int vert_space = label_rect.
h;
236 int horz_space = label_rect.
w;
240 vert_space = (vert_space - label_rect.
h)/2;
242 label_rect.
w = horz_space;
245 label_rect.
y += vert_space;
299 label_rect.
y += img_h;
300 label_rect.
h -= img_h;
304 label_rect.
x += img_w;
305 label_rect.
w -= img_w;
309 label_rect.
w -= img_w;
313 label_rect.
h -= img_h;
331 if (img_h > h) img_h = h-2;
332 if (img_w > w) img_w = w-2;
343 case 1: img_x_offset = (w/2-img_w/2);
350 case 3: img_y_offset = (h/2-img_h/2);
352 case 4: img_x_offset = (w/2-img_w/2);
353 img_y_offset = (h/2-img_h/2);
356 img_y_offset = (h/2-img_h/2);
363 case 7: img_x_offset = (w/2-img_w/2);
372 img_rect.
x = img_x_offset;
373 img_rect.
y = img_y_offset;
487 if (vol >= -10000 && vol <= 0)
584 if (nNewValue < 0) nNewValue = 0;
585 if (nNewValue >
rect.
w/2) nNewValue =
rect.
w/2;