mirror of
https://github.com/tildearrow/furnace.git
synced 2024-12-04 10:17:26 +00:00
parent
617bdc0f3b
commit
3164f311f5
3 changed files with 8 additions and 2 deletions
|
@ -8709,6 +8709,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
fadeMin(0),
|
fadeMin(0),
|
||||||
fadeMax(255),
|
fadeMax(255),
|
||||||
collapseAmount(2),
|
collapseAmount(2),
|
||||||
|
playheadY(0.0f),
|
||||||
scaleMax(100.0f),
|
scaleMax(100.0f),
|
||||||
fadeMode(false),
|
fadeMode(false),
|
||||||
randomMode(false),
|
randomMode(false),
|
||||||
|
|
|
@ -2528,6 +2528,7 @@ class FurnaceGUI {
|
||||||
SelectionPoint sel1, sel2;
|
SelectionPoint sel1, sel2;
|
||||||
int dummyRows;
|
int dummyRows;
|
||||||
int transposeAmount, randomizeMin, randomizeMax, fadeMin, fadeMax, collapseAmount;
|
int transposeAmount, randomizeMin, randomizeMax, fadeMin, fadeMax, collapseAmount;
|
||||||
|
float playheadY;
|
||||||
float scaleMax;
|
float scaleMax;
|
||||||
bool fadeMode, randomMode, haveHitBounds;
|
bool fadeMode, randomMode, haveHitBounds;
|
||||||
signed char pendingStepUpdate;
|
signed char pendingStepUpdate;
|
||||||
|
|
|
@ -75,6 +75,10 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
||||||
ImGui::TableNextRow(0,lineHeight);
|
ImGui::TableNextRow(0,lineHeight);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
float cursorPosY=ImGui::GetCursorPos().y-ImGui::GetScrollY();
|
float cursorPosY=ImGui::GetCursorPos().y-ImGui::GetScrollY();
|
||||||
|
// store playhead position on the screen
|
||||||
|
if (ord==playOrder && oldRow==i) {
|
||||||
|
playheadY=ImGui::GetCursorScreenPos().y;
|
||||||
|
}
|
||||||
// check if the row is visible
|
// check if the row is visible
|
||||||
if (cursorPosY<-lineHeight || cursorPosY>ImGui::GetWindowSize().y) {
|
if (cursorPosY<-lineHeight || cursorPosY>ImGui::GetWindowSize().y) {
|
||||||
return;
|
return;
|
||||||
|
@ -1483,7 +1487,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
if (fancyPattern) { // visualizer
|
if (fancyPattern) { // visualizer
|
||||||
e->getCommandStream(cmdStream);
|
e->getCommandStream(cmdStream);
|
||||||
ImDrawList* dl=ImGui::GetWindowDrawList();
|
ImDrawList* dl=ImGui::GetWindowDrawList();
|
||||||
ImVec2 off=ImVec2(0.0f,ImGui::GetWindowPos().y);
|
ImVec2 off=ImVec2(0.0f,0.0f);
|
||||||
|
|
||||||
ImVec2 winMin=ImGui::GetWindowPos();
|
ImVec2 winMin=ImGui::GetWindowPos();
|
||||||
ImVec2 winMax=ImVec2(
|
ImVec2 winMax=ImVec2(
|
||||||
|
@ -1616,7 +1620,7 @@ void FurnaceGUI::drawPattern() {
|
||||||
for (int j=0; j<num; j++) {
|
for (int j=0; j<num; j++) {
|
||||||
ImVec2 partPos=ImVec2(
|
ImVec2 partPos=ImVec2(
|
||||||
off.x+patChanX[i.chan]+fmod(rand(),width),
|
off.x+patChanX[i.chan]+fmod(rand(),width),
|
||||||
off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,patFont->FontSize)
|
off.y+(playheadY)+randRange(0,patFont->FontSize)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (partPos.x<winMin.x || partPos.y<winMin.y || partPos.x>winMax.x || partPos.y>winMax.y) continue;
|
if (partPos.x<winMin.x || partPos.y<winMin.y || partPos.x>winMax.x || partPos.y>winMax.y) continue;
|
||||||
|
|
Loading…
Reference in a new issue