Probably if user clicks/touches a window, I’ll simply move it into the end of _widgets collection, so it’ll be returned first by GetTopWidget call.
New project announcement: Myra.Extended provides additional functionality for Myra. If you would like to contribute a Myra widget, feel free to PR it there: https://github.com/rds1983/Myra.Extended
Hi rds 1983
It seems that I can’t get running myra on linux. Everything works fine on Windows.
Kinds Regards
Andru
After almost 4 years of development, Myra 1.0 had been released: https://github.com/rds1983/Myra/releases/tag/1.0.0.204
Thanks everyone!
Congrats and well done for the milestone!
Damn, that was 7 months ago?
I totally went into hibernation for the second half of the year…
Yet Another Release:
Any reason why when I change textbox’s textverticalalignment to centered the cursor does not also go in the same spot?
Probably a bug.
What is the proper way to render a scene to a control in Myra?
What is the difference between a SplitPane, StackPanel and Panel?
When should each be used?
By making a custom control. There’s a sample demonstrating that: Myra/samples/Myra.Samples.CustomWidgets at master · rds1983/Myra (github.com)
Myra.Samples.SplitPaneContainer sample demonstrates what SplitPane is.
As for StackPanel & Panel, see the docs:
Basic Layout and Panel · rds1983/Myra Wiki (github.com)
StackPanel Layout · rds1983/Myra Wiki (github.com)
Is there a way to set a widget’s position by its center’s coordinates instead of its upper left corner’s coordinates?
I know I can set a widget’s Left
property to something like center.x - widget.Bounds.Width / 2
, but since a widget only update its size when render, the widget.Bounds
will only update until the next frame. For example, if I change a label’s text when updating, its size property won’t be recalculated until it’s drawn. So, there will be a frame where the label’s size has already changed but its position has not yet been updated.
This is important to me because I’m trying to use Myra to draw a hud for my game. For example, I want to place a label right above a character. Or maybe using a GUI library to draw a hud isn’t really a good choice?
I just found that the method UpdateArrange
can force recalculate widgets’ size or other properties, and it’s public. Sorry for bothering.
Does anyone know how to change the size of the scroll bar in a horizontal or verlical slider?