From 6f39382c0c0451b20e6db9fe147e0f0dd639ad1d Mon Sep 17 00:00:00 2001 From: Apostolique Date: Sat, 16 Dec 2023 06:55:47 +0000 Subject: [PATCH] deploy: 0ddd992ba21830b22b94fcc2863f3a02550ddb41 --- 404.html | 2 +- api/index.html | 2 +- design-choices/index.html | 2 +- getting-started/index.html | 2 +- index.html | 4 ++-- ux/button/index.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/404.html b/404.html index 83a493f..de6449d 100644 --- a/404.html +++ b/404.html @@ -1 +1 @@ -404 - Page not found! - Apos.Gui

404 - Page not found!

\ No newline at end of file +404 - Page not found! - Apos.Gui

404 - Page not found!

\ No newline at end of file diff --git a/api/index.html b/api/index.html index 219c9b0..f400dc1 100644 --- a/api/index.html +++ b/api/index.html @@ -1 +1 @@ -API - Apos.Gui
\ No newline at end of file +API - Apos.Gui
\ No newline at end of file diff --git a/design-choices/index.html b/design-choices/index.html index 2c7d69a..9873d11 100644 --- a/design-choices/index.html +++ b/design-choices/index.html @@ -1 +1 @@ -Design choices - Apos.Gui

Design choices

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 GitHub
\ No newline at end of file +Design choices - Apos.Gui

Design choices

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 GitHub
\ No newline at end of file diff --git a/getting-started/index.html b/getting-started/index.html index b139357..fb4b700 100644 --- a/getting-started/index.html +++ b/getting-started/index.html @@ -1,4 +1,4 @@ -Getting started - Apos.Gui

Getting started

Install

Install using the following dotnet command:

dotnet add package Apos.Gui --prerelease
+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.

Discord

Documentation

Build

NuGetNuGet

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

Apos.GUI Showcase

Usage Example

You can create a simple UI with the following code that you’ll put in the Update call:

MenuPanel.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.

Discord

Documentation

Build

NuGetNuGet

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

Apos.GUI Showcase

Usage Example

You can create a simple UI with the following code that you’ll put in the Update call:

MenuPanel.Push();
 if (Button.Put("Show fun").Clicked) {
     _showFun = !_showFun;
 }
@@ -9,4 +9,4 @@
     Exit();
 }
 MenuPanel.Pop();
-

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

Edit this page on GitHub
\ No newline at end of file +

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

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