mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-05 00:41:17 -05:00
help tip updates, tuning bar support
This commit is contained in:
parent
4f9c623fec
commit
fc21d96c12
@ -271,21 +271,28 @@ void TuningCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||
} else {
|
||||
switch (hoverState) {
|
||||
case TUNING_HOVER_FREQ:
|
||||
setStatusText("Click, wheel or drag a digit to change frequency. Hold ALT to change PPM. Hold SHIFT to disable carry.");
|
||||
setStatusText("Click, wheel or drag a digit to change frequency; SPACE for direct input. Hold ALT to change PPM. Hold SHIFT to disable carry.");
|
||||
break;
|
||||
case TUNING_HOVER_BW:
|
||||
setStatusText("Click, wheel or drag a digit to change bandwidth. Hold SHIFT to disable carry.");
|
||||
break;
|
||||
case TUNING_HOVER_CENTER:
|
||||
setStatusText("Click, wheel or drag a digit to change center frequency. Hold SHIFT to disable carry.");
|
||||
setStatusText("Click, wheel or drag a digit to change center frequency; SPACE for direct input. Hold SHIFT to disable carry.");
|
||||
break;
|
||||
case TUNING_HOVER_PPM:
|
||||
setStatusText("Click, wheel or drag a digit to change device PPM offset. Hold SHIFT to disable carry.");
|
||||
break;
|
||||
case TUNING_HOVER_NONE:
|
||||
setStatusText("");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (hoverState == TUNING_HOVER_BW || hoverState == TUNING_HOVER_FREQ) {
|
||||
wxGetApp().getDemodMgr().setActiveDemodulator(wxGetApp().getDemodMgr().getLastActiveDemodulator());
|
||||
} else {
|
||||
wxGetApp().getDemodMgr().setActiveDemodulator(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
void TuningCanvas::OnMouseDown(wxMouseEvent& event) {
|
||||
@ -339,6 +346,7 @@ void TuningCanvas::OnMouseLeftWindow(wxMouseEvent& event) {
|
||||
SetCursor(wxCURSOR_CROSS);
|
||||
hoverIndex = 0;
|
||||
hoverState = TUNING_HOVER_NONE;
|
||||
wxGetApp().getDemodMgr().setActiveDemodulator(wxGetApp().getDemodMgr().getLastActiveDemodulator());
|
||||
|
||||
if (currentPPM != lastPPM) {
|
||||
wxGetApp().saveConfig();
|
||||
@ -359,6 +367,10 @@ void TuningCanvas::setHelpTip(std::string tip) {
|
||||
|
||||
void TuningCanvas::OnKeyDown(wxKeyEvent& event) {
|
||||
InteractiveCanvas::OnKeyDown(event);
|
||||
|
||||
if (event.GetKeyCode() == WXK_SPACE && hoverState == TUNING_HOVER_CENTER || hoverState == TUNING_HOVER_FREQ) {
|
||||
wxGetApp().showFrequencyInput();
|
||||
}
|
||||
}
|
||||
|
||||
void TuningCanvas::OnKeyUp(wxKeyEvent& event) {
|
||||
|
@ -141,7 +141,7 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
ColorTheme *currentTheme = ThemeMgr::mgr.currentTheme;
|
||||
int last_type = wxGetApp().getDemodMgr().getLastDemodulatorType();
|
||||
|
||||
if (mouseTracker.mouseInView()) {
|
||||
if (mouseTracker.mouseInView() || wxGetApp().getDemodMgr().getActiveDemodulator()) {
|
||||
hoverAlpha += (1.0f-hoverAlpha)*0.1f;
|
||||
if (hoverAlpha > 1.5f) {
|
||||
hoverAlpha = 1.5f;
|
||||
@ -713,23 +713,23 @@ void WaterfallCanvas::OnMouseMoved(wxMouseEvent& event) {
|
||||
|
||||
mouseTracker.setVertDragLock(true);
|
||||
mouseTracker.setHorizDragLock(false);
|
||||
setStatusText("Click and drag to change demodulator bandwidth. D to delete, S for stereo.");
|
||||
setStatusText("Click and drag to change demodulator bandwidth. SPACE for direct frequency input. D to delete, S for stereo.");
|
||||
} else {
|
||||
SetCursor(wxCURSOR_SIZING);
|
||||
nextDragState = WF_DRAG_FREQUENCY;
|
||||
|
||||
mouseTracker.setVertDragLock(true);
|
||||
mouseTracker.setHorizDragLock(false);
|
||||
setStatusText("Click and drag to change demodulator frequency. D to delete, S for stereo.");
|
||||
setStatusText("Click and drag to change demodulator frequency; SPACE for direct input. D to delete, S for stereo.");
|
||||
}
|
||||
} else {
|
||||
SetCursor(wxCURSOR_CROSS);
|
||||
nextDragState = WF_DRAG_NONE;
|
||||
if (shiftDown) {
|
||||
setStatusText("Click to create a new demodulator or hold ALT to drag range.");
|
||||
setStatusText("Click to create a new demodulator or hold ALT to drag range, SPACE for direct center frequency input.");
|
||||
} else {
|
||||
setStatusText(
|
||||
"Click to move active demodulator frequency or hold ALT to drag range; hold SHIFT to create new. Right drag or A / Z to Zoom. Arrow keys (+SHIFT) to move center frequency.");
|
||||
"Click to move active demodulator frequency or hold ALT to drag range; hold SHIFT to create new. Right drag or A / Z to Zoom. Arrow keys (+SHIFT) to move center frequency; SPACE for direct input.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user