this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

draw horizontal line in the Sfx Editor when ctrl/shift is pressed #1768

nesbox 02ac05d8 a52e2151

+29
+28
src/studio/editors/sfx.c
··· 53 53 tic_api_rect(tic, x+w, y, 1, h, tic_color_light_grey); 54 54 } 55 55 56 + static s32 hold(Sfx* sfx, s32 value) 57 + { 58 + tic_mem* tic = sfx->tic; 59 + 60 + if(tic_api_key(tic, tic_key_ctrl) || 61 + tic_api_key(tic, tic_key_shift)) 62 + { 63 + if(sfx->holdValue < 0) 64 + sfx->holdValue = value; 65 + 66 + return sfx->holdValue; 67 + } 68 + 69 + return value; 70 + } 71 + 72 + static inline void unhold(Sfx* sfx) 73 + { 74 + sfx->holdValue = -1; 75 + } 76 + 56 77 static void drawCanvasLeds(Sfx* sfx, s32 x, s32 y, s32 canvasTab) 57 78 { 58 79 tic_mem* tic = sfx->tic; ··· 109 130 110 131 if(checkMouseDown(sfx->studio, &rect, tic_mouse_left)) 111 132 { 133 + my = hold(sfx, my); 134 + 112 135 switch(canvasTab) 113 136 { 114 137 case SFX_WAVE_PANEL: effect->data[mx].wave = my; break; ··· 120 143 121 144 history_add(sfx->history); 122 145 } 146 + else unhold(sfx); 123 147 } 124 148 125 149 for(s32 i = 0; i < Cols; i++) ··· 794 818 795 819 if(checkMouseDown(sfx->studio, &rect, tic_mouse_left)) 796 820 { 821 + cy = hold(sfx, cy); 822 + 797 823 if(tic_tool_peek4(wave->data, cx) != cy) 798 824 { 799 825 tic_tool_poke4(wave->data, cx, cy); 800 826 history_add(sfx->waveHistory); 801 827 } 802 828 } 829 + else unhold(sfx); 803 830 } 804 831 805 832 for(s32 i = 0; i < WAVE_VALUES; i++) ··· 1088 1115 .index = 0, 1089 1116 .volwave = SFX_VOLUME_PANEL, 1090 1117 .hoverWave = -1, 1118 + .holdValue = -1, 1091 1119 .play = 1092 1120 { 1093 1121 .note = -1,
+1
src/studio/editors/sfx.h
··· 36 36 u8 index:SFX_COUNT_BITS; 37 37 s32 volwave; 38 38 s32 hoverWave; 39 + s32 holdValue; 39 40 40 41 struct 41 42 {