}
}
-char* MenuItem::get_input_with_symbol(bool active_item)
+std::string MenuItem::get_input_with_symbol(bool active_item)
{
if(!active_item)
input_flickering = true;
char str[1024];
if(input_flickering)
- sprintf(str,"%s-",input);
+ sprintf(str,"%s_",input);
else
sprintf(str,"%s ",input);
-return (char*)str;
+std::string string = str;
+
+return string;
}
/* Set ControlField a key */
break;
case MN_ACTION:
- case MN_TEXTFIELD:
- case MN_NUMFIELD:
Menu::set_current(0);
item[active_item].toggled = true;
break;
+ case MN_TEXTFIELD:
+ case MN_NUMFIELD:
+ menuaction = MENU_ACTION_DOWN;
+ action();
+ break;
case MN_BACK:
Menu::pop_current();
if(pitem.kind == MN_TEXTFIELD || pitem.kind == MN_NUMFIELD)
{
if(active_item == index)
- gold_text->draw_align(pitem.get_input_with_symbol(true), x_pos + text_pos, y_pos, A_HMIDDLE, A_VMIDDLE, 2);
+ gold_text->draw_align((pitem.get_input_with_symbol(true)).c_str(), x_pos + text_pos, y_pos, A_HMIDDLE, A_VMIDDLE, 2);
else
- gold_text->draw_align(pitem.get_input_with_symbol(false), x_pos + text_pos, y_pos, A_HMIDDLE, A_VMIDDLE, 2);
+ gold_text->draw_align((pitem.get_input_with_symbol(false)).c_str(), x_pos + text_pos, y_pos, A_HMIDDLE, A_VMIDDLE, 2);
}
else
gold_text->draw_align(pitem.input,