|
@@ -57,13 +57,17 @@ fn main() {
|
|
|
let mut active_sound: Option<Sound> = None;
|
|
|
|
|
|
let mut system = support_ogl::init(file!());
|
|
|
- let style = system.imgui.style_mut();
|
|
|
+ let display = system.imgui.io().display_size;
|
|
|
+ let pixel_count = display[0]*display[1];
|
|
|
+ dbg!(pixel_count);
|
|
|
+ let mut style = system.imgui.style_mut();
|
|
|
style.window_rounding = 1.5;
|
|
|
style.anti_aliased_lines = false;
|
|
|
style.anti_aliased_fill = false;
|
|
|
- // ui.push_style_color();
|
|
|
- let PURPLE = [0.07, 0.05, 0.27, 1.00];
|
|
|
+ style.scale_all_sizes(1.5);
|
|
|
|
|
|
+ // 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);
|
|
@@ -88,7 +92,8 @@ fn main() {
|
|
|
// // 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];
|
|
|
system.main_loop(move |_, ui| {
|
|
|
|
|
|
let colors = ui.push_style_colors(&[
|
|
@@ -96,8 +101,11 @@ fn main() {
|
|
|
(StyleColor::Button, PURPLE),
|
|
|
(StyleColor::TitleBgActive, PURPLE),
|
|
|
(StyleColor::ResizeGrip, PURPLE),
|
|
|
+ (StyleColor::CheckMark, PURPLE),
|
|
|
+ (StyleColor::Tab, PURPLE),
|
|
|
]);
|
|
|
|
|
|
+
|
|
|
Window::new(im_str!("sources"))
|
|
|
// .resizable(false)
|
|
|
.position([400.0, 140.0], Condition::Appearing)
|
|
@@ -282,6 +290,25 @@ fn main() {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ Window::new(im_str!("settings"))
|
|
|
+ .size([300.0, 100.0], Condition::FirstUseEver)
|
|
|
+ .build(ui, || {
|
|
|
+
|
|
|
+ let mut scale = 1.0;
|
|
|
+ if ui.drag_float(im_str!("speed"), &mut scale)
|
|
|
+ .min(0.0)
|
|
|
+ .max(3.0)
|
|
|
+ .speed(0.01)
|
|
|
+ .build() {
|
|
|
+ // let s = system.imgui.style_mut();
|
|
|
+
|
|
|
+ // s.scale_all_sizes(scale);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
colors.pop(&ui);
|
|
|
|
|
|
});
|