It's a simple Canvas GUI for Unreal Engine 4 with mouse operation

Related tags

GUI ue4-canvas-gui
Overview

ue4-canvas-gui

It's a simple Canvas GUI for Unreal Engine 4 with mouse operation.

Included elements:
Rendering Text (left/center);
Rendering Rects;
Rendering Circles (filled and not);
Button, Slider, Checkbox, Combobox, Hotkeys and ColorPicker.

Implemented a simple post-render system to draw on top of menu and all.

Screenshots with default style:

EU4 GUI

EU4 GUI

EU4 GUI

Ingame render EU4 GUI

Small "How to use" guide:

First you need get UCanvas from game.
After it you can draw like this:

//I'll show you with an example Post Render Hook
void PostRenderHook(UGameViewportClient* viewport, UCanvas* canvas)
{
	ZeroGUI::SetupCanvas(canvas);
	Menu::Tick();
}

//Menu.h
void Tick()
{
	ZeroGUI::Input::Handle();
	
	static bool menu_opened = false;
	if (GetAsyncKeyState(VK_F2) & 1) menu_opened = !menu_opened; //Our menu key

	if (ZeroGUI::Window("Superior UE4 GUI", &pos, FVector2D{ 500.0f, 400.0f }, menu_opened))
	{
		//Simple Tabs
		static int tab = 0;
		if (ZeroGUI::ButtonTab("Tab 1", FVector2D{ 110, 25 }, tab == 0)) tab = 0;
		if (ZeroGUI::ButtonTab("Tab 2", FVector2D{ 110, 25 }, tab == 1)) tab = 1;
		if (ZeroGUI::ButtonTab("Tab 3", FVector2D{ 110, 25 }, tab == 2)) tab = 2;
		if (ZeroGUI::ButtonTab("Tab 4", FVector2D{ 110, 25 }, tab == 3)) tab = 3;
		ZeroGUI::NextColumn(130.0f);
		//
		
		//Some Elements
		static bool text_check = false;
		static float text_slider = 15.0f;
		static int test_hotkey = 0x2;
		static FLinearColor test_color{ 0.0f, 0.0f, 1.0f, 1.0f };

		ZeroGUI::Checkbox("Test Checkbox", &text_check);
		ZeroGUI::SliderFloat("Test Slider", &text_slider, 0.0f, 180.0f);
		ZeroGUI::Hotkey("Test Hotkey", FVector2D{ 80, 25 }, &test_hotkey);

		ZeroGUI::Text("Left aligned text!");
		ZeroGUI::Text("Outline and Center aligned text!", true, true);

		//Element with padding
		ZeroGUI::PushNextElementY(50.0f);
		ZeroGUI::Combobox("Combobox", FVector2D{ 100, 25 }, &test_number, "None", "First", "Second", "Third", NULL); //NULL at end is required!
		ZeroGUI::SameLine();//inline items
		if (ZeroGUI::Button("It's a Button!", FVector2D{ 100, 25 })) { /*clicked!*/ }

		//Color Picker
		ZeroGUI::ColorPicker("Color Picker", &test_color);
	}
	ZeroGUI::Render();//Custom Render. I use it for drawing Combobox and ColorPicker over the menu
	ZeroGUI::Draw_Cursor(menu_opened);
}
Issues
  • Read

    Read

    https://github.com/MaddyOff/ue4-canvas-gui/blob/f832dc1c31795ed630a8d0631e595ccaf8bafed5/source/ZeroGUI.h#L148-L153

    This is detected because you called GetCursorPos that EAC has hooked without any thought

    opened by HappyCatOfficial 2
  • Crahing game after X amount of time

    Crahing game after X amount of time

    I am currently using the menu and after about 50 to 60 minutes it will crash the game, the menu is called in post render before the crash it works fine, any possible clue what could cause the crash, my main loop also runs in postrender with the canvas drawing and that keeps working fine only if I open the menu it crashed. Any clue on what it could be would mean alot, Thanks

    opened by Wearwolfy 0
Owner
Superior.
Discord: Superior.#1081
Superior.
Simple and portable (but not inflexible) GUI library in C that uses the native GUI technologies of each platform it supports.

libui: a portable GUI library for C This README is being written. Status It has come to my attention that I have not been particularly clear about how

Pietro Gagliardi 10.3k Jun 19, 2022
This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI

ImGui Goodies This is a collection of widgets and utilities for the immediate mode GUI (imgui) that I am developing for the critic2 GUI. Currently, th

null 95 Jun 22, 2022
Simple C++ script that will move the mouse pointer lighthly on the screen, perfect to prank your friends.

tembleke Simple script written in C++ that when it is executed, the mouse pointer moves lighthly above the screen. I have made this script in order to

viic 1 Oct 28, 2021
Sample Unreal Engine 5.0.1 C++ Project That Incorporates Dear ImGui

UE5 With Dear ImGui A sample Unreal Engine 5.0.1 C++ project that incorporates the Dear ImGui graphical user interface library. YouTube Tutorial This

Kyle Geske 21 Jun 24, 2022
rCalc is a Simple GUI Calculator

rCalc is a simple calculator created as a hobby project to improve my C programming language knowledge and GUI creation skills. GTK3 toolkit is used to create the GUI.

null 3 Jan 23, 2022
super duper simple gui for C, wrapping imgui and stb

super duper simle gui for C, wrapping imgui and stb You can use it as a static library with cmake. See the example directory for a complete example. E

Rasmus 11 May 19, 2022
raygui is a simple and easy-to-use immediate-mode-gui library.

raygui is a simple and easy-to-use immediate-mode-gui library.

Ray 1.8k Jun 22, 2022
Fast, flexible and simple GUI.

MyGUI is a cross-platform library for creating graphical user interfaces (GUIs) for games and 3D applications. Website: http://mygui.info/ There you c

null 605 Jun 20, 2022
Purely native C++ cross-platform GUI framework for Android and iOS development. https://www.boden.io

BODEN CROSS-PLATFORM FRAMEWORK Build purely native cross-platform experiences with Boden Website ⬡ Getting Started ⬡ API Reference ⬡ Guides ⬡ Twitter

Ashampoo Systems GmbH & Co KG 1.5k Jun 26, 2022
Elements C++ GUI library

Elements C++ GUI library Introduction Elements is a lightweight, fine-grained, resolution independent, modular GUI library. Elements is designed with

Cycfi Research 2.3k Jun 25, 2022
Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL

NanoGUI NanoGUI is a minimalistic cross-platform widget library for OpenGL 3+, GLES 2/3, and Metal. It supports automatic layout generation, stateful

Mitsuba Physically Based Renderer 1k Jun 27, 2022
A single-header ANSI C immediate mode cross-platform GUI library

Nuklear This is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed a

Immediate Mode UIs, Nuklear, etc. 5.7k Jun 20, 2022
A library for creating native cross-platform GUI apps

Yue A library for creating native cross-platform GUI apps. Getting started Documentations FAQ Development Examples Sample apps (with screenshots) Muba

Yue 2.8k Jun 26, 2022
A barebones single-header GUI library for Win32 and X11.

luigi A barebones single-header GUI library for Win32 and X11. Building example Windows Update luigi_example.c to #define UI_WINDOWS at the top of the

Nakst 168 Jun 17, 2022
Clight GUI written in Qt.

CLight GUI Clight GUI written in Qt. Huge thanks to @FedeDP for writing Clight and Clightd, the daemons upon which this is built on.

null 48 Jun 20, 2022
YARA pattern matching scannner GUI

YARA GUI This is a GUI for the binary pattern matching scanner YARA. Features Drag and drop targets Directory scanning Compiled rule cache Favorite/re

null 9 Jul 2, 2021
Proof-of-concept code to reconstruct the GUI of a Xen guest running Windows

vmi-reconstruct-gui A proof-of-concept to reconstruct the GUI of a Xen VM running Windows 7. ❗ Disclaimer This repository is work in progress. It curr

Jan 12 Oct 22, 2021
Nvui: A NeoVim GUI written in C++ and Qt

Nvui: A NeoVim GUI written in C++ and Qt

Rohit Pradhan 1.6k Jun 25, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.3k Jun 27, 2022