linuxgurugamer Posted February 21, 2016 Share Posted February 21, 2016 (edited) I have the following code to add a button to the stock toolbar: private void OnGuiAppLauncherReady () { try { button = ApplicationLauncher.Instance.AddModApplication ( GUIToggle, GUIToggle, null, null, null, null, ApplicationLauncher.AppScenes.VAB | ApplicationLauncher.AppScenes.SPH, //visibleInScenes GameDatabase.Instance.GetTexture (texPathDefault, false) //texture ); } catch (Exception ex) { Log.Error ("Error adding ApplicationLauncher button: " + ex.Message); } } there are times I want the button to be disabled, and to be greyed out (like the launch icon gets greyed out when there isn't a ship to launch). I have the code to do this, how can I disable/enable the toolbar button? Thanks Edited February 21, 2016 by linuxgurugamer Link to comment Share on other sites More sharing options...
Crzyrndm Posted February 21, 2016 Share Posted February 21, 2016 KER also does this, looks like the relevant function here Link to comment Share on other sites More sharing options...
linuxgurugamer Posted February 21, 2016 Author Share Posted February 21, 2016 Thank you. A slight modification of that worked Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now