GithubHelp home page GithubHelp logo

moebiussurfing / ofxsurfingimgui Goto Github PK

View Code? Open in Web Editor NEW
40.0 2.0 9.0 84.49 MB

( WIP ) ImGui Toolkit for openFrameworks apps: ofParameters Widgets and Layout Helpers. Modules/Engines: Log, Debugger, Docking, Layout Presets and more.

License: Other

C++ 94.22% C 5.74% Makefile 0.03%
openframeworks openframeworks-addon imgui imgui-widgets dear-imgui dearimgui

ofxsurfingimgui's Introduction


ofxSurfingImGui.

A Dear ImGui Toolkit
for openFrameworks
desktop app projects.

An extension for ofxImGui.


WORK IN PROGRESS!


OVERVIEW

  • Bundled batteries for your full Desktop OF Apps.
  • ofParameter Widgets.
  • Layout and Style Helpers.
  • Useful Modules/Systems.
  • Workflow Engines for the final user.

FEATURES

  • Simple Setup:
    • Simplified coder and user workflow.
    • Many useful Internal states and persistent settings:
      • Minimize, debug, extra, advanced, windows auto resize...
      • Log, Notifier, and windows visibility and distribution.
      • Global Scale.
  • Useful API methods and Snippets:
    • Help on populate Windows and Widgets.
    • Speed-Up responsive Layout Helpers.
  • ofParameter Helpers:
    • Many RAW DearImGui widgets adapted.
    • Added custom useful widgets.
  • Multiple instances:
    • Many windows around your classes and ofxAddons.
    • All together without colliding.
  • Four active Font Sizes for labels, widgets, and text paragraphs.
    • Four optional extra fonts for alternate monospaced and non-monospaced.
  • Extra Mouse Control:
    • Wheel for tweaking:
      • +Ctrl to finetune.
    • Right-Click:
      • To Reset to param Center.
      • +Ctrl to Reset to Min.
      • +Alt to Reset to Max.
  • Themes Editor example: ( WIP )
    • 20+ bundled themes compilation.
    • Hardcoded and .ini files.
    • File serializers, A-B compare, sizes and/or colors.
    • Manager, Demo Window and Tester Widgets.

MODULES / SYSTEMS

  • Log System:
    • With custom tags.
  • Notifier System:
    • With custom layout and styles.
  • Debugger System:
    • Metrics: frame rate and frame time.
    • Profiler: Cpu and Gpu measurements.
  • Text Editor System:
    • Language marks with custom marked keywords.
    • Font sizes, color themes.
    • Clipboard access and undo/redo history.
  • Image Inspector System:
    • Zoom with pixel color picker.
  • Console System: ( WIP )
    • Basic console/terminal module.
    • Call methods/commands by typing into the console.

ENGINES

  • Windows Organizer:
    • Aligner, cascade, and Group/Linker.
  • Layout Presets Engine. ( WIP )
  • Docking Helpers. ( WIP )

SCREENSHOTS

EXAMPLE: 00_HelloWorld

CODE

ofApp.h

#pragma once
#include "ofMain.h"

#include "ofxSurfingImGui.h"

class ofApp : public ofBaseApp
{
  public:
  void draw();

  ofParameter<bool> bEnable{ "Enable", true };
  ofParameter<float> speed{ "Speed", .5f, 0.f, 1.f };
  ofParameterGroup params{ "MyGroup", bEnable, speed };

  ofParameter<bool> bGui{ "Show", true };

  ofxSurfingGui ui;
};

ofApp.cpp

#include "ofApp.h"

void ofApp::draw()
{
  ui.Begin();
  {
    /* Put windows here */
    if (ui.BeginWindow(bGui))
    {
      /* Put widgets here */
      ui.AddLabelBig("00_HelloWorld");
      ui.AddSpacing();
      ui.Add(bEnable, OFX_IM_TOGGLE_BIG_BORDER_BLINK);
      ui.Add(speed, OFX_IM_HSLIDER);
      ui.AddSpacingSeparated();
      ui.AddGroup(params, SurfingGuiGroupStyle_Collapsed);

      ui.EndWindow();
    }
  }
  ui.End();
}

REQUERIMENTS

IMGUI OF BACKEND

WHY ANOTHER BACKEND FORK?

DATA ASSET FILES

  • Recommended: JetBrainsMono-Bold.ttf
    • The monospaced font file for the default theme.
    • Put into OF_APP/bin/data/assets/fonts/.
  • Optional: data.zip
    • More font files (non-monospaced alternative) from the same family.
    • Put into each OF project OF_APP/bin/data/.
ABOUT THE FONTS

The single font file for the currently used theme is JetBrainsMono-Bold.ttf. If that font is not located, it will search for a legacy font called telegrama_render.otf. If none of those fonts are located, it will work too, but using the default embedded ProggyClean.ttf font from ImGui. (So OF_APP/bin/data/ can also be completely empty too!)


RELATED LINKS

CURRENT SYSTEMS

  • Windows 11 / Visual Studio 2022.
  • macOS 12.5 Monterey / Xcode 14.2 OF 0.11.2. Intel.
  • macOS 14.5 Sonoma / Xcode 15.4 / [OF 0.12+] / M1/M2 Apple Silicon. iOS requires testing.

THANKS

Thanks to Omar Cornut for the fantastic Dear ImGui.

SUPER THANKS to @Daandelange for HIS AWESOME ofxImGui (maintained) FORK, and some macOS fixes.

Thanks to @alptugan for macOS testing and some fixes.

All source snippets and widgets from other authors are linked into header files as credits. Thanks!


AUTHOR

An addon by moebiusSurfing.
( ManuMolina ) 2021-2024


LICENSE

MIT LICENSE

ofxsurfingimgui's People

Contributors

daandelange avatar moebiussurfing avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ofxsurfingimgui's Issues

iOS support

I'm trying to build this addon for iOS devices. On https://github.com/Daandelange/ofxImGui/ it says

"Try the latest ofxImGui legacy version 1.77, or try this untested transition commit"

I tried that and in imconfig.h set:

#define IMGUI_IMPL_OPENGL_LOADER_GLBINDING3 1
#define IMGUI_IMPL_OPENGL_ES3 1

also removed imgui backend files for glfw and opengl2 to move compilation forward but still ended up with rabbit hole of different compile errors.

Is there any older version of ofxSurfingImGui that should work on iOS devices? Is there any table what version of imgui and ofxImGui this addon (ofxSurfingImGui) requires?

I'm wondering if using imgui SDL backend is the better way to go instead of GLFW since the latter one is not supported mobile devices yet (android & iOS), but don't know much ofxSurfingImGui or ofxImgGui internals how much it depends on GLFW or OpenGL. Do you have any tips?

the imgui issue

sorry, which version imgui shoud i applied? got bunch of imgui erros
ImGuiSliderFlags_Logarithmic
ImDrawFlags
ScaleRatioFromValueT
etc....

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.