Skip to content

Commit

Permalink
the final macro changes. this is real 0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tildearrow committed Feb 9, 2022
1 parent ae44cab commit e115d9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/engine/macroInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@
if (has) { \
val=source[pos++]; \
if (sourceRel>=0 && pos>sourceRel && !released) { \
pos--; \
if (sourceLoop<sourceLen && sourceLoop>=0 && sourceLoop<sourceRel) { \
pos=sourceLoop; \
} else { \
pos--; \
} \
} \
if (pos>=sourceLen) { \
if (sourceLoop<sourceLen && sourceLoop>=0) { \
if (sourceLoop<sourceLen && sourceLoop>=0 && (sourceLoop>=sourceRel || sourceRel>=sourceLen)) { \
pos=sourceLoop; \
} else { \
has=false; \
Expand Down
8 changes: 4 additions & 4 deletions src/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1441,10 +1441,10 @@ String macroHoverLoop(int id, float val) {
asFloat[j]=macro[j+macroDragScroll]+macroDispMin; \
asInt[j]=macro[j+macroDragScroll]+macroDispMin+bitOff; \
} \
if (j+macroDragScroll>=macroLen) { \
if (j+macroDragScroll>=macroLen || (j+macroDragScroll>macroRel && macroLoop<macroRel)) { \
loopIndicator[j]=0; \
} else { \
loopIndicator[j]=(macroLoop!=-1 && (j+macroDragScroll)>=macroLoop)|((macroRel!=-1 && (j+macroDragScroll)==macroRel)<<1); \
loopIndicator[j]=((macroLoop!=-1 && (j+macroDragScroll)>=macroLoop))|((macroRel!=-1 && (j+macroDragScroll)==macroRel)<<1); \
} \
} \
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f)); \
Expand Down Expand Up @@ -1527,10 +1527,10 @@ String macroHoverLoop(int id, float val) {
asFloat[j]=macro[j+macroDragScroll]; \
asInt[j]=macro[j+macroDragScroll]; \
} \
if (j+macroDragScroll>=macroLen) { \
if (j+macroDragScroll>=macroLen || (j+macroDragScroll>macroRel && macroLoop<macroRel)) { \
loopIndicator[j]=0; \
} else { \
loopIndicator[j]=(macroLoop!=-1 && (j+macroDragScroll)>=macroLoop)|((macroRel!=-1 && (j+macroDragScroll)==macroRel)<<1); \
loopIndicator[j]=((macroLoop!=-1 && (j+macroDragScroll)>=macroLoop))|((macroRel!=-1 && (j+macroDragScroll)==macroRel)<<1); \
} \
} \
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding,ImVec2(0.0f,0.0f)); \
Expand Down

0 comments on commit e115d9e

Please sign in to comment.