roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
714 stars 111 forks source link

A method to control the characters limitation of a centerhtmlmenu item #454

Open samyycX opened 2 months ago

samyycX commented 2 months ago

Currently we have CenterHtmlMenu.cs#L61 and CenterHtmlMenu.cs#72 to limit the character amount.

I think it is because the original developer want to ensure items are displayed in one line. (https://github.com/roflmuffin/CounterStrikeSharp/pull/268#issuecomment-1901229101) But with such limitation, the html labels in text will be counted too, even if they don't change the length of the text, and using other characters (like Chinese characters) will cause the view to be malformed too.

It would be great if we can have a method to control these limitations, and please tell me if there are more reasons to have these limitations.