Initial Meter Panel work

This commit is contained in:
Charles J. Cliffe
2016-07-03 20:59:49 -04:00
parent cf90a829b0
commit a87c58c4a8
7 changed files with 164 additions and 1 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ int GainCanvas::GetPanelHit(CubicVR::vec2 &result) {
GainInfo *gInfo = (*gi);
CubicVR::vec2 hitResult;
if (gInfo->panel.hitTest(CubicVR::vec2((mouseTracker.getMouseX()-0.5)*2.0, (mouseTracker.getMouseY()-0.5)*2.0), hitResult)) {
if (gInfo->panel.hitTest(mouseTracker.getGLXY(), hitResult)) {
// std::cout << "Hit #" << i << " result: " << hitResult << std::endl;
result = (hitResult + CubicVR::vec2(1.0,1.0)) * 0.5;
return i;
+2
View File
@@ -12,6 +12,7 @@
#include "PrimaryGLContext.h"
#include "SDRDeviceInfo.h"
#include "Timer.h"
#include "MeterPanel.h"
class GainInfo {
public:
@@ -52,6 +53,7 @@ private:
PrimaryGLContext *glContext;
std::string helpTip;
std::vector<GainInfo *> gainInfo;
std::vector<MeterPanel *> gainPanels;
GLPanel bgPanel;
SDRRangeMap gains;