Merge branch 'master' of https://github.com/tildearrow/furnace into es5506_alt
* 'master' of https://github.com/tildearrow/furnace: maybe uninitialized GUI: prepare for a per-channel oscilloscope? GUI: add backdrop if system file picker is open GUI: add ability to customize startup system GUI: finally implement "don't scroll when moving c ursor" setting new panning effects (80/81/82) GUI: fix sample paste crash GUI: implement sample scroll with mouse wheel sysDef oopsie # Conflicts: # src/gui/guiConst.cpp
This commit is contained in:
commit
5414213710
52 changed files with 1021 additions and 342 deletions
|
|
@ -1341,7 +1341,26 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
sampleZoom=100.0/zoomPercent;
|
||||
if (sampleZoom<0.01) sampleZoom=0.01;
|
||||
sampleZoomAuto=false;
|
||||
int bounds=((int)sample->samples-round(rectSize.x*sampleZoom));
|
||||
if (bounds<0) bounds=0;
|
||||
if (samplePos>bounds) samplePos=bounds;
|
||||
updateSampleTex=true;
|
||||
} else {
|
||||
if (wheelY!=0) {
|
||||
if (!sampleZoomAuto) {
|
||||
double scrollAmount=MAX(fabs((double)wheelY*sampleZoom*60.0),1.0);
|
||||
if (wheelY>0) {
|
||||
samplePos+=scrollAmount;
|
||||
} else {
|
||||
samplePos-=scrollAmount;
|
||||
}
|
||||
if (samplePos<0) samplePos=0;
|
||||
int bounds=((int)sample->samples-round(rectSize.x*sampleZoom));
|
||||
if (bounds<0) bounds=0;
|
||||
if (samplePos>bounds) samplePos=bounds;
|
||||
updateSampleTex=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int posX=-1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue