2using System.Collections.Generic;
4using System.Reflection;
5using System.Diagnostics;
6using System.Runtime.CompilerServices;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Input;
12using Microsoft.Xna.Framework.Graphics;
20 public partial class CUIComponent : IDisposable
22 private void SetupStyles()
24 Style =
new CUIStyle();
33 private void HandleStylePropChange(
string key,
string value)
37 private void HandleStyleChange(
CUIStyle s)
42 private CUIStyle style;
55 if (style == value)
return;
59 style.OnUse -= HandleStyleChange;
60 style.OnPropChanged -= HandleStylePropChange;
67 style.OnUse += HandleStyleChange;
68 style.OnPropChanged += HandleStylePropChange;
71 HandleStyleChange(style);
75 public CUIStyle ResolvedStyle {
get;
set; }
CUIStyle Style
Allows you to assing parsable string or link to CUIPalette to any prop It's indexable,...
Action OnStyleApplied
Use it to e.g. update component color.
Contains all logic for resolving styles in the framework.
In Fact just an observable dict.