Giter Site home page Giter Site logo

linecode / ayagui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from g1n0st/ayagui

0.0 1.0 0.0 244 KB

A lite custom imgui-mode graphic user interface based on Modern C++ and OpenGL developed by Chang Yu

Home Page: https://github.com/g1n0st/AyaGui

License: GNU General Public License v3.0

C++ 100.00%

ayagui's Introduction

AyaGui

Last update: 2020/5/11

g1n0st

AyaGui is a lite imgui-mode graphical user interface library based on Modern C++ and OpenGL developed by g1n0st, inspired by Dear imgui. It is lite, portable and self - contained(no external dependencies) You can easily integrate it into your 3D - pipeline enabled application at any time.

AyaGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools(as opposed to UI for the average end - user). It favors simplicity and productivity toward this goal, and lacks certain features normally found in more high - level libraries.

AyaGui is particularly suited to integration in games engine(for tooling), real - time 3D applications, full-screen applications, embedded applications, or any applications on consoles platforms where operating system features are non - standard

Usage

Before use AyaGui and create windows, you should initialize windows info, just like the function as follows in GuiViewer/glfwViewer.h:

void InitializeWindowsInfo();

the input message context of AyaGui is independent of the platform and highly abstraction, you should bind input to AyaGui handful. Our demo gives an simple example of glfw, you can see these functions as follows in GuiViewer/glfwViewer.h:

void OnResize(GLFWwindow* window, int width, int height);
void OnKeyboardEvent(GLFWwindow *window, int key, int scancode, int action, int mods);
void OnMouseEvent(GLFWwindow *window, int key, int action, int mods);
void OnCursorEvent(GLFWwindow *window, double x, double y);

Before the rendering loop, initiaze AyaGui and make an resize call first:

AyaGui::Init();
AyaGui::Resize(1280, 800);

All preparation is done! Just create GUI you need in the rendering loop!

Demo

You can see our complete demo in GuiViewer/demo.cpp, here gives an example corresponded to Dear imgui demo:

AyaGui::Text("Hello, world %d", 123);
if (AyaGui::Button("Save"))
    MySaveFunction();
AyaGui::InputText(buf);
AyaGui::Slider<float>("float", f, 0.0f, 1.0f);

The screen shot of the complete demo:

AyaGui demo

License

AyaGui is licensed under the GNU License, see LICENSE.txt for more information. However, unless you really care about the license, you can almost ignore it.

Well, good luck and have fun! : )

ayagui's People

Contributors

g1n0st avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.