|
|
@ -56,7 +56,7 @@ public:
|
|
|
|
df::building* getSelectedBuilding() { return Gui::getAnyBuilding(parent); }
|
|
|
|
df::building* getSelectedBuilding() { return Gui::getAnyBuilding(parent); }
|
|
|
|
|
|
|
|
|
|
|
|
std::string getFocusString() { return "commandprompt"; }
|
|
|
|
std::string getFocusString() { return "commandprompt"; }
|
|
|
|
viewscreen_commandpromptst(std::string entry):is_response(false)
|
|
|
|
viewscreen_commandpromptst(std::string entry):is_response(false), submitted(false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
show_fps=gps->display_frames;
|
|
|
|
show_fps=gps->display_frames;
|
|
|
|
gps->display_frames=0;
|
|
|
|
gps->display_frames=0;
|
|
|
@ -127,6 +127,7 @@ protected:
|
|
|
|
std::list<std::pair<color_value,std::string> > responses;
|
|
|
|
std::list<std::pair<color_value,std::string> > responses;
|
|
|
|
int cursor_pos;
|
|
|
|
int cursor_pos;
|
|
|
|
int history_idx;
|
|
|
|
int history_idx;
|
|
|
|
|
|
|
|
bool submitted;
|
|
|
|
bool is_response;
|
|
|
|
bool is_response;
|
|
|
|
bool show_fps;
|
|
|
|
bool show_fps;
|
|
|
|
int frame;
|
|
|
|
int frame;
|
|
|
@ -194,6 +195,9 @@ void viewscreen_commandpromptst::submit()
|
|
|
|
Screen::dismiss(this);
|
|
|
|
Screen::dismiss(this);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(submitted)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
submitted = true;
|
|
|
|
prompt_ostream out(this);
|
|
|
|
prompt_ostream out(this);
|
|
|
|
Core::getInstance().runCommand(out, get_entry());
|
|
|
|
Core::getInstance().runCommand(out, get_entry());
|
|
|
|
if(out.empty() && responses.empty())
|
|
|
|
if(out.empty() && responses.empty())
|
|
|
|