@@ -30,30 +30,25 @@ function draw_window_macro_setvelocity() {
3030 windowalpha = 0
3131 windowclose = 0
3232 windowopen = 0
33- str = selection_code
34- val = 0
35- var arr_data = selection_to_array (str)
3633 window = 0
37- total_vals = array_length (arr_data)
38- val = 0
39- while (val < total_vals) {
40- val += 4
41- if (percentvel) arr_data[val] = arr_data[val] * setvel / 100
42- else arr_data[val] = setvel
43- if (arr_data[val] > 100 ) arr_data[val] = 100
44- val += 3
45- while arr_data[val] != - 1 {
46- val += 3
47- if (percentvel) arr_data[val ] = arr_data[val ] * setvel / 100
48- else arr_data[val] = setvel
49- if (arr_data[val] > 100 ) arr_data[val] = 100
50- val += 3
34+ str = selection_code
35+ if (!percentvel) {
36+ selection_change (m_vel, setvel, false )
37+ } else {
38+ str = selection_code
39+ if (selected = 0 ) return 0
40+ for (a = 0 ; a < selection_l; a += 1 ) {
41+ if (selection_colfirst[a] > - 1 ) {
42+ for (b = selection_colfirst[a]; b <= selection_collast[a]; b += 1 ) {
43+ if (selection_exists[a, b]) {
44+ selection_vel[a, b ] = selection_vel[a, b ] * setvel / 100
45+ }
46+ }
47+ }
5148 }
52- val ++
49+ selection_code_update ()
50+ history_set (h_selectchange, selection_x, selection_y, try_compress_selection (selection_code), selection_x, selection_y, try_compress_selection (str))
5351 }
54- var new_str = array_to_selection (arr_data, total_vals)
55- selection_load_ext (selection_x, selection_y, new_str)
56- history_set (h_selectchange, selection_x, selection_y, try_compress_selection (selection_code), selection_x, selection_y, try_compress_selection (str))
5752 if (!keyboard_check (vk_alt)) selection_place (false )
5853 }
5954 if (draw_button2 (x1 + 70 , y1 + 98 , 60 , condstr (language != 1 , " Cancel" , " 取消" )) && (windowopen = 1 || theme != 3 )) {windowclose = 1 }
0 commit comments