73 byte m_color; ///< Widget color, see docs/ottd-colourtext-palette.png |
73 byte m_color; ///< Widget color, see docs/ottd-colourtext-palette.png |
74 bool m_is_closing : 1; ///< Widget was logically destroyed |
74 bool m_is_closing : 1; ///< Widget was logically destroyed |
75 bool m_dont_clip : 1; ///< should not be clipped by parent (container) |
75 bool m_dont_clip : 1; ///< should not be clipped by parent (container) |
76 StringID m_tooltips; ///< Tooltips that are shown when right clicking on a widget |
76 StringID m_tooltips; ///< Tooltips that are shown when right clicking on a widget |
77 Anchors m_anchors; ///< Resize/move when container resizes? |
77 Anchors m_anchors; ///< Resize/move when container resizes? |
|
78 Point16 m_min_size; ///< Minimum size |
|
79 Point16 m_max_size; ///< Maximum size |
|
80 Point16 m_size_step; ///< When resizing, what step is the best |
78 Handlers m_handlers; ///< dynamically registered event handlers |
81 Handlers m_handlers; ///< dynamically registered event handlers |
79 |
82 |
80 Widget() |
83 Widget() |
81 : m_container(NULL), m_id(0), m_rect(), m_data(0), m_feature_flags(FF_NONE), m_color(0) |
84 : m_container(NULL), m_id(0), m_rect(), m_data(0), m_feature_flags(FF_NONE), m_color(0) |
82 , m_is_closing(false), m_tooltips(0), m_anchors(PIN_NONE) |
85 , m_is_closing(false), m_tooltips(0), m_anchors(PIN_NONE) |
|
86 , m_max_size(Point16::max()), m_size_step(1, 1) |
83 {} |
87 {} |
84 |
88 |
85 Widget(CompositeWidget *container, WidgetId id, FeatureFlags feature_flags, byte color, const Rect16 &rect, StringID tooltips) |
89 Widget(CompositeWidget *container, WidgetId id, FeatureFlags feature_flags, byte color, const Rect16 &rect, StringID tooltips) |
86 : m_container(container) |
90 : m_container(container) |
87 , m_id(id) |
91 , m_id(id) |