CounterStrikeSharp
CounterStrikeSharp copied to clipboard
Improve HTML Menu
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
CenterHtmlMenuto have automated Title and Option max length. - Improved automated max length tu fully support HTML tags
- Added an option int
CenterHtmlMenuto inline the pagination options Prev/Next/Close. - Fixed a bug where a
CenterHtmlMenuwith 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
-
inlinePageOptionsdefaults to true. -
maxTitleLengthandmaxOptionLengthboth 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 🤔