59 * Enabled, visible or unclicked widgets*/ |
59 * Enabled, visible or unclicked widgets*/ |
60 WIDG_DISABLED = 4, // widget is greyed out, not available |
60 WIDG_DISABLED = 4, // widget is greyed out, not available |
61 WIDG_HIDDEN = 5, // widget is made invisible |
61 WIDG_HIDDEN = 5, // widget is made invisible |
62 WIDG_LOWERED = 6, // widget is paint lowered, a pressed button in fact |
62 WIDG_LOWERED = 6, // widget is paint lowered, a pressed button in fact |
63 } ResizeFlag; |
63 } ResizeFlag; |
|
64 |
|
65 /* used to indicate the end of widgets' list for vararg functions */ |
|
66 enum { |
|
67 WIDGET_LIST_END = -1, |
|
68 }; |
64 |
69 |
65 typedef struct Widget { |
70 typedef struct Widget { |
66 byte type; ///< Widget type, see @WindowWidgetTypes |
71 byte type; ///< Widget type, see @WindowWidgetTypes |
67 byte display_flags; ///< Resize direction, alignment, etc. during resizing, see @ResizeFlags |
72 byte display_flags; ///< Resize direction, alignment, etc. during resizing, see @ResizeFlags |
68 byte color; ///< Widget colour, see docs/ottd-colourtext-palette.png |
73 byte color; ///< Widget colour, see docs/ottd-colourtext-palette.png |
781 void InvalidateWidget(const Window *w, byte widget_index); |
786 void InvalidateWidget(const Window *w, byte widget_index); |
782 void InvalidateWindowData(WindowClass cls, WindowNumber number); |
787 void InvalidateWindowData(WindowClass cls, WindowNumber number); |
783 void RaiseWindowButtons(Window *w); |
788 void RaiseWindowButtons(Window *w); |
784 void RelocateAllWindows(int neww, int newh); |
789 void RelocateAllWindows(int neww, int newh); |
785 int PositionMainToolbar(Window *w); |
790 int PositionMainToolbar(Window *w); |
|
791 void CDECL SetWindowWidgetsDisabledState(Window *w, bool disab_stat, int widgets, ...); |
|
792 void CDECL SetWindowWidgetsHiddenState(Window *w, bool hidden_stat, int widgets, ...); |
|
793 void CDECL SetWindowWidgetsLoweredState(Window *w, bool lowered_stat, int widgets, ...); |
786 |
794 |
787 /* misc_gui.c*/ |
795 /* misc_gui.c*/ |
788 void GuiShowTooltips(StringID string_id); |
796 void GuiShowTooltips(StringID string_id); |
789 |
797 |
790 /* widget.c */ |
798 /* widget.c */ |