mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-02 13:53:40 +01:00
Fix UIColor layout (#1998)
* Fix UIColor layout * Handle <color(0)> correctly
This commit is contained in:
parent
88bb224894
commit
018524fb8f
2 changed files with 105 additions and 66 deletions
|
|
@ -148,10 +148,12 @@ internal sealed class SeStringColorStackSet
|
|||
|
||||
if (expr.TryGetUInt(out var bgra))
|
||||
{
|
||||
// NOTE: if it reads a `0`, then it seems to be doing something else.
|
||||
// See case 0x12 from `Component::GUI::AtkFontAnalyzerBase.vf4`.
|
||||
// Fix when someone figures what's this about.
|
||||
rgbaStack.Add(ColorHelpers.SwapRedBlue(bgra) | 0xFF000000u);
|
||||
// <color(0)> adds the color on the top of the stack. This makes usages like <color(gnum99)> effectively
|
||||
// become a no-op if no value is provided.
|
||||
if (bgra == 0)
|
||||
rgbaStack.Add(rgbaStack[^1]);
|
||||
else
|
||||
rgbaStack.Add(ColorHelpers.SwapRedBlue(bgra) | 0xFF000000u);
|
||||
return rgbaStack[^1];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue