Nice things to use along dear imgui

Those are officially maintained. You also can find various useful third-party snippets here: https://github.com/ocornut/imgui/wiki


imgui_memory_editor

https://github.com/ocornut/imgui_club/tree/master/imgui_memory_editor

Mini hexadecimal editor! Right-click for option menu. Features: Keyboard controls. Read-only mode. Optional Ascii display. Optional HexII display. Goto address. Highlight range/function. Read/Write handlers.

Usage

static MemoryEditor mem_edit;
mem_edit.DrawWindow("Memory Editor", data, data_size);

memory editor

memory editor


imgui_freetype

Note: imgui_freetype.cpp has been moved from imgui_club into the main imgui repository, inside the misc/freetype/ folder: https://github.com/ocornut/imgui/tree/master/misc/freetype

Comments
  • Memory editor: clicks to edit not recognized?

    Memory editor: clicks to edit not recognized?

    I just noticed a weird (new?) behaviour which I didn't notice when I started using the imgui_memory_editor:

    When I'm clicking a number to start editing, and the click takes a bit longer, the focus isn't taken, so editing doesn't start. Only when "short-tapping" through a touchpad it seems to work.

    I had to replace the IsMouseClicked(0) here:

    https://github.com/ocornut/imgui_club/blob/e680ad8d6b9278367d0f71a698beb96b70762ed4/imgui_memory_editor/imgui_memory_editor.h#L394

    ...with IsMouseReleased(0). This always seems to work, both with "short taps" and "long clicks", but I don't understand why.

    Is anybody else seeing this too? Could this be caused by a change of behaviour in newer ImGui versions?

  • imgui_memory_editor: Fix clicking in hex area.

    imgui_memory_editor: Fix clicking in hex area.

    I found it a bit hard to tell exactly (I always find this input-type stuff difficult to debug...) but it looks like clicking on the hex area was being interpreted as an attempt to move the window. The move then deactivated the text box used for user input, which caused the input to be canceled.

    Making the child window non-moveable fixes this, but it's possible there's some better way of doing it, e.g., by having the hex view swallow the click or something.

    Thanks,

    --Tom

  • Added custom preview of memory contents

    Added custom preview of memory contents

    This change allows the addition of additional memory content previews at the bottom of the memory editor. I'm using it to show a sparkline at the moment but it's general and allows anything to be added.

    image

  • imgui_memory_editor: Add option to hide the options footer.

    imgui_memory_editor: Add option to hide the options footer.

    The settings and data visualisation footers take a lot of precious screen space. I prefer to implement my own GUI for this, because I know the best representation for my data, so in this PR I suggest an option to hide the settings footer.

  • imgui_memory_editor: add common datatype viewer

    imgui_memory_editor: add common datatype viewer

    This pull request adds a second line to the bottom of the memory editor window. It allows to show the currently selected byte in various representations, like uint8, in octal and big endian. The current available types are:

    • int8
    • uint8
    • int16
    • uint16
    • int32
    • uint32
    • int64
    • uint64
    • float
    • double

    Each of these types can be loaded from memory as little or big endian. They can be viewed in either:

    • binary
    • octal
    • decimal
    • hexadecimal

    The editor will read from the following bytes, if possible, if no bytes are available, they result will be truncated. Nothing will be calculated if the editor is readonly.

    As of right now the implementation is a bit ugly and wordy, I'm open to any suggestions to improve it. A small gif showing it in action can be seen here: https://twitter.com/ArvidGerstmann/status/898283352771497984

    capture capture2

  • Memory Editor: Crashes using navigating through down arrow key with DataPreview option

    Memory Editor: Crashes using navigating through down arrow key with DataPreview option

    Using the sample code given to recreate the issue. Then set the values to below 15 both data and size with enabled option data preview, will cause the crash when key pressed down arrow.

    // Sample 12
    static char data[12];
    size_t data_size = 12;
    // and
    mem_edit_1.OptShowDataPreview = true
    

    This was due to the function of DrawPreviewData(), the reason was due to the mem_size is greater than the addr. The partial fix I did at the very first line of the function is to set the max memory size of the address(highlight selected): if (addr > mem_size) addr = mem_size;

  • imgui_memory_editor: Unify stdio calls, silence warnings

    imgui_memory_editor: Unify stdio calls, silence warnings

    Currently, imgui_memory_editor uses _snprintf when compiling with MSVC, and snprintf otherwise. These two functions are similar, but they have slightly different behavior:

    The snprintf function and the _snprintf family of functions format and store count or fewer characters in buffer. The snprintf function always stores a terminating null character, truncating the output if necessary. The _snprintf family of functions only appends a terminating null character if the formatted string length is strictly less than count characters.

    (From https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l)

    This change unifies the calls across different compilers. It also silences MSVC warnings about using the "unsafe" versions of the stdio functions sprintf and sscanf. Microsoft provides "safe" versions of these functions, but they are not part of the C standard and therefore not portable.

  • Adds isOpen return value to draw window & height

    Adds isOpen return value to draw window & height

    Changed return value to bool to detect if editor is open. Window height is now set to half of window width so that editor is approximately the right size on default creation.

  • Can't compile imgui_freetype with recent imgui

    Can't compile imgui_freetype with recent imgui

    Hi,

    I'm trying to compile imgui_freetype with dear_imgui version 1.51 but I'm getting a few errors. One of which indicates that ImFontAtlasBuildRegisterDefaultCustomRects(atlas) could not be found which lets me believe this function existed in a previous version of dear_imgui but I might be wrong as I don't see any mention of it in API changelog. The other errors are the same but for other variables or function calls. I was just wondering if I was missing something obvious. If my issue isn't clear enough please let me know.

    Thanks in advance for your help

  • Fixes color value for '.' in ascii display when

    Fixes color value for '.' in ascii display when "Grey out zeroes" set.

    The dot character ('.') is a valid, printable character, but was being inadvertently drawn as greyed out in the memory editor's ascii display. This has been fixed.

  • Memory Editor: Setting columns to 0 causes crash

    Memory Editor: Setting columns to 0 causes crash

    A user can double-click the Columns DragInt and can set Cols outside the (4, 32) range. Setting Cols to 0 (or less) is pathological and causes a divide-by-zero later.

    Suggest this fix

                    if (ImGui::DragInt("##cols", &Cols, 0.2f, 4, 32, "%d cols")) 
                    { 
                        if (Cols <= 0) Cols = 1; // Crashproofing
                        ContentsWidthChanged = true; 
                    }
    
    
  • MSYS UCRT64 compatibility

    MSYS UCRT64 compatibility

    When using the UCRT64 environment of MSYS2 to make a build that links to the UCRT, instead of to the old msvcrt, stdio and snprintf() work the way they do in MSVC, and expects the same modifiers. However, _MSC_VER is not defined in the UCRT64 headers, and thus the current guard doesn't work. Checking for _UCRT, which is defined, fixes this. Without this fix, it is necessary to define __USE_MINGW_ANSI_STDIO at compile time so as to switch to its implementation of stdio, or compilation will fail if you set warning flags on (-Wall, -Werror, etc). One could ofc ignore this warning but that seems like a bad plan...

    Build error log

  • Add BgColorFn for byte coloring and InteractFn for interactions on bytes

    Add BgColorFn for byte coloring and InteractFn for interactions on bytes

    BgColorFn works just like HighlightFn, except it allows coloring all bytes in view instead of just the highlighted bytes. The return value is the color; 0 means don't change the color. HighlightFn takes priority over BgColorFn.

    InteractFn can be used to display popups, context menus, etc.

    image

    image

  • Memory Editor: doesn't seem to work with more than 24-bits of address space

    Memory Editor: doesn't seem to work with more than 24-bits of address space

    From @simuuz https://github.com/ocornut/imgui/issues/3488#issuecomment-720126520

    The reason for me making it from scratch is that the memory watcher extension for ImGui dies when feeding him with address spaces that are larger than 24 bit (IIRC, at least that's what has happened to me and some other emulator developers), and since the GBA has an address space that ranges from 28 to 32 bit, here I am :3

    I answered

    I haven't tried but I am assuming that there'll be an issue with floating point precision with large scroll amount. I don't know how you'd intend to solve it but whatever the solution (maybe implementing custom scroll bar + virtualizing position) it would be worth implementing it in the existing memory editor.. (let's resume this discussion in imgui_club issue tracker)

Related tags
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies

Dear ImGui (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addit

Sep 26, 2022
Advanced 2D Plotting for Dear ImGui
Advanced 2D Plotting for Dear ImGui

ImPlot ImPlot is an immediate mode, GPU accelerated plotting library for Dear ImGui. It aims to provide a first-class API that ImGui fans will love. I

Sep 29, 2022
Real-time GUI layout creator/editor for Dear ImGui
Real-time GUI layout creator/editor for Dear ImGui

ImStudio Real-time GUI layout creator/editor for Dear ImGui Inspired by Code-Building/ImGuiBuilder Features Drag edit Property edit Covers most of the

Sep 28, 2022
Dear ImGui prototyping wrapper.

LabImGui Prototyping framework LabImGui wraps up creating a window, GL bindings, and a full screen docking set up with ImGui so that all of the boiler

Dec 2, 2021
An integrated information center created with dear ImGui using modern C++ design / coding style.

ImGui info-center Introduction An integrated notification and information center created with dear ImGui. Interfaces and variables are designed under

Jul 20, 2022
Addon widgets for GUI library Dear ImGui.
Addon widgets for GUI library Dear ImGui.

ImGui-Addons Addon widgets for GUI library Dear ImGui. File Dialog A simple cross-platform file dialog that uses dirent interface for reading director

Sep 21, 2022
This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun
This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun

Dear ImGui software renderer This is a software renderer for Dear ImGui. I built it not out of a specific need, but because it was fun. The goal was t

Sep 23, 2022
A permissively licensed markdown single-header library for Dear ImGui.
A permissively licensed markdown single-header library for Dear ImGui.

Support development of imgui_markdown through GitHub Sponsors or Patreon imgui_markdown Markdown For Dear ImGui A permissively licensed markdown singl

Sep 24, 2022
Window and GUI system based on Dear ImGui from OCornut
Window and GUI system based on Dear ImGui from OCornut

ImWindow Window and GUI system based on ImGui from OCornut. Include docking/floating window, multi window and multi render support. Platform Actually

Sep 24, 2022
This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui.

cimgui This is a thin c-api wrapper programmatically generated for the excellent C++ immediate mode gui Dear ImGui. All imgui.h functions are programm

Jul 5, 2021
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui
Immediate mode 3D gizmo for scene editing and other controls based on Dear Imgui

ImGuizmo Latest stable tagged version is 1.83. Current master version is 1.84 WIP. What started with the gizmo is now a collection of dear imgui widge

Sep 23, 2022
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

Sep 20, 2022
Simple ImGui external base. Uses ImGui DX9.
Simple ImGui external base. Uses ImGui DX9.

ImGui External Base ??️ What is this? ⚡ Hello all! I used to use noteffex's loader base for all my external ImGui projects. I got bored of using this

Jun 29, 2022
An addon of imgui for supporting docks in the imgui's window
An addon of imgui for supporting docks in the imgui's window

An addon of imgui for support dock in the window

Sep 23, 2022
A simple/fast stacking box layout library. It's useful for calculating layouts for things like 2D user interfaces.

A simple/fast stacking box layout library. It's useful for calculating layouts for things like 2D user interfaces. It compiles as C99 or C++. It's tested with gcc (mingw64), VS2015, and clang/LLVM. You only need one file to use it in your own project: layout.h.

Sep 25, 2022
A simple C++ ImGui loader base you can use for all your projects that need a login / register page.
A simple C++ ImGui loader base you can use for all your projects that need a login / register page.

C++ Loader Base ??️ What is this? ⚡ This is a very simple base I made for projects that require a login / register page that use ImGui. ??️ Screenshot

Sep 26, 2022
CMakeLists wrapper around imgui

ImGui Wrappings This is a trifold wrapper for the Dear ImGui library. Ease integration with CMake, Provide an RAII mechanism for ImGui scopes, Provide

Aug 25, 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

May 19, 2022
KeyAuth login form made with ImGui.

KeyAuth-ImGui-Example KeyAuth ImGui Example Download Repository Download the DirectX SDK

Sep 9, 2022