diff --git a/404.html b/404.html index 83a493f..de6449d 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -
This library’s goal is to make it easy to create custom user-facing GUIs. It is a hybrid between the IMGUI paradigm and regular retained GUIs. When using the library, it looks like IMGUI. When implementing new components, it looks retained.
This library is built on top of Apos.Input which is a polling-based input library. This is what powers conflict resolution in the interface.
Edit this page on GitHubThis library’s goal is to make it easy to create custom user-facing GUIs. It is a hybrid between the IMGUI paradigm and regular retained GUIs. When using the library, it looks like IMGUI. When implementing new components, it looks retained.
This library is built on top of Apos.Input which is a polling-based input library. This is what powers conflict resolution in the interface.
Edit this page on GitHubInstall using the following dotnet command:
Getting started - Apos.Gui Getting started
Install
Install using the following dotnet command:
dotnet add package Apos.Gui --prerelease
Setup
Import the library with:
using Apos.Gui;
using FontStashSharp;
Find a font ttf file, call it font-file.ttf
and put it in your content folder. Add it to the MonoGame content pipeline and select copy in “Build Action” instead of build.
In your game’s LoadContent()
, give your game instance and font to GuiHelper and create an IMGUI
object:
protected override void LoadContent() {
diff --git a/index.html b/index.html
index ba49564..abbde57 100644
--- a/index.html
+++ b/index.html
@@ -1,4 +1,4 @@
-Apos.Gui Apos.Gui
UI library for MonoGame.
Description
This library is designed to allow the creation of custom user facing UIs. It doesn’t provide much out of the box except some mechanics to manage user inputs, focus handling, component parenting and hierarchy. It is inspired by the IMGUI paradigm.
Documentation
Build
Features
- Mouse, Keyboard, Gamepad (touch input is possible but not provided out of the box)
- UI scaling
- Used like IMGUI but components can be coded like a retained UI
Showcase
Usage Example
You can create a simple UI with the following code that you’ll put in the Update call:
.Push();
+Apos.Gui Apos.Gui
UI library for MonoGame.
Description
This library is designed to allow the creation of custom user facing UIs. It doesn’t provide much out of the box except some mechanics to manage user inputs, focus handling, component parenting and hierarchy. It is inspired by the IMGUI paradigm.
Documentation
Build
Features
- Mouse, Keyboard, Gamepad (touch input is possible but not provided out of the box)
- UI scaling
- Used like IMGUI but components can be coded like a retained UI
Showcase
Usage Example
You can create a simple UI with the following code that you’ll put in the Update call:
.Push();
if (Button.Put("Show fun").Clicked) {
_showFun = !_showFun;
}
@@ -9,4 +9,4 @@
Exit();
}
MenuPanel.Pop();
-
MenuPanel
This code will create 2 buttons, “Show Fun” and “Quit”. You can use your mouse, keyboard, or gamepad to interact with them. Clicking on “Show Fun” will insert a label in between them with the text “This is fun!”.
You can read more in the Getting started guide.
Other projects you might like
- Apos.Input - Input library for MonoGame.
- Apos.History - A C# library that makes it easy to handle undo and redo.
- Apos.Content - Content builder library for MonoGame.
- Apos.Framework - Game architecture for MonoGame.
- AposGameStarter - MonoGame project starter. Common files to help create a game faster.
Edit this page on GitHub
\ No newline at end of file
+
MenuPanel
This code will create 2 buttons, “Show Fun” and “Quit”. You can use your mouse, keyboard, or gamepad to interact with them. Clicking on “Show Fun” will insert a label in between them with the text “This is fun!”.
You can read more in the Getting started guide.
Other projects you might like
- Apos.Input - Input library for MonoGame.
- Apos.History - A C# library that makes it easy to handle undo and redo.
- Apos.Content - Content builder library for MonoGame.
- Apos.Framework - Game architecture for MonoGame.
- AposGameStarter - MonoGame project starter. Common files to help create a game faster.
Edit this page on GitHub
\ No newline at end of file
diff --git a/ux/button/index.html b/ux/button/index.html
index 078bd2e..83456aa 100644
--- a/ux/button/index.html
+++ b/ux/button/index.html
@@ -1 +1 @@
-Button UX - Apos.Gui Button UX
Considerations for the user experience of a button.
Mouse
Interaction condition
- Mouse pointer is inside the clipping rectangle.
- Initiated by a left button press and release.
Interaction canceling
- Be able to press inside the button, drag away, and let go to cancel the click.
- Be able to press inside the button, drag away, and drag back to continue the click.
Keyboard
Interaction condition
- Button is focused.
- Initiated by a space or enter key press and release.
Interaction canceling
- Press tab to focus a different component before releasing space or enter.
Gamepad
Interaction condition
- Button is focused.
- Initiated by an A button press and release.
Interaction canceling
- Press Up or Down to focus a different component before releasing the A button.
Edit this page on GitHub
\ No newline at end of file
+Button UX - Apos.Gui Button UX
Considerations for the user experience of a button.
Mouse
Interaction condition
- Mouse pointer is inside the clipping rectangle.
- Initiated by a left button press and release.
Interaction canceling
- Be able to press inside the button, drag away, and let go to cancel the click.
- Be able to press inside the button, drag away, and drag back to continue the click.
Keyboard
Interaction condition
- Button is focused.
- Initiated by a space or enter key press and release.
Interaction canceling
- Press tab to focus a different component before releasing space or enter.
Gamepad
Interaction condition
- Button is focused.
- Initiated by an A button press and release.
Interaction canceling
- Press Up or Down to focus a different component before releasing the A button.
Edit this page on GitHub
\ No newline at end of file
dotnet add package Apos.Gui --prerelease
+