1 /* 2 * This file is part of the Simutrans project under the artistic licence. 3 * (see licence.txt) 4 */ 5 #ifndef _SCEN_INFO_H_ 6 #define _SCEN_INFO_H_ 7 8 9 #include "gui_frame.h" 10 #include "simwin.h" 11 #include "components/gui_flowtext.h" 12 #include "components/gui_tab_panel.h" 13 14 class dynamic_string; 15 /** 16 * All messages since the start of the program 17 * @author prissi 18 */ 19 class scenario_info_t : public gui_frame_t, private action_listener_t 20 { 21 private: 22 gui_tab_panel_t tabs; 23 24 gui_flowtext_t info, goal, rule, result, about, error, debug_msg; 25 26 void update_dynamic_texts(gui_flowtext_t &flow, dynamic_string &text, scr_size size, bool init); 27 28 uint16 get_tab_index(const char* which); 29 public: 30 scenario_info_t(); 31 32 /** 33 * This method is called if an action is triggered 34 * @author Hj. Malthaner 35 * 36 * Returns true, if action is done and no more 37 * components should be triggered. 38 * V.Meyer 39 */ 40 bool action_triggered( gui_action_creator_t *comp, value_t extra) OVERRIDE; 41 42 void draw(scr_coord pos, scr_size size) OVERRIDE; 43 44 void update_scenario_texts(bool init); 45 46 void open_tab(const char* which); 47 get_rdwr_id()48 uint32 get_rdwr_id() OVERRIDE { return magic_scenario_info; } 49 void rdwr( loadsave_t *file ) OVERRIDE; 50 }; 51 52 #endif 53