-
Notifications
You must be signed in to change notification settings - Fork 550
Expand file tree
/
Copy pathCreateCacheUI.cs
More file actions
20 lines (19 loc) · 811 Bytes
/
CreateCacheUI.cs
File metadata and controls
20 lines (19 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using DLS.Simulation;
using Seb.Helpers;
using Seb.Vis;
using Seb.Vis.UI;
using UnityEngine;
namespace DLS.Graphics
{
public static class CreateCacheUI
{
public static void DrawCreatingCacheInfo()
{
string chipName = Simulator.nameOfChipWhoseCacheIsBeingCreated;
int percentage = (int)(Simulator.cacheCreatingProgress * 100);
string text = $"Creating Cache ({percentage}%): {chipName}";
Vector2 textSize = UI.CalculateTextSize(text, UIThemeLibrary.FontSizeDefault, UIThemeLibrary.DefaultFont);
UI.TextWithBackground(new Vector2(BottomBarUI.buttonSpacing, BottomBarUI.barHeight + BottomBarUI.buttonSpacing), new Vector2(textSize.x + 1, textSize.y + 1), Anchor.BottomLeft, text, UIThemeLibrary.DefaultFont, UIThemeLibrary.FontSizeDefault, Color.yellow, ColHelper.MakeCol255(40));
}
}
}