Git Product home page Git Product logo

imgui-goodies's Introduction

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, the contents of this repo are:

  • imgui_widget.cpp: a collection of small independent widgets, including:

    • SlidingBar: a bar widget that slides when it is grabbed with the mouse.

    • ButtonWithX: a button with an X at the end. Useful for tabs.

    • ResizeGripOther: a resize grip that resizes a window other than the one on which it is drawn.

    • LiftGrip: a grip on the bottom left part of the window rendered in a different color. Responds to grabbing.

    • AttachTooltip: a function that provides delayed tooltips. Tooltips are shown if: i) the mouse hovers over the element for longer than a certain time, passed as argument to the function, ii) the mouse goes from one tooltip element to another, and the tooltip is being shown, or iii) the mouse hovers a tooltip element for longer than t seconds and less than t seconds have elapsed between the time the last tooltip was shown and the current item started being hovered. See example below.

  • imgui_dock.cpp: a window docking system. There are three types of windows:

    • Docks (BeginDock()/EndDock()): like normal windows, except they can be docked to the other two window types.

    • Containers (Container()): a window to which docks can be attached as tabs. It has a behavior similar to a browser window.

    • Root containers (RootContainer()): a window to which both containers and docks can be attached. It splits into regions for the different attached windows depending on where they are dropped.

    Most of the functionality of normal ImGui windows is preserved. imgui_dock.cpp uses the widgets in imgui_widget.cpp but is otherwise self-contained.

Some examples are given in the examples subdirectory. Use the compile.sh script to build the whole directory tree.

Examples

Docks, containers, and root containers:

Example

Delayed tooltips:

Example

imgui-goodies's People

Contributors

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