CrabUI
Loading...
Searching...
No Matches
Style Merge.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Reflection;
5using System.Diagnostics;
6using System.Runtime.CompilerServices;
7using System.IO;
8
9using Barotrauma;
10using Microsoft.Xna.Framework;
11using Microsoft.Xna.Framework.Input;
12using Microsoft.Xna.Framework.Graphics;
13using HarmonyLib;
14using CrabUI;
15
16namespace CrabUITest
17{
18
19 public class StyleMerge : UnitTest
20 {
21 public override void Execute(string method = null)
22 {
23 CUIStyle a = new CUIStyle() {
24 {"prop1", "a"},
25 {"prop2", "a"},
26 //{"prop3", "a"},
27 };
28 CUIStyle b = new CUIStyle()
29 {
30 {"prop1", "b"},
31 //{"prop2", "b"},
32 {"prop3", "b"},
33 };
34
35 CUIStyle c = a + b;
36
37 Expect(c["prop1"]).ToBeEqual("b");
38 Expect(c["prop2"]).ToBeEqual("a");
39 Expect(c["prop3"]).ToBeEqual("b");
40 }
41
42 }
43}
In Fact just an observable dict.
Definition CUIStyle.cs:21