RunTime.Gui
Simple enough so a designer can make an Gui with a design that allows for programmers to create their own system.
Getting Started
The gui comes build in with a generator script which creates generated cs files which you can load in. All the objects in these files add themselfs to the GUI on Init. You just have to tell it how you want it to run the files.
Reference the project
- Add the Runtime.Gui to your monogame project as a reference
- in powershell: dotnet tool install -g dotnet-script
- Under: project.Properties > Output > Pre.Build.Event Add: dotnet script ..\BOC_Editor_GUI_System\Generation\Generator.csx
- In your project add an: 'XML' & 'Generated' folder
- Create an XML file in the XML folder and run
XML Tags
Example XML file
<?xml version="1.0" encoding="utf-8" ?>
<GUI>
<GridPanel Columns="2" Margin="10">
<Panel IsDraggable="true" Margin="5" BackGround-Color="#8B4513" Border="1">
<Button Margin="5" Border="1">Inventory</Button>
<Button Margin="5" Border="1">Character</Button>
<Button Margin="5" Border="1">Options</Button>
<Checkbox Margin="5">Test checkbox</Checkbox>
<Button Margin="5" Border="1">Quit</Button>
</Panel>
<GridPanel Columns="2" Margin="5" BackGround-Color="#8B4513" Border="1">
<Label Margin="2">Name:</Label>
<Label Margin="2">Piet</Label>
<Label Margin="2">Age:</Label>
<Label Margin="2">18</Label>
</GridPanel>
</GridPanel>
</GUI>
Parent Tags
-
GridPanel
A table which doesn't force change children their width
-
Panel
A simple container that sets children underneath each other.
Basic Tags
-
Label
A simple piece of text.
-
Button
A label in a small container that has a event behind it to change state on press.
Checkbox
A box with a piece of text that can be set to on or off.