- case MN_DEACTIVE:
- {
- black_text->draw_align(pitem.text,
- x_pos, y_pos,
- A_HMIDDLE, A_VMIDDLE, 2);
- break;
- }
-
- case MN_HL:
- {
- int x = pos_x - menu_width/2;
- int y = y_pos - 12 - effect_offset;
- /* Draw a horizontal line with a little 3d effect */
- fillrect(x, y + 6,
- menu_width, 4,
- 150,200,255,225);
- fillrect(x, y + 6,
- menu_width, 2,
- 255,255,255,255);
- break;
- }
- case MN_LABEL:
- {
- white_big_text->draw_align(pitem.text,
- x_pos, y_pos,
- A_HMIDDLE, A_VMIDDLE, 2);
- break;
- }
- case MN_TEXTFIELD:
- case MN_NUMFIELD:
- case MN_CONTROLFIELD:
- {
- int input_pos = input_width/2;
- int text_pos = (text_width + font_width)/2;
-
- fillrect(x_pos - input_pos + text_pos - 1, y_pos - 10,
- input_width + font_width + 2, 20,
- 255,255,255,255);
- fillrect(x_pos - input_pos + text_pos, y_pos - 9,
- input_width + font_width, 18,
- 0,0,0,128);
-
- gold_text->draw_align(pitem.input,
- x_pos + text_pos, y_pos,
- A_HMIDDLE, A_VMIDDLE, 2);
-
- text_font->draw_align(pitem.text,
- x_pos - (input_width + font_width)/2, y_pos,
- A_HMIDDLE, A_VMIDDLE, shadow_size);
- break;
- }
-// case MN_CONTROLFIELD:
-// {
- /* display key */ // FIXME: the key number is not that obvious to the user :P
-/* char str[12];
- sprintf(str, "%i", *pitem.int_p);
- input_width = strlen(str) * font_width;
-
- int input_pos = input_width/2;
- int text_pos = (text_width + font_width)/2;
-
- fillrect(x_pos - input_pos + text_pos - 1, y_pos - 10,
- input_width + font_width + 2, 20,
- 255,255,255,255);
- fillrect(x_pos - input_pos + text_pos, y_pos - 9,
- input_width + font_width, 18,
- 0,0,0,128);
-
- gold_text->draw_align(str,
- x_pos + text_pos, y_pos,
- A_HMIDDLE, A_VMIDDLE, 2);
-
- text_font->draw_align(pitem.text,
- x_pos - (input_width + font_width)/2, y_pos,
- A_HMIDDLE, A_VMIDDLE, shadow_size);
- break;
- }*/
- case MN_STRINGSELECT:
- {
- int list_pos_2 = list_width + font_width;
- int list_pos = list_width/2;
- int text_pos = (text_width + font_width)/2;
-
- /* Draw arrows */
- arrow_left->draw( x_pos - list_pos + text_pos - 17, y_pos - 8);
- arrow_right->draw( x_pos - list_pos + text_pos - 1 + list_pos_2, y_pos - 8);
-
- /* Draw input background */
- fillrect(x_pos - list_pos + text_pos - 1, y_pos - 10,
- list_pos_2 + 2, 20,
- 255,255,255,255);
- fillrect(x_pos - list_pos + text_pos, y_pos - 9,
- list_pos_2, 18,
- 0,0,0,128);
-
- gold_text->draw_align(string_list_active(pitem.list),
- x_pos + text_pos, y_pos,
- A_HMIDDLE, A_VMIDDLE,2);
-
- text_font->draw_align(pitem.text,
- x_pos - list_pos_2/2, y_pos,
- A_HMIDDLE, A_VMIDDLE, shadow_size);
- break;
- }
- case MN_BACK:
- {
- text_font->draw_align(pitem.text, x_pos, y_pos, A_HMIDDLE, A_VMIDDLE, shadow_size);
- back->draw( x_pos + text_width/2 + font_width, y_pos - 8);
- break;
- }