-
Posts
1,083 -
Joined
-
Last visited
Content Type
Profiles
Forums
Developer Articles
KSP2 Release Notes
Everything posted by Xyphos
-
DialogGUITextInput ?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
Well, I've tried it, and that's not the case. var inputDeltaV = new DialogGUITextInput( "", "0 m/s", false, 8, s => { var i = 0; if (int.TryParse(s, out i)) MinimumDv = i; else deltavInput.text = MinimumDv.ToString(); return MinimumDv.ToString(); }, 32f ); the result of testing: if seems the callback was given a code signature of Func<string, string> perhaps it's a typo on the dev's part? maybe it should be just Func<string> providing a returned value doesn't seem to do anything. return "French Fries" // does nothing return "" // does nothing return null; does nothing -
DialogGUITextInput ?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
so... the callback is for relaying the text input to whatever routine, and the return value is unnecessary for the routine to work, but still requires it. seems pointless to have a return value. why not just a void? -
DialogGUITextInput ?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
okay, but what's the callback for, and why does it require a returned value? -
What's the placeholder field for? how do I use it properly? What's the set callback for? how do I use it properly?
-
I'm having trouble with DialogGUIScrollList
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
That worked! thanks. but now I have a new problem: the scroll window defaults to the middle, I want it to default to the top... -
I'm having trouble with DialogGUIScrollList
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
I'll give that a try, thanks. -
I'm currently in the process of converting Gary Court's KORC web app to an in-game version with automatic part detection. so far, the inner workings are working, but it's the UI part that I'm struggling with, and I don't know how to fix it. below is a picture of the problem; the scroll list is supposed to scroll, and there's more engine options not shown because it's not scrolling properly. anyone know how to fix this?
-
How to determine if a part is unlocked?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
That's perfect. thanks! -
UI system is driving me bonkers.
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
That actually helps a lot - knowing where to "draw" the sections and being able to visualize them. I'll try it. -
UI system is driving me bonkers.
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
sadly, I may need to, as my UI will require the use of scrolling panes, comboboxes, etc. DMagic supposedly wrote a tutorial but I'm having trouble following it. -
UI system is driving me bonkers.
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
Dialog, from what I understand, we're not supposed to use GUILayout anymore? and thanks for your example, I'll try that. -
PopupDialog behind rest of UI?
Xyphos replied to Rudolf Meier's topic in KSP1 C# Plugin Development Help and Support
The old GUILayout is great for complex UI's with it's robust set of features. the new DialogUI system is good for simple UI's like popup messages, but a complete pain in the cheeks to develop. if I were you, I'd combine the two and dread the day when the old GUILayout is no more -
I find the new UI system quite daunting.
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
nevermind, I found a decent example to learn from. -
[HELP!] Calculate ATM ISP and ATM Thrust?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
Thanks for the clarification, @Starwaster - it's appreciated. Lerp performs Linear Interpolation. I checked. -
[HELP!] Calculate ATM ISP and ATM Thrust?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
great ideas. I'll try to incorporate them, but I'm still working out the details. edit: with some math work, it could be possible to simulate the atmosphere pressure at each stage.... but first, I am gonna make the all-or-nothing as the basis for the mod, then further develop it to full feature -
[HELP!] Calculate ATM ISP and ATM Thrust?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
but my next question will be GUI related; all those part options surely will need a scrolling window pane. while I'm confidant in my C# skills, I've very little experience in developing KSP plugins, and KSP's API is huge and fairly cryptic. -
[HELP!] Calculate ATM ISP and ATM Thrust?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
I'm attempting to convert Gary Court's optimal rocket calculator to an in-game version. Gary's json/javascript code has all the data embedded, but only for stock parts. I wanna go beyond that and have every part, stock and mod included without needing external configs. also, I forgot KER had a part simulator, so now I have to scrap my current test version and start over using parts of KER code. -
[HELP!] Calculate ATM ISP and ATM Thrust?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
This man is a legend. ---^ five for five. thanks. -
I got an engine part via PartLoader.LoadedPartsList now I know how to get the thrust and ISP info, but I want to know how do I compute the atmospheric ISP and atmospheric thrust. I assume I use the atmCurve node and use the key that has an index of 1, then use the second number as a multiplier? what's the third and fourth numbers for?
-
[HELP!] How do I get the cost of a part?
Xyphos replied to Xyphos's topic in KSP1 C# Plugin Development Help and Support
four for four! you're on a roll, bro! I didn't even know PartLoader existed. this will save me a TON of ConfigNode code. THANKS!