-
Notifications
You must be signed in to change notification settings - Fork 7
Fixed display of multiline network status labels #33
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
base: master
Are you sure you want to change the base?
Conversation
@eggrobin Looks good to me. Any opinions? |
Telecom/main_window.cs
Outdated
var okStyle = new GUIStyle(Style.RightAligned(GUI.skin.label)){ | ||
focused = { | ||
textColor = XKCDColors.Lime | ||
}, | ||
normal = { | ||
textColor = XKCDColors.Lime | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var okStyle = new GUIStyle(Style.RightAligned(GUI.skin.label)){ | |
focused = { | |
textColor = XKCDColors.Lime | |
}, | |
normal = { | |
textColor = XKCDColors.Lime | |
} | |
}; | |
var okStyle = Style.RightAligned(GUI.skin.label); |
Let’s not create ad hoc new styles with new colours in the middle of the rendering like that. Just use the error style for disconnected, and the default colour for OK.
Seems to work as advertised. @eggrobin any objections to merging? |
Yes, the code style is all over the place (this codebase uses snake_case and consistently avoids using directives for UnityEngine). I’ll fix it. |
On unrelated news, the work Pleeease get the styles from Principia's |
How so?
It comes from there, this uses principia.ksp_plugin_adapter.Style.RightAligned. |
Ah yes, the Multiline style is upper-left aligned, whereas the RightAligned style is middle-right… |
In Principia we set |
That seems specific to the reference frame description. But yes, we should do something about that Iamesburɑ in the screenshot. |
Is this acceptable now? |
No, we still need to do something about the alignment and the clipping of single-line text, see the discussion above. |
Fixes #6. As connections might be on multiple lines to keep the position of the 'OK' and 'Disconnected' labels consistent I've split that into a separate label that's right justified, and also colored it green or red respectively because colors are nice :)
How things look with this PR:
