Jump to content

Polymaker

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Polymaker

  1. It works, thanks a lot! That code also helped me with my third question (about re-ordering a part's fields/editors). Now I know that UIPartActionWindow has a list of UIPartActionItem and items of type UIPartActionFieldItem are linked to the module field. Then what I think is the display order is the sibling index on the action's transform. Now I want to test it out, but I'm not sure where/when to call the code, I'm sure it would work in OnUpdate, but I don't want to reorder each frame (it may affect performance). So my question is: Is there any event triggered when a part is selected in the editor, or even better if there is an event when the part's window is displayed? If so, how do I listen to it (I'm still not too familiar how Unity or KSP event pipeline works)? P.S. I can't thank the universe enough for the existence of .NET, reflection and ILSpy
  2. Yes... and no, I'm not too sure now, as I'm doing almost the same as you. But a real example will better explain my question: In ProceduralParts, I added a Mk2 shape and I wanted to snap 1.25m to 1.5m when you select that shape. So in the OnUpdate event I check if the selected shape changed and if the current diameter is 1.25, then I set the diameter field to 1.5m, but the editor in-game still shows 1.25m (until I re-open the right-click menu).
  3. Hi, I'm almost done adding some functionalities to an exiting mod, and I've encountered a few problems that I need help with: Is there a way to update the GUI editor of a field? I've discovered that when I change the value of a field (tagged with KSPField) at runtime the UI doesn't update. Is there a simple ways to determine in a mirror symmetry which part is flipped? I've added thrust deflection (angle) on ProceduralSRBs but I can't get the mirror symmetry to work properly. I need to flip the rotation of one of the two but I can't find a reliable way to tell which one it is. (I've just spent all the weekend trying to figure this one out and it kept me awake the last two nights and adding thrust deflection just took about 5 minutes...) Also I'm wondering if it is possible to reorder GUI editor fields, and if possible from other modules. I find it annoying that the order the fields are placed in code affect the order they appear in-game.
  4. I have this strange bug in VAB : the first part I place is a little scaled down but the nodes are still correct and it is showing with the right scale. It does not happen with every part, but a good number including stock parts. Changing scale and reverting does not fix the problem, neither reloading. EDIT : I'm currently using linux 64-bit, I never had this problem with 32-bit Win.
×
×
  • Create New...