- {
- int list_pos_2 = list_width + 16;
- int list_pos = list_width/2;
- int text_pos = (text_width + 16)/2;
-
- /* Draw arrows */
- context.draw_surface(arrow_left.get(),
- Vector(x_pos - list_pos + text_pos - 17, y_pos - 8),
- LAYER_GUI);
- context.draw_surface(arrow_right.get(),
- Vector(x_pos - list_pos + text_pos - 1 + list_pos_2, y_pos - 8),
- LAYER_GUI);
-
- /* Draw input background */
- context.draw_filled_rect(
- Vector(x_pos - list_pos + text_pos - 1, y_pos - 10),
- Vector(list_pos_2 + 2, 20),
- Color(1.0f, 1.0f, 1.0f, 1.0f), LAYER_GUI - 4);
- context.draw_filled_rect(
- Vector(x_pos - list_pos + text_pos, y_pos - 9),
- Vector(list_pos_2, 18),
- Color(0, 0, 0, 0.5f), LAYER_GUI - 5);
-
- context.draw_text(text_font, pitem.list[pitem.selected],
- Vector(SCREEN_WIDTH/2 + text_pos, y_pos - int(text_font->get_height()/2)),
- CENTER_ALLIGN, LAYER_GUI);
- context.draw_text(text_font, pitem.text,
- Vector(SCREEN_WIDTH/2 + list_pos_2/2, y_pos - int(text_font->get_height()/2)),
- CENTER_ALLIGN, LAYER_GUI);
- break;
- }
+ {
+ float roff = Resources::arrow_left->get_width();
+ // Draw left side
+ context.draw_text(Resources::normal_font, pitem.text,
+ Vector(left, y_pos - int(Resources::normal_font->get_height()/2)),
+ ALIGN_LEFT, LAYER_GUI, text_color);
+
+ // Draw right side
+ context.draw_surface(Resources::arrow_left,
+ Vector(right - list_width - roff - roff, y_pos - 8),
+ LAYER_GUI);
+ context.draw_surface(Resources::arrow_right,
+ Vector(right - roff, y_pos - 8),
+ LAYER_GUI);
+ context.draw_text(Resources::normal_font, pitem.list[pitem.selected],
+ Vector(right - roff, y_pos - int(Resources::normal_font->get_height()/2)),
+ ALIGN_RIGHT, LAYER_GUI, text_color);
+ break;
+ }