Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve HTML Menu #770

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Dliix66
Copy link

@Dliix66 Dliix66 commented Feb 8, 2025

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 Dliix66 requested a review from roflmuffin as a code owner February 8, 2025 11:12
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.

4 participants