CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

Improve HTML Menu

Open Dliix66 opened this issue 11 months ago • 0 comments

Following up with #758 I made the changed requested by removing it from the core config and adding the options on the menu itself.

The features are:

  • Added an option in CenterHtmlMenu to have automated Title and Option max length.
  • Improved automated max length tu fully support HTML tags
  • Added an option int CenterHtmlMenu to inline the pagination options Prev/Next/Close.
  • Fixed a bug where a CenterHtmlMenu with 7 options would have 2 pages, the second one being empty.

Usage: CenterHtmlMenu menu = new CenterHtmlMenu("Test Very Long Title Menu", this, inlinePageOptions: true, maxTitleLength: 32, maxOptionLength: 26);

Info:

  • All 4 new parameters in the constructor are optional for retro-compatibility
  • inlinePageOptions defaults to true.
  • maxTitleLength and maxOptionLength both default to 0. 0 = no max length.

PS: I don't really know why this PR also shows the #751 (ReplicateConvar) content as it's already on main 🤔

Dliix66 avatar Feb 08 '25 11:02 Dliix66