← Back

ofxSurfingUndoHelper

github.com/moebiussurfing/ofxSurfingUndoHelper · @moebiussurfing
OF 0.12 Releases GUI Utilities

Helper to integrate an Undo Engine over an ofParameterGroup params container. Based on ofxUndo from nariakiiwatani.

1 1 Last commit 1y ago Created 5y ago

README

ofxSurfingUndoHelper

License: MIT

Overview

An add-on helper to integrate an Undo Engine based on ofxUndo from nariakiiwatani, but simplified to easely use ofParameters and with an ImGui based GUI.

Screenshot



Features

ENTER : SAVE UNDO CTRL + Z : UNDO CTRL + SHIFT + Z : REDO CTRL + C : CLEAR HISTORY CTRL + S : STATE STORE CTRL + R : STATE RECALL

Usage

ofApp.h ``.cpp

include "ofxSurfingUndoHelper.h"

include "ofxSurfingImGui.h"



ofxSurfingUndoHelper undoManager; ofxSurfing_ImGui_Manager guiManager;

ofParameterGroup params;


ofApp.cpp
.cpp void ofApp::setup() { params.add(..) // -> add params

undoManager.setup(params);

guiManager.setup(); }

void ofApp::draw() { guiManager.beginWindow(); { undoManager.drawImGui(); } guiManager.endWindow(); }

void ofApp::keyPressed(int key) { if (key == 's') undoManager.doStoreUndo(); }
`

Dependencies

ofxSurfingHelpers ofxSurfingImGui [WIP] ofxImGui. Fork from @Daandelange.

ofxUndo Already added to
OFX_ADDON/libs/`. No need to add into PROJECT GENERATOR.

Tested Systems

Windows 10 / VS 2017 / OF ~0.11 Windows 10 / VS 2022 / oF ~0.12

Author

An add-on by @moebiusSurfing ( ManuMolina ) 2021-2022

License

MIT License

TODO

+ Allow multiple independent groups. + Add Lite version without ImGui but ofxGui instead.

Get this addon

HTTPS
SSH

Latest release

v0.1 published 4y ago