Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GUI_DIALOGS_EDITOR_RESIZE_MAP_HPP_INCLUDED
00017 #define GUI_DIALOGS_EDITOR_RESIZE_MAP_HPP_INCLUDED
00018
00019 #include "gui/dialogs/dialog.hpp"
00020
00021 namespace gui2 {
00022
00023 class ttoggle_button;
00024
00025 class teditor_resize_map : public tdialog
00026 {
00027 public:
00028 enum EXPAND_DIRECTION {
00029 EXPAND_BOTTOM_RIGHT,
00030 EXPAND_BOTTOM,
00031 EXPAND_BOTTOM_LEFT,
00032 EXPAND_RIGHT,
00033 EXPAND_CENTER,
00034 EXPAND_LEFT,
00035 EXPAND_TOP_RIGHT,
00036 EXPAND_TOP,
00037 EXPAND_TOP_LEFT
00038 };
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 teditor_resize_map(
00064 int& width
00065 , int& height
00066 , EXPAND_DIRECTION& expand_direction
00067 , bool& copy_edge_terrain);
00068
00069
00070 static bool execute(
00071 int& width
00072 , int& height
00073 , EXPAND_DIRECTION& expand_direction
00074 , bool& copy_edge_terrain
00075 , CVideo& video)
00076 {
00077 return teditor_resize_map(
00078 width
00079 , height
00080 , expand_direction
00081 , copy_edge_terrain).show(video);
00082 }
00083
00084 private:
00085
00086
00087 tfield_integer* width_;
00088
00089
00090 tfield_integer* height_;
00091
00092
00093 int old_width_;
00094
00095
00096 int old_height_;
00097
00098
00099 EXPAND_DIRECTION& expand_direction_;
00100
00101
00102
00103
00104
00105
00106
00107 ttoggle_button* direction_buttons_[9];
00108
00109 void update_expand_direction(twindow& window);
00110
00111 void set_direction_icon(int index, std::string icon);
00112
00113
00114 void pre_show(CVideo& video, twindow& window);
00115
00116
00117 virtual const std::string& window_id() const;
00118 };
00119
00120 }
00121
00122 #endif
00123