Add default background color and initialize property

This commit is contained in:
Ryan Huffman 2014-06-30 12:20:05 -07:00
parent 9ae65e4439
commit 123773a8e3
4 changed files with 4 additions and 2 deletions

View file

@ -22,7 +22,7 @@
Overlay::Overlay() :
_parent(NULL),
_alpha(DEFAULT_ALPHA),
_color(DEFAULT_BACKGROUND_COLOR),
_color(DEFAULT_OVERLAY_COLOR),
_visible(true),
_anchor(NO_ANCHOR)
{

View file

@ -21,7 +21,7 @@
#include <SharedUtil.h> // for xColor
const xColor DEFAULT_BACKGROUND_COLOR = { 255, 255, 255 };
const xColor DEFAULT_OVERLAY_COLOR = { 255, 255, 255 };
const float DEFAULT_ALPHA = 0.7f;
class Overlay : public QObject {

View file

@ -18,6 +18,7 @@
#include "ui/TextRenderer.h"
TextOverlay::TextOverlay() :
_backgroundColor(DEFAULT_BACKGROUND_COLOR),
_leftMargin(DEFAULT_MARGIN),
_topMargin(DEFAULT_MARGIN),
_fontSize(DEFAULT_FONTSIZE)

View file

@ -28,6 +28,7 @@
#include "Overlay.h"
#include "Overlay2D.h"
const xColor DEFAULT_BACKGROUND_COLOR = { 0, 0, 0 };
const int DEFAULT_MARGIN = 10;
const int DEFAULT_FONTSIZE = 11;