Jump to content

A GUI framework for modders?


Recommended Posts

First of all, thank you for your efforts! This is exactly the kind of baby step I was looking for to give this sort of thing a try. However I'm a little stuck - I've managed to compile the dll, but loading a craft with the part module freezes the loading of the KSP world on launch (just shows empty space). Looking at the log file, its looking for TacWindowTest.cfg, which does not exist. Where should I go from here? What values should be in the cfg?

Many thanks!

Link to comment
Share on other sites

H,, I thought I nailed that bug, sorry. it should create it on startup.

Do you have the latest version?

Anyway, Here is a sample TacWindowTest.cfg:


MyWindow
{
visible = True
x = 1475
y = 68
width = 400
height = 256
showonstartup = True
}

Link to comment
Share on other sites

  • 1 month later...

Thank you all so much for your work, using this for my first mod! I have found a minor bug that you might want to fix:

When using the 1-Parameter Window constructor without a partModule, the "allowedToDraw" check fails with a NullReferenceException, cancelling the excecution of DrawWindow.

Fixed by adding the bold-highlighted check to Window::allowedToDraw()

if (this.myPartModule == null || this.myPartModule.vessel == null || this.myPartModule.vessel == FlightGlobals.ActiveVessel)

Link to comment
Share on other sites

I cannot initialize my Window with the correct size :( I have followed the example-window, by forcing the size in the constructor (windowPos = new Rect(....)), which only seems to set the position of the window. Also, calling SetSize() in the constructor did not do anything. My window has a fairly simple layout: Vertical main orientation, followed by several horizontal sub-layouts with have a Label and a Button or TextField each. The window is resizable in X and Y, and manually resizing the window at runtime works just fine.

Any ideas what i am doing wrong?

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...