feat: Adds size/style support to gump builders, optimizes EscapeHtml (#2257)
> [!IMPORTANT] > **Developer Note** > THIS IS A BREAKING CHANGE TO THE NEW API GUMP. > Please give us feedback in [discord ](https://muo.gg/discord) if you have issues, need help, or have ideas for a better API change! ### Summary * Adds support for size/style to dynamic/static builder. * Drastically simplifies the dynamic/static builder api for AddHtml. * Cleans up some legacy gump files.
This commit is contained in:
parent
ea86d5b2a6
commit
7bd5a853a3
40 changed files with 398 additions and 635 deletions
|
|
@ -7,13 +7,14 @@ public abstract class StaticWarningGump<T> : StaticGump<T> where T : StaticWarni
|
|||
{
|
||||
public virtual int Header => 1060635; // <CENTER>WARNING</CENTER>
|
||||
public virtual int HeaderColor => 0x7800;
|
||||
public virtual int ContentColor => StaticLocalizedContent > 0 ? 0x7F00 : 0xFFC000;
|
||||
public virtual string ContentColor => "#FFC000";
|
||||
public abstract int Width { get; }
|
||||
public abstract int Height { get; }
|
||||
public virtual bool CancelButton => true;
|
||||
|
||||
// If this is overridden, then the content will be localized and cached.
|
||||
public virtual int StaticLocalizedContent => 0;
|
||||
public virtual int StaticLocalizedContentColor => 0x7F00;
|
||||
|
||||
public virtual string Content => null;
|
||||
|
||||
|
|
@ -55,7 +56,7 @@ public abstract class StaticWarningGump<T> : StaticGump<T> where T : StaticWarni
|
|||
width - 20,
|
||||
height - 80,
|
||||
StaticLocalizedContent,
|
||||
(short)ContentColor,
|
||||
StaticLocalizedContentColor,
|
||||
false,
|
||||
true
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue