GUI: add a threshold for macro right click
This commit is contained in:
parent
0c24ee2f08
commit
6bc1ee0957
|
|
@ -59,6 +59,12 @@ extern "C" {
|
||||||
#define BACKUP_FUR "/backup.fur"
|
#define BACKUP_FUR "/backup.fur"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
#define MOBILE_UI_DEFAULT true
|
||||||
|
#else
|
||||||
|
#define MOBILE_UI_DEFAULT false
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "actionUtil.h"
|
#include "actionUtil.h"
|
||||||
|
|
||||||
bool Particle::update(float frameTime) {
|
bool Particle::update(float frameTime) {
|
||||||
|
|
@ -1716,10 +1722,13 @@ void FurnaceGUI::showError(String what) {
|
||||||
if (macroDragLineMode) { \
|
if (macroDragLineMode) { \
|
||||||
if (!macroDragInitialValueSet) { \
|
if (!macroDragInitialValueSet) { \
|
||||||
macroDragLineInitial=ImVec2(x,y); \
|
macroDragLineInitial=ImVec2(x,y); \
|
||||||
|
macroDragLineInitialV=ImVec2(dragX,dragY); \
|
||||||
macroDragInitialValueSet=true; \
|
macroDragInitialValueSet=true; \
|
||||||
macroDragMouseMoved=false; \
|
macroDragMouseMoved=false; \
|
||||||
} else if (!macroDragMouseMoved) { \
|
} else if (!macroDragMouseMoved) { \
|
||||||
macroDragMouseMoved=true; \
|
if ((pow(dragX-macroDragLineInitialV.x,2.0)+pow(dragY-macroDragLineInitialV.y,2.0))>=16.0f) { \
|
||||||
|
macroDragMouseMoved=true; \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
if (macroDragMouseMoved) { \
|
if (macroDragMouseMoved) { \
|
||||||
if ((int)round(x-macroDragLineInitial.x)==0) { \
|
if ((int)round(x-macroDragLineInitial.x)==0) { \
|
||||||
|
|
@ -3649,6 +3658,7 @@ bool FurnaceGUI::init() {
|
||||||
waveHex=e->getConfBool("waveHex",false);
|
waveHex=e->getConfBool("waveHex",false);
|
||||||
lockLayout=e->getConfBool("lockLayout",false);
|
lockLayout=e->getConfBool("lockLayout",false);
|
||||||
fullScreen=e->getConfBool("fullScreen",false);
|
fullScreen=e->getConfBool("fullScreen",false);
|
||||||
|
mobileUI=e->getConfBool("mobileUI",MOBILE_UI_DEFAULT);
|
||||||
|
|
||||||
syncSettings();
|
syncSettings();
|
||||||
|
|
||||||
|
|
@ -3830,6 +3840,7 @@ bool FurnaceGUI::finish() {
|
||||||
e->setConf("waveHex",waveHex);
|
e->setConf("waveHex",waveHex);
|
||||||
e->setConf("lockLayout",lockLayout);
|
e->setConf("lockLayout",lockLayout);
|
||||||
e->setConf("fullScreen",fullScreen);
|
e->setConf("fullScreen",fullScreen);
|
||||||
|
e->setConf("mobileUI",mobileUI);
|
||||||
|
|
||||||
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
||||||
delete oldPat[i];
|
delete oldPat[i];
|
||||||
|
|
@ -3969,6 +3980,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
followOrders(true),
|
followOrders(true),
|
||||||
followPattern(true),
|
followPattern(true),
|
||||||
changeAllOrders(false),
|
changeAllOrders(false),
|
||||||
|
mobileUI(MOBILE_UI_DEFAULT),
|
||||||
collapseWindow(false),
|
collapseWindow(false),
|
||||||
demandScrollX(false),
|
demandScrollX(false),
|
||||||
fancyPattern(false),
|
fancyPattern(false),
|
||||||
|
|
@ -4015,6 +4027,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
macroDragLineMode(false),
|
macroDragLineMode(false),
|
||||||
macroDragMouseMoved(false),
|
macroDragMouseMoved(false),
|
||||||
macroDragLineInitial(0,0),
|
macroDragLineInitial(0,0),
|
||||||
|
macroDragLineInitialV(0,0),
|
||||||
macroDragActive(false),
|
macroDragActive(false),
|
||||||
lastMacroDesc(NULL,NULL,0,0,0.0f),
|
lastMacroDesc(NULL,NULL,0,0,0.0f),
|
||||||
macroOffX(0),
|
macroOffX(0),
|
||||||
|
|
|
||||||
|
|
@ -1004,7 +1004,7 @@ class FurnaceGUI {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SelectionPoint selStart, selEnd, cursor;
|
SelectionPoint selStart, selEnd, cursor;
|
||||||
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders;
|
bool selecting, curNibble, orderNibble, followOrders, followPattern, changeAllOrders, mobileUI;
|
||||||
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex, lockLayout, editOptsVisible, latchNibble, nonLatchNibble;
|
bool collapseWindow, demandScrollX, fancyPattern, wantPatName, firstFrame, tempoView, waveHex, lockLayout, editOptsVisible, latchNibble, nonLatchNibble;
|
||||||
FurnaceGUIWindows curWindow, nextWindow, curWindowLast;
|
FurnaceGUIWindows curWindow, nextWindow, curWindowLast;
|
||||||
float peak[2];
|
float peak[2];
|
||||||
|
|
@ -1082,6 +1082,7 @@ class FurnaceGUI {
|
||||||
bool macroDragLineMode;
|
bool macroDragLineMode;
|
||||||
bool macroDragMouseMoved;
|
bool macroDragMouseMoved;
|
||||||
ImVec2 macroDragLineInitial;
|
ImVec2 macroDragLineInitial;
|
||||||
|
ImVec2 macroDragLineInitialV;
|
||||||
bool macroDragActive;
|
bool macroDragActive;
|
||||||
FurnaceGUIMacroDesc lastMacroDesc;
|
FurnaceGUIMacroDesc lastMacroDesc;
|
||||||
int macroOffX, macroOffY;
|
int macroOffX, macroOffY;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue