-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCameraControlButton.cpp
More file actions
31 lines (26 loc) · 955 Bytes
/
CameraControlButton.cpp
File metadata and controls
31 lines (26 loc) · 955 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
/*
* CameraControlButton.cpp
* Created by Zachary Ferguson
* Source file for the CameraControlButton class, a child class of the
* Fl_Button class for setting the camera to a preset position.
*/
#include "CameraControlButton.h"
/* Constructor for creating a new CameraControlGroup. */
/* Requires the x,y coordinates of the new CameraControlGroup. */
CameraControlButton::CameraControlButton(int x, int y, int h, int w,
const char* label, CameraPosition position) : Fl_Button(x, y, h, w, label)
{
this->position = position;
}
/* Destructor for this CameraControlGroup. */
CameraControlButton::~CameraControlButton(){}
/* Sets the current camera position to the given one. */
void CameraControlButton::setCameraPosition(CameraPosition position)
{
this->position = position;
}
/* Returns the current camera position for this CameraControlButton. */
CameraPosition CameraControlButton::getCameraPosition()
{
return this->position;
}