Git Product home page Git Product logo

ofxdisplaymessage's Introduction

ofxDisplayMessage

Overview

This is an addon for openFrameworks. I made it to show attention message on window easily.

Requirement

ofxDisplayMessage doesn't depend other addons.

Tested system

  • Windows 10 + VS2017 + of0.10.1 .
  • Mac OS 10.14 + XCode 10.2.1 + of0.10.1

I think compatible almost all versions, because it's simple addon.

Usage

  1. Add this addon.
  2. Include ofxTextFlow.h.
  3. Put the static method ofxDisplayMessage::setMessage("My text") when you need.

It's gonna delete old message when over the max num (default: 30 lines).

You can use some method to change appearance. For example.

// set position
// message align with text boundingbox center
ofxDisplayMessage::setPos(500, 1000);

// set text color
// default: ofColor::gray
ofxDisplayMessage::setColor(ofColor(0, 0, 0));

// set text background color
// default: ofColor(0, 0);
ofxDisplayMessage::setBackgroundColor(ofColor(255, 255, 0));
	
// set font
// draw with ofTrueTypeFont if loaded
ofxDisplayMessage::loadFont("arial.ttf", 30);

// change display duration (sec)
// default: 5.0
ofxDisplayMessage::setDuration(10);
    
// initial display message
ofxDisplayMessage::setMessage("Please key or mouse press.");

ofxdisplaymessage's People

Contributors

tettou771 avatar

Stargazers

moebiusSurfing avatar

Watchers

James Cloos avatar  avatar

ofxdisplaymessage's Issues

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.