瀏覽代碼

button size

Johann Woelper 4 年之前
父節點
當前提交
d747869160
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main.rs

+ 4 - 1
src/main.rs

@@ -160,7 +160,7 @@ fn main() {
                     active_pattern.name = imstr_name.to_string();
                 };
                 
-                let button_size: f32 = 20.0;
+                let button_size: f32 = 0.0;
 
                 ui.drag_int(im_str!("repeat"), &mut active_pattern.repeat)
                     .max(32)
@@ -186,12 +186,15 @@ fn main() {
                         
                         ui.same_line(0.0);
                         if ui.button(&im_str!("{}##{}{}", label, y, x), [button_size, button_size]) {
+
                             pattern_col = x;
                             pattern_row = y;
                             match &active_sound {
                                 Some(snd) => {active_pattern.sounds.insert((x,y),  snd.clone());},
                                 None => {active_pattern.sounds.remove(&(x,y));}
                             }
+                        
+
                         }