mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-01 21:54:39 -04:00
Initial Meter Panel work
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user