All Projects → armory3d → Zui

armory3d / Zui

Licence: other
Immediate Mode User Interface

Programming Languages

haxe
709 projects

Projects that are alternatives of or similar to Zui

Horus ui
HorusUI Immediate Mode Graphical User Interface
Stars: ✭ 106 (-59.39%)
Mutual labels:  user-interface, imgui
bigger
bigg (bgfx + imgui + glfw + glm) + utils
Stars: ✭ 101 (-61.3%)
Mutual labels:  imgui
demos
OpenGL and Vulkan graphics experiments and samples
Stars: ✭ 34 (-86.97%)
Mutual labels:  imgui
Omega2D
Two-dimensional flow solver with GUI using vortex particle and boundary element methods
Stars: ✭ 17 (-93.49%)
Mutual labels:  imgui
ModernUIDoneRight
A rewrite of my old theme library for WinForms
Stars: ✭ 22 (-91.57%)
Mutual labels:  user-interface
SimpleScreens
Simple Screens is a library of screens and screen components (forms, sections, transitions) to be included, extended, or generally reused in applications based on Moqui Framework and Mantle Business Artifacts.
Stars: ✭ 20 (-92.34%)
Mutual labels:  user-interface
Apos.Gui
UI library for MonoGame.
Stars: ✭ 77 (-70.5%)
Mutual labels:  imgui
VulkanRenderer
Personal repo for learning the vulkan graphics api
Stars: ✭ 42 (-83.91%)
Mutual labels:  imgui
p3ui
C++ & Python User Interface Library
Stars: ✭ 21 (-91.95%)
Mutual labels:  imgui
Apricot
Desktop Agent for Windows
Stars: ✭ 39 (-85.06%)
Mutual labels:  user-interface
SdfFontDesigner
Offline font tuning/bitmap generation via shaders
Stars: ✭ 56 (-78.54%)
Mutual labels:  imgui
PrefsGUI
Accessors and GUIs for persistent preference values using JSON file
Stars: ✭ 70 (-73.18%)
Mutual labels:  imgui
FallingSandSurvival
2D survival game inspired by Noita and slightly Terraria
Stars: ✭ 66 (-74.71%)
Mutual labels:  imgui
DearPyGui-Obj
An object-oriented wrapper around DearPyGui
Stars: ✭ 32 (-87.74%)
Mutual labels:  imgui
MoravaEngine
2D/3D graphics engine written in C++ language. It currently supports the following graphics APIs: OpenGL 3.3+, Vulkan 1.2, DirectX 11. Its current purpose is to experiment with various CG concepts and techniques.
Stars: ✭ 129 (-50.57%)
Mutual labels:  imgui
ElvUI-5.4.8
ElvUI for World of Warcraft - Mists of Pandaria (5.4.8)
Stars: ✭ 20 (-92.34%)
Mutual labels:  user-interface
TUI
Terminal user interface library. Works on *NIX and Windows systems
Stars: ✭ 32 (-87.74%)
Mutual labels:  user-interface
CFX-BYPASS
Bypass it, you won't be Banned when playing cheats 2022
Stars: ✭ 18 (-93.1%)
Mutual labels:  imgui
ImGuiBuilder
o/ ImGui Builder is a graphical framework for assembling imgui codes in your interface easily
Stars: ✭ 279 (+6.9%)
Mutual labels:  imgui
isotope
UI library that aims to bring simplicity and intuitiveness back to Web Development. 🚀
Stars: ✭ 52 (-80.08%)
Mutual labels:  user-interface

zui

Portable immediate mode UI library designed for tools and debug interfaces. Written in Haxe and Kha, used in ArmorPaint.

Getting started

  • Clone into your_kha_project/Libraries
  • Add project.addLibrary('zui'); into khafile.js
	// In init()
	var ui = new Zui({ font: myFont });

	// In render()
	public function render(frames: Array<Framebuffer>) {
		var g = frames[0].g2;
		g.begin();
		// Draw your stuff...
		g.end();

		ui.begin(g);
		if (ui.window(Id.handle(), x, y, w, h, drag)) {
			if (ui.button("Hello")) {
				trace("World");
			}
		}
		ui.end();

		// Draw more stuff...
	}

Elements

function tab(handle: Handle, text: String, vertical = false): Bool;
function panel(handle: Handle, text: String, isTree = false): Bool;
function image(image: Image, tint = 0xffffffff): State;
function text(text: String, align = Left, bg = 0x00000000);
function textInput(handle: Handle, label = "", align = Left): String;
function button(text: String, align = Center, label = ""): Bool;
function check(handle: Handle, text: String): Bool;
function radio(groupId: Handle, pos: Int, text: String): Bool;
function combo(handle: Handle, texts: Array<String>, label = ""): Int;
function slider(handle: Handle, text: String, from: Float, to: Float, filled = false, precision = 100, displayValue = true): Float;
function tooltip(text: String);
function tooltipImage(image: Image);

// Formating
function row(ratios: Array<Float>);
function separator(h = 4, fill = true);
function indent();
function unindent();

Id.hx - simple macros to generate handles

var state = ui.check(Id.handle(), "Check Box");

Ext.hx - prebuilt elements:

function list(...); // See examples
function panelList(...);
function colorPicker(...);
function colorWheel(...);
function fileBrowser(...);
function keyInput(handle: Handle, label = ""): kha.input.KeyCode;
function inlineRadio(handle: Handle, texts: Array<String>): Int;
function textArea(handle: Handle, align = Left): String;

Nodes.hx - drawing node systems

nodes.nodeCanvas(...); // See examples

Canvas.hx - drawing custom layouts

Canvas.draw(...); // See examples

Examples

Check out examples/ folder. To run specific example, simply drop it's folder into KodeStudio and hit run. If you are having trouble compiling, clone latest Kha repository into your example folder (alongside the khafile.js). This will let KodeStudio pick up the most recent Kha.

Theming

Themes can be defined using TTheme typedef. Check zui.Themes class for example. Set ZuiOptions.theme when creating new Zui instance to overwrite default theme.

Snippets

Check element for changes

var hcombo = Id.handle();
ui.combo(hcombo, ["Item 1", "item 2"]);
if (hcombo.changed) {
	trace("Combo value changed this frame");
}

Force redrawing zui window on demand

function render(..) {
    // Get window handle
    var hwin = Id.handle();
    // Force redraw - set each frame or whenever desired
    hwin.redraws = 1;
    if (ui.window(hwin, x, y, w, h)) { ... }
}

Using render targets - prevent nested begin/end calls

g2.begin();
..
g2.end();

renderTarget.g2.begin();
..
renderTarget.g2.end();

zui.begin(); // Zui also draws to texture..
..
zui.end();

g2.begin();
..
g2.end();

Using Id.handle() in a for loop

// Id.handle() works at compile time
// Call .nest() to get unique handle per iteration
for (i in 0...3) Id.handle().nest(i);
// Or use new zui.Handle() directly

Set initial Id.handle() state

var h1 = Id.handle({selected: true});
var h2 = Id.handle({position: 0});
var h3 = Id.handle({value: 1.0});
var h4 = Id.handle({text: "Text"});

Custom integration

Using the powerful render target system of Kha, it is possible to easily integrate the library into any scenario. Set ZuiOptions.autoNotifyInput to false when creating a new Zui instance. You can then manually process the input and render the resulting texture in any way you may need.

zui.onMouseDown(button:Int, x:Int, y:Int)
zui.onMouseUp(button:Int, x:Int, y:Int)
zui.onMouseMove(x:Int, y:Int, movementX:Int, movementY:Int)
zui.onMouseWheel(delta:Int)

Inspired by imgui.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].