コード例 #1
0
 void ResourceManager(int windowID)
 {
     GUILayout.BeginVertical();
     scroll = GUILayout.BeginScrollView(scroll, Styles.white, GUILayout.Width(width), GUILayout.Height(height));
     foreach (var res in part.Resources)
     {
         GUILayout.BeginHorizontal();
         GUILayout.Label(res.resourceName, Styles.boxed_label, GUILayout.ExpandWidth(true));
         if (GUILayout.Button("Empty", Styles.danger_button, GUILayout.ExpandWidth(false)))
         {
             res.amount = 0;
         }
         if (GUILayout.Button("Fill", Styles.enabled_button, GUILayout.ExpandWidth(false)))
         {
             res.amount = res.maxAmount;
         }
         GUILayout.EndHorizontal();
     }
     GUILayout.EndScrollView();
     if (GUILayout.Button("Close", Styles.danger_button, GUILayout.ExpandWidth(true)))
     {
         manage = false;
     }
     GUILayout.EndVertical();
     GUIWindowBase.TooltipsAndDragWindow();
 }
コード例 #2
0
 public void TanksControlGUI(int windowId)
 {
     GUILayout.BeginVertical();
     tanks_scroll = GUILayout.BeginScrollView(tanks_scroll,
                                              GUILayout.Width(scroll_width),
                                              GUILayout.Height(scroll_height));
     GUILayout.BeginVertical();
     tanks.ForEach(t => t.ControlGUI());
     GUILayout.EndVertical();
     GUILayout.EndScrollView();
     close_button();
     GUILayout.EndVertical();
     GUIWindowBase.TooltipsAndDragWindow();
 }
コード例 #3
0
 public void TanksManagerGUI(int windowId)
 {
     GUILayout.BeginVertical();
     add_tank_gui();
     tanks_scroll = GUILayout.BeginScrollView(tanks_scroll,
                                              GUILayout.Width(scroll_width),
                                              GUILayout.Height(scroll_height));
     GUILayout.BeginVertical();
     tanks.ForEach(t => t.ManageGUI());
     GUILayout.EndVertical();
     GUILayout.EndScrollView();
     volume_configs_gui();
     close_button();
     GUILayout.EndVertical();
     GUIWindowBase.TooltipsAndDragWindow();
 }