30 public static string fName =
"CreativeInventoryWidget";
65 category.Color = category.Name
switch {
66 "Minerals" =>
new Color(128, 128, 128),
67 "Electrics" =>
new Color(128, 140, 255),
68 "Plants" =>
new Color(64, 160, 64),
69 "Weapons" =>
new Color(255, 128, 112),
78 if (
Input.Scroll.HasValue) {
82 m_componentCreativeInventory.CategoryIndex -= (int)
Input.Scroll.Value.Z;
95 if (componentPlayer !=
null) {
119 m_categoryLeftButton.IsEnabled = m_componentCreativeInventory.CategoryIndex > 0;
120 m_categoryRightButton.IsEnabled = m_componentCreativeInventory.CategoryIndex < m_categories.Count - 1;
123 category.Panel.IsVisible =
false;
static ReadOnlyList< string > Categories
ContainerWidget GuiWidget
static object Get(Type type, string name)
static void ShowDialog(ContainerWidget parentWidget, Dialog dialog)
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
Component FindComponent(Type type, string name, bool throwOnError)