public static new FNResourceOvermanager getResourceOvermanagerForResource(String resource_name) { FNResourceOvermanager fnro; //Debug.Log("getResourceOvermanager"); if (ORSResourceOvermanager.resources_managers.ContainsKey(resource_name)) { fnro = (FNResourceOvermanager) ORSResourceOvermanager.resources_managers[resource_name]; } else { fnro = new FNResourceOvermanager(resource_name); ORSResourceOvermanager.resources_managers.Add(resource_name, fnro); } return fnro; }
public static new FNResourceOvermanager getResourceOvermanagerForResource(String resource_name) { FNResourceOvermanager fnro; //Debug.Log("getResourceOvermanager"); if (ORSResourceOvermanager.resources_managers.ContainsKey(resource_name)) { fnro = (FNResourceOvermanager)ORSResourceOvermanager.resources_managers[resource_name]; } else { fnro = new FNResourceOvermanager(resource_name); ORSResourceOvermanager.resources_managers.Add(resource_name, fnro); } return(fnro); }
protected void OnGUI() { string resourcename = FNResourceManager.FNRESOURCE_MEGAJOULES; Vessel vessel = FlightGlobals.ActiveVessel; ORSResourceManager mega_manager = null; if (vessel != null) { if (FNResourceOvermanager.getResourceOvermanagerForResource(resourcename).hasManagerForVessel(vessel) && !hide_button) { mega_manager = FNResourceOvermanager.getResourceOvermanagerForResource(resourcename).getManagerForVessel(vessel); if (mega_manager.getPartModule() != null) { mega_manager.OnGUI(); if (!PluginHelper.using_toolbar) { GUILayout.BeginArea(button_position); if (GUILayout.Button(guibuttontexture)) { mega_manager.showWindow(); } GUILayout.EndArea(); } else { if (show_window) { mega_manager.showWindow(); show_window = false; } } } } } }
protected override ORSResourceOvermanager getOvermanagerForResource(string resourcename) { return(FNResourceOvermanager.getResourceOvermanagerForResource(resourcename)); }