mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 19:43:06 +01:00
Minor improvements
- Paths are now properly rotated, including flat ones - Banners can not be rotated - The X and Y coordinates can be changed with spinners - Highligint selected tile while now hovering over viewport - Added helper function for enabling and disabling widgets more easily
This commit is contained in:
@@ -1029,6 +1029,18 @@ void widget_scroll_get_part(rct_window *w, rct_widget *widget, int x, int y, int
|
||||
}
|
||||
}
|
||||
|
||||
void widget_set_enabled(rct_window *w, uint64 widgetIndex, bool enabled)
|
||||
{
|
||||
if (enabled) {
|
||||
w->enabled_widgets |= (1ULL << widgetIndex);
|
||||
w->disabled_widgets &= ~(1ULL << widgetIndex);
|
||||
}
|
||||
else {
|
||||
w->enabled_widgets &= ~(1ULL << widgetIndex);
|
||||
w->disabled_widgets |= (1ULL << widgetIndex);
|
||||
}
|
||||
}
|
||||
|
||||
void widget_set_checkbox_value(rct_window *w, int widgetIndex, int value)
|
||||
{
|
||||
if (value)
|
||||
|
||||
@@ -67,6 +67,7 @@ int widget_is_highlighted(rct_window *w, int widgetIndex);
|
||||
int widget_is_active_tool(rct_window *w, int widgetIndex);
|
||||
void widget_scroll_get_part(rct_window *w, rct_widget* widget, int x, int y, int *output_x, int *output_y, int *output_scroll_area, int *scroll_id);
|
||||
|
||||
void widget_set_enabled(rct_window *w, uint64 widgetIndex, bool enabled);
|
||||
void widget_set_checkbox_value(rct_window *w, int widgetIndex, int value);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user