- case MN_DEACTIVE:
- {
- text_drawf(&black_text, pitem.text,
- x_pos, bottom,
- A_HMIDDLE, A_VMIDDLE, 2);
- break;
- }
-
- case MN_HL:
- {
- int x = screen->w/2 - menu_width/2;
- int y = screen->h/2 + raw_y_pos;
- /* Draw a horizontal line with a little 3d effect */
- fillrect(x, y + 6,
- menu_width, 4,
- 210,50,50,225);
- fillrect(x, y + 10 + 6,
- menu_width, 2,
- 0,0,0,255);
- break;
- }
- case MN_LABEL:
- {
- text_drawf(&white_big_text, pitem.text,
- x_pos, bottom,
- A_HMIDDLE, A_VMIDDLE, 2);
- break;
- }
- case MN_TEXTFIELD:
- case MN_NUMFIELD:
- {
- int input_pos = (strlen(pitem.input)*font_width)/2;
- int text_pos = (strlen(pitem.text)+1)*font_width/2;
-
- fillrect(start_x - input_pos + text_pos - 1, cen_y_10_f - 10,
- (strlen(pitem.input)+1)*font_width + 2, 20,
- 255,255,255,255);
- fillrect(start_x - input_pos + text_pos, cen_y_10_f - 9,
- (strlen(pitem.input)+1)*font_width, 18,
- 0,0,0,128);
-
- text_drawf(&gold_text, pitem.input,
- x_pos + text_pos, bottom,
- A_HMIDDLE, A_VMIDDLE, 2);
-
- text_drawf(text_font, pitem.text,
- x_pos - (((strlen(pitem.input)+1) * font_width)/2), bottom,
- A_HMIDDLE, A_VMIDDLE, shadow_size);
- break;
- }
- case MN_STRINGSELECT:
- {
- int list_pos_2 = (strlen(string_list_active(pitem.list))+1)*font_width;
- int list_pos = (strlen(string_list_active(pitem.list))*font_width)/2;
- int text_pos = ((strlen(pitem.text) + 1)*font_width)/2;
-
- /* Draw arrows */
- texture_draw(&arrow_left, start_x - list_pos + text_pos - 17, cen_y_10_f - 8);
- texture_draw(&arrow_right, start_x - list_pos + text_pos - 1 + list_pos_2, cen_y_10_f - 8);
-
- /* Draw input background */
- fillrect(start_x - list_pos + text_pos - 1, cen_y_10_f - 10,
- list_pos_2 + 2, 20,
- 255,255,255,255);
- fillrect(start_x - list_pos + text_pos, cen_y_10_f - 9,
- list_pos_2, 18,
- 0,0,0,128);
-
- text_drawf(&gold_text, string_list_active(pitem.list),
- x_pos + text_pos, bottom,
- A_HMIDDLE, A_VMIDDLE,2);
-
- text_drawf(text_font, pitem.text,
- x_pos - list_pos_2/2, bottom,
- A_HMIDDLE, A_VMIDDLE, shadow_size);
- break;
- }
- case MN_BACK:
- {
- texture_draw(&back, start_x + (strlen(pitem.text) * font_width)/2 + font_width, cen_y_10_f - 8);
- break;
- }