-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathButtonAgent.cpp
More file actions
54 lines (39 loc) · 874 Bytes
/
ButtonAgent.cpp
File metadata and controls
54 lines (39 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* ButtonAgent.cpp
* openFrameworks
*
* Created by Joshua Walton on 12/25/08.
* Copyright 2008 __MyCompanyName__. All rights reserved.
*
*/
#include "ButtonAgent.h"
ButtonAgent::ButtonAgent() {
}
ButtonAgent::ButtonAgent(float _x, float _y, int _myID, bool _isVisible, char * _title) {
origPos.x = _x;
origPos.y = _y;
pos.y = origPos.y;
isVisible = _isVisible;
title = _title;
myID = _myID;
myWidth = 70;
myHeight = 30;
}
void ButtonAgent::update() {
}
void ButtonAgent::draw() {
if (isVisible == true) {
ofSetColor(100,100,100);
int spaceBuffer = 25;
pos.x = origPos.x + (myID * myWidth) + (myID * spaceBuffer);
ofRect(pos.x, pos.y, myWidth, myHeight);
ofSetColor(255,255,255);
ofDrawBitmapString(title, pos.x+3, pos.y+myHeight/1.5);
}
}
void ButtonAgent::up() {
}
void ButtonAgent::down() {
}
void ButtonAgent::over() {
}