/** * * rct2: 0x006EA41D */ static void window_tooltip_paint(rct_window *w, rct_drawpixelinfo *dpi) { int left = w->x; int top = w->y; int right = w->x + w->width - 1; int bottom = w->y + w->height - 1; // Background gfx_fill_rect(dpi, left + 1, top + 1, right - 1, bottom - 1, 0x0200002D); gfx_fill_rect(dpi, left + 1, top + 1, right - 1, bottom - 1, 0x02000084); // Sides gfx_fill_rect(dpi, left + 0, top + 2, left + 0, bottom - 2, 0x0200002F); gfx_fill_rect(dpi, right + 0, top + 2, right + 0, bottom - 2, 0x0200002F); gfx_fill_rect(dpi, left + 2, bottom + 0, right - 2, bottom + 0, 0x0200002F); gfx_fill_rect(dpi, left + 2, top + 0, right - 2, top + 0, 0x0200002F); // Corners gfx_draw_pixel(dpi, left + 1, top + 1, 0x0200002F); gfx_draw_pixel(dpi, right - 1, top + 1, 0x0200002F); gfx_draw_pixel(dpi, left + 1, bottom - 1, 0x0200002F); gfx_draw_pixel(dpi, right - 1, bottom - 1, 0x0200002F); // Text left = w->x + ((w->width + 1) / 2) - 1; top = w->y + 1; draw_string_centred_raw(dpi, left, top, RCT2_GLOBAL(RCT2_ADDRESS_TOOLTIP_TEXT_HEIGHT, uint16), (char *)gTooltip_text_buffer); }
/** * * rct2: 0x00667AA3 */ static void window_error_paint(rct_window *w, rct_drawpixelinfo *dpi) { int t, l, r, b; l = w->x; t = w->y; r = w->x + w->width - 1; b = w->y + w->height - 1; gfx_fill_rect(dpi, l + 1, t + 1, r - 1, b - 1, 0x200002D); gfx_fill_rect(dpi, l, t, r, b, 0x200008B); gfx_fill_rect(dpi, l, t + 2, l, b - 2, 0x200002F); gfx_fill_rect(dpi, r, t + 2, r, b - 2, 0x200002F); gfx_fill_rect(dpi, l + 2, b, r - 2, b, 0x200002F); gfx_fill_rect(dpi, l + 2, t, r - 2, t, 0x200002F); gfx_fill_rect(dpi, r + 1, t + 1, r + 1, t + 1, 0x200002F); gfx_fill_rect(dpi, r - 1, t + 1, r - 1, t + 1, 0x200002F); gfx_fill_rect(dpi, l + 1, b - 1, l + 1, b - 1, 0x200002F); gfx_fill_rect(dpi, r - 1, b - 1, r - 1, b - 1, 0x200002F); l = w->x + (w->width + 1) / 2 - 1; t = w->y + 1; draw_string_centred_raw(dpi, l, t, _window_error_num_lines, _window_error_text); }
/** * * rct2: 0x006EA41D */ static void window_tooltip_paint(rct_window* w, rct_drawpixelinfo* dpi) { int32_t left = w->x; int32_t top = w->y; int32_t right = w->x + w->width - 1; int32_t bottom = w->y + w->height - 1; // Background gfx_filter_rect(dpi, left + 1, top + 1, right - 1, bottom - 1, PALETTE_45); gfx_filter_rect(dpi, left + 1, top + 1, right - 1, bottom - 1, PALETTE_GLASS_LIGHT_ORANGE); // Sides gfx_filter_rect(dpi, left + 0, top + 2, left + 0, bottom - 2, PALETTE_DARKEN_3); gfx_filter_rect(dpi, right + 0, top + 2, right + 0, bottom - 2, PALETTE_DARKEN_3); gfx_filter_rect(dpi, left + 2, bottom + 0, right - 2, bottom + 0, PALETTE_DARKEN_3); gfx_filter_rect(dpi, left + 2, top + 0, right - 2, top + 0, PALETTE_DARKEN_3); // Corners gfx_filter_pixel(dpi, left + 1, top + 1, PALETTE_DARKEN_3); gfx_filter_pixel(dpi, right - 1, top + 1, PALETTE_DARKEN_3); gfx_filter_pixel(dpi, left + 1, bottom - 1, PALETTE_DARKEN_3); gfx_filter_pixel(dpi, right - 1, bottom - 1, PALETTE_DARKEN_3); // Text left = w->x + ((w->width + 1) / 2) - 1; top = w->y + 1; draw_string_centred_raw(dpi, left, top, _tooltipNumLines, _tooltipText); }
/** * * rct2: 0x00667AA3 */ static void window_error_paint(rct_window *w, rct_drawpixelinfo *dpi) { sint32 t, l, r, b; l = w->x; t = w->y; r = w->x + w->width - 1; b = w->y + w->height - 1; gfx_filter_rect(dpi, l + 1, t + 1, r - 1, b - 1, PALETTE_45); gfx_filter_rect(dpi, l, t, r, b, PALETTE_GLASS_SATURATED_RED); gfx_filter_rect(dpi, l, t + 2, l, b - 2, PALETTE_DARKEN_3); gfx_filter_rect(dpi, r, t + 2, r, b - 2, PALETTE_DARKEN_3); gfx_filter_rect(dpi, l + 2, b, r - 2, b, PALETTE_DARKEN_3); gfx_filter_rect(dpi, l + 2, t, r - 2, t, PALETTE_DARKEN_3); gfx_filter_rect(dpi, r + 1, t + 1, r + 1, t + 1, PALETTE_DARKEN_3); gfx_filter_rect(dpi, r - 1, t + 1, r - 1, t + 1, PALETTE_DARKEN_3); gfx_filter_rect(dpi, l + 1, b - 1, l + 1, b - 1, PALETTE_DARKEN_3); gfx_filter_rect(dpi, r - 1, b - 1, r - 1, b - 1, PALETTE_DARKEN_3); l = w->x + (w->width + 1) / 2 - 1; t = w->y + 1; draw_string_centred_raw(dpi, l, t, _window_error_num_lines, _window_error_text); }