ui: reskin terminal window shell, navigation tabs, and home page
This commit is contained in:
1 parent
d7d2fec536
commit
6926f994fd
2 files changed
+75
-28
No files matched your search
@@ -212,17 +212,20 @@ namespace Decentralized
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>把一个币的图放进界面:说明一行、图、图例一行。</summary>
|
||||
/// <summary>把一个币的图放进界面:说明一行、黑框包裹的图、图例一行。</summary>
|
||||
public static void Add(CustomUIBuilder b, string key, string asset, double threshold = 0)
|
||||
{
|
||||
var all = Session.Data.Candles.Of(asset);
|
||||
b.AddLabel(Caption(asset, all));
|
||||
b.AddLabel(Caption(asset, all), "chart_caption_dim");
|
||||
b.BeginPanel(W * Scale + 4f, H * Scale + 4f, TextAnchor.MiddleCenter, 2f, 0f, "chart_bezel");
|
||||
PledgerSkin.Slice(b.Last.image, "ui_hw_bezel", 5);
|
||||
b.AddImage(Render(key, all, threshold), W * Scale, H * Scale);
|
||||
b.AddLabel(L.T(threshold > 0 ? "chart.legend.thr" : "chart.legend"));
|
||||
b.End();
|
||||
b.AddLabel(L.T(threshold > 0 ? "chart.legend.thr" : "chart.legend"), "chart_legend_dim");
|
||||
}
|
||||
|
||||
/// <summary>带币种切换的图:上面一排币种按钮(选中的加方括号),切换后重画。</summary>
|
||||
public static void AddPicker(CustomUIBuilder b, string key, string fallback, Action refresh)
|
||||
/// <summary>带币种切换的图:上面一排币种按钮(选中项带准星角标),切换后重画。</summary>
|
||||
public static void AddPicker(CustomUIBuilder b, string key, string fallback, Action refresh, ICollection<GameObject> picked = null)
|
||||
{
|
||||
var list = ChartAssets.Where(a => a != Assets.Ponero || Unlock.BlackUnlocked).ToList();
|
||||
if (!Picked.TryGetValue(key, out var cur) || !list.Contains(cur)) cur = fallback;
|
||||
@@ -230,7 +233,7 @@ namespace Decentralized
|
||||
foreach (var a in list)
|
||||
{
|
||||
string asset = a;
|
||||
b.AddButton(asset == cur ? "[" + asset + "]" : asset, () => { Picked[key] = asset; refresh(); });
|
||||
PledgerSkin.Pick(b, asset, asset == cur, () => { Picked[key] = asset; refresh(); }, picked);
|
||||
}
|
||||
b.End();
|
||||
Add(b, key, cur);
|
||||
|
||||
Reference in new issue
Block a user