mirror of
https://github.com/Meridian59/Meridian59
synced 2026-08-17 18:23:09 -04:00
## What - Adds additional theming controls for the chat box and stats area - Adds `ThemeSkipChatBoxFrame()` to complement the existing `ThemeSkipStatsAreaFrame` (added in #1430) - Adds a customizable border color, `ThemeBorderColor`, that can be used to draw a border around the chat box and/or the stats area in place of the skipped ornament - Dark theme now uses the above to skip the chat box and stats area ornamental frames and to draw a border specific to the dark theme - Default theme is unchanged - related to #1425 ## Why - #1430 removed the stats area ornamental frame in dark theme, but that left the stats area floating without a border - The chat box had a border, but it used ornamental frame resources that did not look good in dark theme - The replacement border should be configurable so future themes can set their own color ## How ### New functions - `module/merintr/theme.c` - `ThemeSkipChatBoxFrame` - returns true when the active theme skips the `B*` chat box ornament. Same shape as the existing `ThemeSkipStatsAreaFrame` - `clientd3d/color.c` - `ThemeBorderColor` - per-theme border color for the stats area and chat box, or `CLR_INVALID` for the default border. Exported via `client.def` so both the client and the interface module read it. One shared color so the two borders match ### Borders Both borders use the existing `DrawBorder`, converting the color to the nearest palette index with `GetClosestPaletteIndex`. - Chat box: drawn by `TextInputDrawBorder` in `clientd3d/textin.c`. No new drawing code. The chat box already drew its own border, it just uses `ThemeBorderColor` now and keeps its focus highlight (highlight color while focused, theme color while not) - Stats area: drawn by `InterfaceDrawElements` in `module/merintr/drawint.c`. New code, since the stats area had no border before ## Notes - The border color is not a `COLOR_*` table entry. The table is for user-customizable colors. This border is a fixed per-theme decision. - The frame and the border are independent. Setting a border color without skipping the frame draws both, which may not look good. Whether to combine them is the theme author's choice. - The chat box border sits a couple of pixels outside the text area, leaving a thin gap that shows the window background. This is the existing border geometry, not new to this change. In the default theme the ornament filled that region, so the gap was hidden. With the ornament skipped it is faintly visible. It is minor so I left it out of scope for this change. ### Examples #### Chat Box (before) <img width="954" height="516" alt="image" src="https://github.com/user-attachments/assets/99e270f7-9b9e-41b6-9077-3f55d65d4243" /> - default border clashes with dark theme and is not configurable per-theme #### Chat Box (after) <img width="953" height="516" alt="image" src="https://github.com/user-attachments/assets/48207cf5-be7b-4a3a-af3a-845f56f1b795" /> #### Stat Area (before) <img width="363" height="600" alt="image" src="https://github.com/user-attachments/assets/06b31f14-d1ee-47eb-b495-84cef38e7e0d" /> - floats without a border (see lower left) #### Stat Area (after) <img width="368" height="600" alt="image" src="https://github.com/user-attachments/assets/a560acbd-afc9-42e3-b28a-677623e3115d" /> |
||
|---|---|---|
| .. | ||
| audio.md | ||
| themes.md | ||
| webhooks.md | ||