Closed Dunbaratu closed 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.
(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 calledListPIckerDialog
. 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 theKOSToolbarWindow
should use the GUI toolkit'sPopup
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).