It's an openFrameworks addno which could create some simple ui.
C++ C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
example
obj
src
.gitignore
MouseParticle.cpp
MouseParticle.h
README.md
UI.sln
UI.v11.suo
UI.vcxproj
UI.vcxproj.filters
UI.vcxproj.user
addons.make
icon.rc

README.md

OfxSimpleUI

It's a Simple User Interface system library for Openframeworks. I created it for creating the ui for a little project so it is simple enough but not strong.

ofxSimpleui contains:

  • ButtonWidget
  • DigitalNumWiget
  • PictureWidget
  • ScrollerWidget
  • StaticText
  • SwitchWidget
  • TouchWidget
  • PPIPanel

Requirements

Openframeworks 0.8.0+

Sample

  void button_event_panel_setting_exit(ButtonWidget* bt)
  {
    ofApp* app = bt->get_callback_holder();
    app->panel_base->set_activate(true);
    app->panel_setting_top->set_activate(false);
  }

  BasePanel *panel_setting_top;
  ButtonWidget* panel_setting_exit;

  panel_setting_top = new BasePanel(0,0,_width,_height);
  panel_setting_top->set_background("setting_back.png");
  panel_setting_top->set_activate(false);

  panel_setting_exit = new ButtonWidget();
  panel_setting_exit->init_button("exitDown.png","exitOver.png","exitNormal.png",
                                    button_event_panel_setting_exit);
  panel_setting_exit->set_position(720,28);
  panel_setting_exit->set_callback_holder(this);
  panel_setting_top->add_widget(panel_setting_exit);

There is a example in ofApp.cpp.

s1 12 13

Others

ActiveDrawableRect类带有可编辑函数,用于调节位置和输出调试信息。 每个类的draw_internal()函数画fbo,draw()函数把fbo画出来。 BasePanel和BaseWidget两个类的draw函数大致是一样的。 update函数最后调用draw_internal,最先调用ActiveDrawableRect::update(dt); 说明带有static的类都只在初始化时候和必要时候画fbo一次, 不会实时更新,这些类都带有static_init()函数,在初始化时调用这些函数。