Browse Source

const color

Johann Woelper 4 years ago
parent
commit
e1d9413945
2 changed files with 7 additions and 33 deletions
  1. 5 5
      sampler.ini
  2. 2 28
      src/main.rs

+ 5 - 5
sampler.ini

@@ -9,7 +9,7 @@ Size=300,100
 Collapsed=0
 
 [Window][sources]
-Pos=789,65
+Pos=495,-20
 Size=361,711
 Collapsed=0
 
@@ -29,22 +29,22 @@ Size=328,168
 Collapsed=0
 
 [Window][sound]
-Pos=132,294
+Pos=6,272
 Size=354,269
 Collapsed=0
 
 [Window][tracks]
-Pos=675,471
+Pos=677,214
 Size=300,160
 Collapsed=0
 
 [Window][pattern]
-Pos=142,672
+Pos=76,420
 Size=684,294
 Collapsed=0
 
 [Window][patterns]
-Pos=700,112
+Pos=400,140
 Size=324,183
 Collapsed=0
 

+ 2 - 28
src/main.rs

@@ -64,34 +64,8 @@ fn main() {
     style.anti_aliased_lines = false;
     style.anti_aliased_fill = false;
 
-    // ui.push_style_color();
     
-    // style.colors[StyleColor::Text]                   = ImVec4(1.00, 1.00, 1.00, 1.00);
-    // // style.colors[ImGuiCol_WindowBg]               = ImVec4(0.03f, 0.03f, 0.03f, 1.00f);
-    // // style.colors[ImGuiCol_FrameBg]                = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_FrameBgHovered]         = ImVec4(0.11f, 0.08f, 0.44f, 1.00f);
-    // // style.colors[ImGuiCol_FrameBgActive]          = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_TitleBg]                = ImVec4(0.11f, 0.11f, 0.11f, 1.00f);
-    // // style.colors[ImGuiCol_TitleBgActive]          = ImVec4(0.14f, 0.05f, 0.96f, 1.00f);
-    // // style.colors[ImGuiCol_ScrollbarBg]            = ImVec4(0.03f, 0.03f, 0.03f, 1.00f);
-    // // style.colors[ImGuiCol_CheckMark]              = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_SliderGrab]             = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_SliderGrabActive]       = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_Button]                 = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_ButtonHovered]          = ImVec4(0.18f, 0.12f, 0.78f, 1.00f);
-    // // style.colors[ImGuiCol_ButtonActive]           = ImVec4(0.20f, 0.13f, 0.88f, 1.00f);
-    // // style.colors[ImGuiCol_Header]                 = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_SeparatorHovered]       = ImVec4(0.13f, 0.07f, 0.78f, 1.00f);
-    // // style.colors[ImGuiCol_SeparatorActive]        = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_ResizeGrip]             = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_ResizeGripHovered]      = ImVec4(0.19f, 0.12f, 0.85f, 1.00f);
-    // // style.colors[ImGuiCol_ResizeGripActive]       = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_Tab]                    = ImVec4(0.07f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_TabHovered]             = ImVec4(0.15f, 0.05f, 0.27f, 1.00f);
-    // // style.colors[ImGuiCol_TabActive]              = ImVec4(0.21f, 0.14f, 0.91f, 1.00f);
-    // // style.colors.
-    
-    let PURPLE = [0.07, 0.05, 0.27, 1.00];
+    const PURPLE: [f32; 4] = [0.07, 0.05, 0.27, 1.00];
     system.main_loop(move |_, ui| {
 
         let colors = ui.push_style_colors(&[
@@ -187,7 +161,7 @@ fn main() {
                     active_pattern.name = imstr_name.to_string();
                 };
                 
-                let button_size: f32 = 16.0;
+                let button_size: f32 = 20.0;
 
                 ui.drag_int(im_str!("repeat"), &mut active_pattern.repeat)
                     .max(32)