Skip to content

Add hover tooltips for setting descriptions - #13

Closed
s12ryt wants to merge 2 commits into
Read1dno:mainfrom
s12ryt:feature/setting-tooltips
Closed

s12ryt wants to merge 2 commits into
Read1dno:mainfrom
s12ryt:feature/setting-tooltips

Conversation

@s12ryt

@s12ryt s12ryt commented Sep 24, 2026

Copy link
Copy Markdown

Summary

Adds hover tooltips to the settings menu: hovering a setting's label for 3 seconds opens a popup with a detailed description of what the feature does.

Implementation

Core (layout.cpp / internal.hpp)

  • begin_row(label, control_width) gains an optional trailing const char *description parameter — it is the chokepoint every row widget funnels through, and already computes the label text rect.
  • Hover tracking uses a new g_row_hover_time map (ImGuiID → elapsed seconds), accumulating io.DeltaTime while the mouse stays inside the label rect; leaving the label resets the timer. At ≥ 3 s the tooltip is drawn.
  • draw_row_tooltip() renders a 320 px-wide popup matching the existing menu popup style: soft shadow + draw_popup_surface (rounding 10) + wrapped text, positioned below the label and clamped to the menu bounds.

Widgets (widgets.cpp / popups.cpp)

  • All row wrappers accept the optional description and forward it: toggle_row, toggle_color_row, slider_row (int/float), slider_percent_row, select_row, multiselect_row, button_row, text_input_row, keybind_row, color_row, settings_popup_row, toggle_popup_row, and the slider_row_impl template. Existing call sites are unaffected (parameter defaults to nullptr).

Pages

  • 54 descriptions wired into the pages (8 combat rows, 32 visuals rows, 14 misc rows), e.g. Player ESP, Legit Sync, Chams materials, radar groups, bomb panel, grenade preview, Lineup Helper, movement features, watermark/event log/binds lists, Language and DPI Scale.

Localization

  • All 54 description strings are registered in the Simplified Chinese and Traditional Chinese translation tables (they follow the existing English-key mechanism), so tooltips localize with the rest of the interface. Missing keys fall back to English.

Testing

  • cmake --build --preset release --parallel builds clean on MSVC.
  • Descriptions are opt-in per row; no existing call sites break.

Depends on the Simplified/Traditional Chinese localization PR (#12) — this branch contains that commit plus the tooltip work.

- Extend render::localization::id with zh_cn and zh_tw entries
- Add full translation tables (~509 strings) for both languages,
  including grenade throw type fallback keys and ESP editor labels
- Dispatch tr() per language; code() returns CN/TW
- Add 简体中文/繁體中文 entries to the Misc language selector
- Merge a system CJK font (msyh/msjh/simsun) into menu, HUD and ESP
  text fonts with Chinese glyph ranges so localized text renders
- Update README interface description
- Extend begin_row and all row widgets with an optional description
  string; hovering a setting label for 3 seconds opens a styled popup
  with the translated description
- draw_row_tooltip renders a 320px popup matching the menu popup style
  (soft shadow, popup surface, wrapped text, bounds-clamped position)
- Thread descriptions through toggle/slider/select/multiselect/keybind/
  color/button/text-input/settings/toggle popup rows
- Wire 54 descriptions into combat, visuals and misc pages
- Add Simplified and Traditional Chinese translations for all
  description keys to both localization tables
@s12ryt s12ryt closed this Sep 25, 2026
@s12ryt
s12ryt deleted the feature/setting-tooltips branch September 25, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant