KSP-KOS / KOS

Fully programmable autopilot mod for KSP. Originally By Nivekk
Other
697 stars 230 forks source link

After GUI merge and Term font merge: use same list picker for both. #1950

Closed Dunbaratu closed 7 years ago

Dunbaratu commented 7 years ago

(This is one of several issues that should be addressed after #1878 (GUI toolkit) gets merged into develop but before that code appears in a public realease.) It also needs to wait for #1948 (terminal fonts) to be merged into develop.

Right now, the terminal fonts font chooser in the KOSToolbarWindow uses a custom-made list picker class called ListPIckerDialog. The GUI toolkit also has a list picker widget that kerboscripts can use. In the interest of keeping things consistent, and reducing code repetition, ListPickerDialog should be removed and instead the KOSToolbarWindow should use the GUI toolkit's Popup list dialog that does the same sort of thing. (It should be usable by C# code too just like it's usable by kerboscript code).

Dunbaratu commented 7 years ago

I just decided to abandon this idea. After trying to implement this a few times tonight I realized that the way the scripted GUI system works is just too different from what the font picker needs to do for us to use it. Basically, the scripted GUI system doesn't return an IMGUI object I can embed into the middle on a OnGUI call as in "make the popup button and paint it here while I'm in the middle of painting these other IMGUI items."

Instead the constructor returns a non-GUI object that is just the data that the containing GUIWindow "drives". It's the containing GUIWindow that makes it into an IMGUI object. That makes it hard for me to embed it inside something else.