-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some trouble to get what I expect with UI #126
Comments
First thing I noticed is that the big section of empty space is coming from this:
The first parameter of
Has a much better result. But I am still trying to figure out where the empty space in the "stage" section it coming from, this looks more like a bug. |
Additional note:
The problem seems to be that the initial layout still calculates with the larger font size if it is tweaked later. I am not entirely sure how to fix this behavior yet |
Yes, the window starts out with a vertical container/layout (I figured this to be the most common use-case), but I guess it should be possible to make this configurable in the The issue with the empty vertical space boils down to a race-condition. The window actually opens the moment I'll add some helper functions to resize/compact/recenter a window via script, which should resolve the issue. |
Since I did some pretty heavy (long overdue) refactoring as well, I created a pre-release for this: In you example, adding a :
(see: https://kontrolsystem2.readthedocs.io/en/prerelease/reference/ksp/ui.html#center) after all components have been added should now do the trick. Additionally I added support for removal of components from the window. So something like this should now work as well:
|
You bring Chrismas everyday :) |
I did a very simple test, which worked fine:
|
Hum... I wrote something very close. Or if I didn't, it's a misprint. The only major difference I'm able to notice, is I used the |
Good point, I tried out with a more functional approach:
... which seems to work just the same |
This issue is stale because it has been open for 60 days with no activity. |
This issue was closed because it has been inactive for 14 days since being marked as stale. |
version 0.5.2.7 (Ckan)
assumed tag : question
Hi !
I want to do a screen who synthetize some real time datas about my flight, usefull for information or debug.
What I think i have understood about
ksp::ui
module :Align
) seems match with the position the container will have inside his parent container.Start
will be up,Center
will be middle height,End
will be down. If their is several children with Align.Start arguments, they will be added in the order where they were processed. (It can be a different order than the one you write them : example : records are processed alphabeticaly)Stretch
will stretch the width of the vertical container to the width of it's parent containerAlign
) seems match with the position the container will have inside his parent container.Start
will be left,Center
will be middle width,End
will be right. If their is several children with Align.Start arguments, they will be added in the order where they were processed.Stretch
will stretch the height of the horizontal container to the height of it's parent containerI'm probably wrong somewhere since I'm not able to get what I expect.
This is what I expect to get (at first):
And how I think it should be built :
Here the work in progress code:
ui::monitor.to2
I don't think it's revelant to give details about how
ship
andstages
are built to understand howMonitor
should work. For the most, it's custom methods to thrust, isp, twr, deltaV etc which are able to give me reliable data even when I should't get thoses, and some shorteners for usefull datas : (deltaV for separatrons, expected thrust even when the engine is off, thoses kind of things)And now, with this nice bunch of code, this is what I get :
An oversized window, panels shifted and streched in ways I'm not able to understand, even outer the window, labels greater than their parent panels, in short, a mess.
So I have undoubtly done something wrong, but here the trick : I don't have a clue what about.
At least, datas are corrects ! :)
Edit : still not fluent in english
The text was updated successfully, but these errors were encountered: