Snoopy20111

Members
  • Content Count

    24
  • Joined

  • Last visited

Community Reputation

24 Excellent

About Snoopy20111

  • Rank
    Bottle Rocketeer

Profile Information

  • Location Array

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks, I'm glad to keep the ball rolling. A new thread seemed like it would be a mess anyway.
  2. Relatively big update pushed out! Added a popup that pulls up one of the latest images from either SOHO or STEREO, for the KMI or STEREO respectively. Should you be offline or the link to the image is down, there's a backup image already available. Also added some sound effects that I edited myself from my own field recordings (including a scanner, a washing machine, and a bunch of mostly broken cameras). This response is a bump, but darn it I'm happy to get this out the door and didn't want to follow the suggestion to start a new thread.
  3. Truth be told, I was also looking for a better solution for the button, but the main issue was indeed the image display. I already tried DialogGUIBox and DialogGUISpace, but neither of those displayed anything. DialogGUISprite though, I completely overlooked in the first place. Without UI Styles, it displays my image! Working with the scaling to make it display with the same dimensions and all, but this is a great step forward. Thank you! I'll post again once I get it properly together or if there are any further problems.
  4. So, I've been working with this, and I haven't found a great solution. Basically, the only thing I've gotten to properly work is to make it show up as the UIStyle for a Button (thank you HebaruSan!!). This displays mostly as I would like it to, but it's pretty weird behind the scenes, and I would still like to just use the DialogGUIImage stuff instead. The main issue is when I mouse over the button, it does this: The draw function for making this happen is as follows. If anybody has any ideas or any further information on where to go from here, I would really appreciate it. internal void DrawPopupStuff() { if (imageLoaded == false) { LoadNewImage_KMI(); imageLoaded = true; } UIStyleState currentImageOfSun = new UIStyleState() { background = spriteOfSun, textColor = Color.black }; UIStyle sunDisplayStyle = new UIStyle() { normal = currentImageOfSun, highlight = currentImageOfSun, active = currentImageOfSun, disabled = currentImageOfSun, }; if (isShowingWindow == true) { if (myPopupDialog == null && imageOfSun != null) { myPopupDialog = PopupDialog.SpawnPopupDialog(new Vector2(0.3f, 0.3f), new Vector2(0.3f, 0.3f), new MultiOptionDialog( "Solar Image Window", "Global Message", "Solar Image Window Title", HighLogic.UISkin, new Rect(0.25f, 0.25f, imageOfSun.width/2, imageOfSun.height/2), new DialogGUIBase[] { //new DialogGUIImage( new Vector2(0, 0), //new Vector2(560, 512),new Color(1, 1, 1, 1),imageOfSun), new DialogGUIButton(spriteOfSun, delegate{ isShowingWindow = false; }, imageOfSun.width/2, imageOfSun.height/2, true), /*new DialogGUIBox("message", sunDisplayStyle, imageOfSun.width, imageOfSun.height, delegate{return false;}, new DialogGUIBase[] { new DialogGUIButton("test", delegate {}, true) }),*/ //new DialogGUIFlexibleSpace(), /*new DialogGUIButton("close", delegate { isShowingWindow = false; }, true)*/ } ), false, HighLogic.UISkin); } myPopupDialog.SetDraggable(true); } else { myPopupDialog.Dismiss(); } }
  5. After using the mentioned methods to check my texture works, I can confirm it is loading into the game, being assigned properly to a Texture2D variable, and displayed with OnGUI. Image is in the upper left: So I think this means there's something up with the DialogGUIImage methods (or at least I'm not using them right) but I don't know what.
  6. This is exactly the kind of information I was looking for, thank you! Unfortunately, I still can't get anything to come up. Not sure if the problem is DialogGUI, my image, or something else. At any rate, this will be helpful in the future. Excellent lot of examples, thank you! I'm going to try your method of converting to a Sprite, hopefully it works.
  7. Howdy All, I'm working on extending an old project of mine right now, and the lack of documentation for DialogGUI classes is really messing me up, so I wanted to see if anybody can point me in the right direction. As it stands, I have an image of the sun that I want to show in a Popup window, with a button to close the window. Simple enough. This is the function I currently call when I want it to come up, which mostly works: internal void DrawPopupStuff() { if (imageLoaded == false) { LoadNewImage_KMI(); imageLoaded = true; } if (isShowingWindow == true) { if (myPopupDialog == null && imageOfSun != null) { myPopupDialog = PopupDialog.SpawnPopupDialog(new Vector2(0.3f, 0.3f), new Vector2(0.3f, 0.3f), new MultiOptionDialog( "Solar Image Window", "Global Message", "Solar Image Window Title", HighLogic.UISkin, new Rect(0.25f, 0.25f, 800, 800), new DialogGUIBase[] { new DialogGUIFlexibleSpace(), new DialogGUIButton("close", delegate { isShowingWindow = false; }, true), new DialogGUIImage( new Vector2(0.0f, 0.0f), new Vector2(0.0f, 0.0f),Color.red,imageOfSun) } ), false, HighLogic.UISkin); } myPopupDialog.SetDraggable(true); } else { myPopupDialog.Dismiss(); } } Now, most of this seems to work as intended, but unfortunately the DialogGUIImage part escapes me. No image appears. I don't know exactly what it wants from me with the Vectors, nor why it needs a Color. Screenshot: If anybody could also point me to any examples of PopupDialog in action besides those already visible in DMagic's OG thread, that would be very helpful.
  8. Update has just been pushed out, sorry for the delay! Lots of school projects and I picked up my first contract, so I've been strapped for time. Fortunately I got everything to work and even improved it a bit, I think.
  9. Honestly? I'm not a coder. Github in theory sounds great, but when it comes to hosting stuff there I get lost The grammar and spelling and all is just .cfg stuff, already editable anyway. Adding in the already meager source code is the difference of a few kilobytes. And to be quite honest, my interest in KSP comes and goes; I simply don't have the time nor willpower to sit down and sort all of it out nor further develop the mod anymore. This is much of why I include the code with the mod: it's much easier that way for potential inheritors to pick up and work with Solar Science if they literally already have everything for it. Also, update to 1.2 coming right up, just gotta deal with the slight engine update and we'll be all set!
  10. It does not. Up until this point Solar Science has simply been an updated version of the original mod I made a year and a half ago, before contracts were introduced. That said, it's an interesting idea. One day I may revisit it. Certainly! In fact, unless 1.2 does an entire shakedown of how parts and plugins are structured, it should work as is.
  11. This mod looks fantastic. Too bad TAC LS isn't up to speed yet. Did TAC happen to give any kind of time frame for the fix?
  12. Thanks for the heads up! I'm amazed this mod is actually going somewhere
  13. Alright gang, it's working! Better still @MKellerBR, I put Solar Science on Spacedock, which allowed me to put it in CKAN with the check of a box. If I ever find the time, I think what would be next on my list is making sure you are indeed pointing it at Kerbol, and maybe a more detailed view of what images are actually being produced...something like these, or maybe like these?
  14. D'oh is right! I even read multiple things saying to make sure it used .NET 3.5 instead of 4.0, but never bothered to check...after building it properly it works fine. What confuses me though is that after working fine up until or past 1.0 without rebuilding, it suddenly didn't like the script (which, if I'm correct, was indeed originally built in .NET 3.5). Oh well.
  15. I'm not 100% sure what it's telling me here, but I did as you said, rebuilt, and ran KSP. Loaded up my test craft and pressed the button to execute the experiment a few times (which did nothing), then closed the game. Found this at the very end of the logs. Am I correct in assuming this means KSP simply can't find the script? [LOG 11:23:51.171] Unpacking Solar Science Test [EXC 11:23:54.634] FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. BaseEvent.Invoke () UIPartActionButton.OnClick () UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) UnityEngine.EventSystems.EventSystem:Update() [EXC 11:23:56.449] FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. BaseEvent.Invoke () UIPartActionButton.OnClick () UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) UnityEngine.EventSystems.EventSystem:Update() [EXC 11:23:59.713] FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. BaseEvent.Invoke () UIPartActionButton.OnClick () UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) UnityEngine.EventSystems.EventSystem:Update() [EXC 11:23:59.965] FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. BaseEvent.Invoke () UIPartActionButton.OnClick () UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) UnityEngine.EventSystems.EventSystem:Update() [EXC 11:24:05.425] InvalidOperationException: Steamworks is not initialized. Steamworks.InteropHelp.TestIfAvailableClient () Steamworks.SteamController.Shutdown () SteamController.KSPSteamController.OnDestroy () SteamController.KSPSteamController.OnApplicationQuit () [LOG 11:24:05.469] KbApp.OnDestroy Vessel Crew [LOG 11:24:05.472] KbApp.OnDestroy Planet Resources [LOG 11:24:05.479] [UIApp] OnDestroy: KSPedia [EXC 11:24:05.486] InvalidOperationException: Steamworks is not initialized. Steamworks.InteropHelp.TestIfAvailableClient () Steamworks.SteamController.Shutdown () SteamController.KSPSteamController.OnDestroy ()