Myra 0.5.1 had been released.
Major addition is ability of Myra UI Editor to export UI to C#(close analogue is WinForms designer in Visual Studio).
I’ve made a new video. It is quite long(about 11 mins). But it is complete tutorial on how to create a new MG project, add Myra support, draw a UI in the Editor and embed it in the project using new export to C# feature.
Hey Steve,
Yes, I am working on the project. Though not very actively. Probably there will be a new version by November. It’ll have various bug fixes as well as new IsMultiline property for the TextField widget.
Also I want to make Menu widget controllable by the keyboard.
The new Myra version is on its way.
I’ve improved the Menu widget. Now menu items could be navigated using keyboard. Also now if a menu item name contain ‘&’ char, it’ll be accessible through Alt key(as in WinForms).
The goal of the Myra project is to provide UI framework that could be used not only in games, but in the level editors as well. Hopefully I’ll reach it one day.
I am having trouble figuring out how to access information about the widget in the code. For example, how do I check if a button has been pressed, or the string in a text field? A tutorial or help on this would be appreciated.
‘blue’ is style variant for TextButton widget. The corresponding TextButton could be created with following code:
var textButton = new TextButton("blue");
New feature is supported in the UI Editor:
Added TextButton widget. Now Myra has 3 button widgets: TextButton(has only text), ImageButton(only image) and ordinary Button(can have both image and text). All of it are demonstrates on the AllWidgetsSample:
Simplification of Serialization System
Now serialization of properties having default values is omitted in both .ui saving/loading and ‘Export To C#’. Therefore .ui and generated .cs files became much smaller.
I’ve a question for everyone who uses Myra.
I am thinking about moving off MonoGame.Extended. Particulary that means Myra will stop using MGE’s BitmapFont and start to use MG’s SpriteFont. What do you think about this idea?
If that idea will be met with negativity or even with neutrality, I wont do it.
I have returned to my game project development after working for an extended time on another project.
I have successfully implemented the basic Myra-UI code for a master menu. However, how do I get my menu-bar to extend across the width of my game-screen?
Currently, I have only one master-menu master item with one sub-item in it, which I am planning on using on testing out some code for my hexagonal war-game map. Yet, the master-menu-bar only extends to the size of my single master-menu master-item.
I would like to have the menu-bar background extend across my game screen as it does in your sample code and the Myra-UI Editor.
I believe I may have found a tougher question for you regarding your Myra-UI…
I have successfully set up the basis for a menu-bar at the top of my game-screen with one master-item and one child item to this master item; the latter for the purpose of clearing selected hexagonal tiles of their highlighted borders. All of this is working quite nicely over my expanded, hexagonal map (for a war-game).
The issue I am running into is that when I make selections from the menu, I am finding that my application is also recording such selections as hexagonal selections that are being tracked in the “Update” method while being redrawn in the “Draw” method.
In other words, up to this point there is no distinction between selecting a menu-item and an underlying hexagonal tile behind the menu-bar and its drop-down menu-items.
I have tried setting a global variable based upon a menu-item selection and then testing it when the hexagonal tile selection tracking is being processed. This has worked up to a point to minimize the tiles that are being tracked for redrawing (which should not be tracked since I have selected from the menu-bar) but I would like to eliminate all of these unnecessary tiles that are being tracked as a result of menu-item selections.
Is there anything you can suggest that can indicate when the menu-bar is being selected as to when an actual tile is being selected?
Released Myra 0.6.1.
Since Myra got off Monogame.Extended I’ve returned support of FNA.
The documentation has been updated accordingly and now it describes ways of adding Myra to the FNA game: https://github.com/rds1983/Myra/wiki/Adding-Reference-to-Myra
im gunna be gone from home the next couple of days and cant really check it out, figured id post an ask here and see if i get a response:
Does the Myra UI lib have touch support(So the UI can be used in mobile games) and/or controller support?
Also when I am available next would you like me to create a VB code generator for you so your beautiful tool can reach a larger audience, id love to see this work become a mainstream tool its the best I’ve seen so far (Especially the UI editor gahd I hate UI by hand). – I ask as I have never been shy about translating stuff from C# to VB.net for the users who want it and VB users would drool over this tool