Exemplo n.º 1
0
        private static void Main(string[] args)
        {
            LogInformation("IFSBrowser v{0}", Assembly.GetExecutingAssembly().GetName().Version?.ToString(3));
            _window       = new Window();
            _window.Draw += Draw;

            _style = GetStyle();
            _style.WindowRounding = 0f;
            _style.Colors[(int)ImGuiCol.FrameBg] = _style.Colors[(int)ImGuiCol.WindowBg];
            _style.WindowTitleAlign = new Vector2(0.5f, 0.5f);
            _style.FrameBorderSize  = 1f;

            _ifsFiles = new List <GenericFolder>();

            if (args.Length >= 1)
            {
                foreach (var arg in args)
                {
                    try {
                        OpenIFS(arg);
                    } catch (Exception ex) {
                        LogWarning("Exception while opening file from args: {0}", ex);
                    }
                }
            }

            _window.Start();
        }
Exemplo n.º 2
0
        public ImGUI()
        {
            IntPtr context = ImGui.CreateContext();

            ImGui.SetCurrentContext(context);
            //ImGui.GetIO().Fonts.AddFontDefault();
            File file  = FileSystem.Instance.GetFile("fonts/arial.ttf");
            var  bytes = file.ReadAllBytes();

            ImGui.GetIO().Fonts.AddFontFromMemoryTTF(Utilities.AsPointer(ref bytes[0]), 32, 15);

            CreateGraphicsResources();
            RecreateFontDeviceTexture();

            resourceSet    = new DescriptorSet(resourceLayout, uniformBufferVS);
            resourceSetTex = new DescriptorSet(resourceLayoutTex, texture);

            ImGuiStylePtr style = ImGui.GetStyle();

            style.WindowRounding = 2;

            SetOpenTKKeyMappings();

            SetPerFrameImGuiData(1f / 60f);

            ImGui.NewFrame();

            this.Subscribe <BeginFrame>((e) => Update());
            this.Subscribe <DrawEvent>(RenderImDrawData);
        }
Exemplo n.º 3
0
        public static void InitializeStyle()
        {
            ImGuiStylePtr style = ImGui.GetStyle();

            style.WindowPadding = new Vector2(6.0f, 6.0f);
            style.IndentSpacing = 16.0f;
            style.ItemSpacing   = new Vector2(6.0f, 4.0f);
            style.GrabMinSize   = 14.0f;

            style.WindowRounding    = 0.0f;
            style.FrameRounding     = 0.0f;
            style.ScrollbarRounding = 0.0f;
            style.ScrollbarSize     = 16.0f;
            style.GrabRounding      = 2.0f;

            style.WindowBorderSize = 0.0f;
            style.ChildBorderSize  = 0.0f;
            style.FrameBorderSize  = 0.0f;

            style.Colors[(int)ImGuiCol.WindowBg]             = new Vector4(0.050f, 0.050f, 0.050f, 1.000f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Vector4(0.254f, 0.254f, 0.254f, 0.540f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Vector4(0.031f, 0.031f, 0.031f, 1.000f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Vector4(0.031f, 0.031f, 0.031f, 1.000f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Vector4(0.200f, 0.430f, 0.710f, 1.000f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Vector4(0.260f, 0.590f, 0.980f, 1.000f);
        }
Exemplo n.º 4
0
        static ImGui()
        {
            // init arrays
            FileSelectChangeFolder(_fileSelectPath, "");

            _style = GetStyle();

            // Font Icon Loading
            unsafe {
                var rangeHandle  = GCHandle.Alloc(IconCharRange, GCHandleType.Pinned);
                var nativeConfig = ImGuiNative.ImFontConfig_ImFontConfig();
                nativeConfig->MergeMode        = 1;
                nativeConfig->GlyphMinAdvanceX = 13.0f;

                try {
                    GetIO().Fonts.AddFontFromFileTTF("fa-regular-400.ttf", 16.0f, nativeConfig,
                                                     rangeHandle.AddrOfPinnedObject());
                } finally {
                    if (rangeHandle.IsAllocated)
                    {
                        rangeHandle.Free();
                    }
                }

                ImGuiNative.ImFontConfig_destroy(nativeConfig);
            }

            Window.ImGuiRenderer.RecreateFontDeviceTexture();
        }
Exemplo n.º 5
0
        private void SetStyle2(ImGuiStylePtr style)
        {
            var color_for_text = new Num.Vector3(236f / 255f, 240f / 255f, 241f / 255f);
            var color_for_head = new Num.Vector3(41f / 255f, 128f / 255f, 185f / 255f);
            var color_for_area = new Num.Vector3(57f / 255f, 79f / 255f, 105f / 255f);
            var color_for_body = new Num.Vector3(44f / 255f, 62f / 255f, 80f / 255f);
            var color_for_pops = new Num.Vector3(33f / 255f, 46f / 255f, 60f / 255f);

            EasyTheming(style, color_for_text, color_for_head, color_for_area, color_for_body);
        }
Exemplo n.º 6
0
        public override void OnInspectorGUI()
        {
            StyleAsset styleAsset = target as StyleAsset;

            bool noContext = ImGui.GetCurrentContext() == System.IntPtr.Zero;

            if (noContext)
            {
                EditorGUILayout.HelpBox("Can't save or apply Style.\n"
                                        + "No active ImGui context.", MessageType.Warning, true);
            }

            // apply and save buttons only when a context is active
            if (!noContext)
            {
                ImGuiStylePtr style = ImGui.GetStyle();

                GUILayout.BeginHorizontal();
                if (GUILayout.Button("Apply"))
                {
                    styleAsset.ApplyTo(style);
                }

                if (GUILayout.Button("Save") &&
                    EditorUtility.DisplayDialog("Save Style", "Do you want to save the current style to this asset?", "Ok", "Cancel"))
                {
                    styleAsset.SetFrom(style);
                    EditorUtility.SetDirty(target);
                }
                GUILayout.EndHorizontal();
            }

            // default
            DrawDefaultInspector();

            // colors
            bool changed = false;

            _showColors = EditorGUILayout.Foldout(_showColors, "Colors", true);
            if (_showColors)
            {
                for (int i = 0; i < (int)ImGuiCol.COUNT; ++i)
                {
                    Color indexColor = styleAsset.Colors[i];
                    Color newColor   = EditorGUILayout.ColorField(ImGui.GetStyleColorName((ImGuiCol)i), indexColor);
                    changed |= (newColor != indexColor);
                    styleAsset.Colors[i] = newColor;
                }
            }

            if (changed)
            {
                EditorUtility.SetDirty(target);
            }
        }
Exemplo n.º 7
0
        public static bool BufferingBar(string label, float value, Vector2 sizeArg, Vector4 bgCol, Vector4 fgCol)
        {
            value = Math.Clamp(value, 0, 1);

            //ImGuiWindow* window = GetCurrentWindow();
            //if (window->SkipItems)
            //    return false;

            ImGuiStylePtr style = ImGui.GetStyle();
            uint          id    = ImGui.GetID(label);

            Vector2 pos  = ImGui.GetWindowPos() + ImGui.GetCursorPos() - new Vector2(ImGui.GetScrollX(), ImGui.GetScrollY());
            Vector2 size = sizeArg;

            size.X -= style.FramePadding.X * 2;

            //const ImRect bb(pos, ImVec2(pos.x +size.x, pos.y + size.y));
            //ItemSize(bb, style.FramePadding.y);
            //if (!ItemAdd(bb, id))
            //    return false;

            // Render
            float circleStart = size.X * (0.7f + 0.3f * value);
            float circleEnd   = size.X;
            float circleWidth = circleEnd - circleStart;

            uint bgColorInt = ImGui.ColorConvertFloat4ToU32(bgCol);
            uint fgColorInt = ImGui.ColorConvertFloat4ToU32(fgCol);

            ImGui.GetWindowDrawList().AddRectFilled(pos, new Vector2(pos.X + circleStart, pos.Y + size.Y), bgColorInt);
            ImGui.GetWindowDrawList().AddRectFilled(pos, new Vector2(pos.X + circleStart * value, pos.Y + size.Y), fgColorInt);


            float t     = (float)ImGui.GetTime();
            float r     = size.Y / 2;
            float speed = 1.5f;

            float a = speed * 0;
            float b = speed * 0.333f;
            float c = speed * 0.666f;

            float o1 = (circleWidth + r) * (t + a - speed * (int)((t + a) / speed)) / speed;
            float o2 = (circleWidth + r) * (t + b - speed * (int)((t + b) / speed)) / speed;
            float o3 = (circleWidth + r) * (t + c - speed * (int)((t + c) / speed)) / speed;

            ImGui.GetWindowDrawList().AddCircleFilled(new Vector2(pos.X + circleEnd - o1, pos.Y + r), r, bgColorInt);
            ImGui.GetWindowDrawList().AddCircleFilled(new Vector2(pos.X + circleEnd - o2, pos.Y + r), r, bgColorInt);
            ImGui.GetWindowDrawList().AddCircleFilled(new Vector2(pos.X + circleEnd - o3, pos.Y + r), r, bgColorInt);

            ImGui.SetCursorPos(new Vector2(style.WindowPadding.X, ImGui.GetCursorPos().Y + size.Y + style.FramePadding.Y));

            return(true);
        }
        public static void DarkHighContrastTheme()
        {
            ImGuiStylePtr style = ImGui.GetStyle();

            style.WindowPadding     = new Num.Vector2(15, 15);
            style.WindowRounding    = 5.0f;
            style.FramePadding      = new Num.Vector2(5, 5);
            style.FrameRounding     = 4.0f;
            style.ItemSpacing       = new Num.Vector2(12, 8);
            style.ItemInnerSpacing  = new Num.Vector2(8, 6);
            style.ScrollbarSize     = 15.0f;
            style.ScrollbarRounding = 9.0f;
            style.GrabMinSize       = 5.0f;
            style.GrabRounding      = 3.0f;

            style.Colors[(int)ImGuiCol.Text]                 = new Num.Vector4(0.80f, 0.80f, 0.83f, 1.00f);
            style.Colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.Border]               = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.88f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(0.92f, 0.91f, 0.88f, 0.00f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(1.00f, 0.98f, 0.95f, 0.75f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.SliderGrab]           = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.SliderGrabActive]     = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.Button]               = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.Header]               = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.ResizeGripHovered]    = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGripActive]     = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLines]            = new Num.Vector4(0.40f, 0.39f, 0.38f, 0.63f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]     = new Num.Vector4(0.25f, 1.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]        = new Num.Vector4(0.40f, 0.39f, 0.38f, 0.63f);
            style.Colors[(int)ImGuiCol.PlotHistogramHovered] = new Num.Vector4(0.25f, 1.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TextSelectedBg]       = new Num.Vector4(0.25f, 1.00f, 0.00f, 0.43f);
            style.Colors[(int)ImGuiCol.ModalWindowDimBg]     = new Num.Vector4(1.00f, 0.98f, 0.95f, 0.73f);
        }
Exemplo n.º 9
0
        private void SetStyleDarker(ImGuiStylePtr style)
        {
            style.WindowPadding     = new Num.Vector2(12, 12);
            style.WindowRounding    = 5.0f;
            style.FramePadding      = new Num.Vector2(4, 4);
            style.FrameRounding     = 4.0f;
            style.ItemSpacing       = new Num.Vector2(8, 8);
            style.ItemInnerSpacing  = new Num.Vector2(4, 4);
            style.IndentSpacing     = 16.0f;
            style.ScrollbarSize     = 16.0f;
            style.ScrollbarRounding = 8.0f;
            style.GrabMinSize       = 4.0f;
            style.GrabRounding      = 3.0f;

            style.Colors[(int)ImGuiCol.Text]                 = new Num.Vector4(0.80f, 0.80f, 0.83f, 1.00f);
            style.Colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.Border]               = new Num.Vector4(0.20f, 0.20f, 0.23f, 0.88f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(0.92f, 0.91f, 0.88f, 0.00f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(1.00f, 0.98f, 0.95f, 0.75f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.SliderGrab]           = new Num.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.SliderGrabActive]     = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.Button]               = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.Header]               = new Num.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.ResizeGripHovered]    = new Num.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGripActive]     = new Num.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLines]            = new Num.Vector4(0.40f, 0.39f, 0.38f, 0.63f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]     = new Num.Vector4(0.25f, 1.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]        = new Num.Vector4(0.40f, 0.39f, 0.38f, 0.63f);
            style.Colors[(int)ImGuiCol.PlotHistogramHovered] = new Num.Vector4(0.25f, 1.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TextSelectedBg]       = new Num.Vector4(0.25f, 1.00f, 0.00f, 0.43f);
        }
Exemplo n.º 10
0
        private void SetBlackGrayRedStyle(ImGuiStylePtr style)
        {
            var chk = new Num.Vector4(0.6f, 0.0f, 0.0f, 1.00f);
            var ch1 = new Num.Vector4(0.4f, 0.0f, 0.0f, 1.00f);
            var ch2 = new Num.Vector4(0.5f, 0.0f, 0.0f, 1.00f);
            var but = new Num.Vector4(0.40f, 0.50f, 0.75f, 1.00f);

            style.Colors[(int)ImGuiCol.Text]                 = new Num.Vector4(0.90f, 0.90f, 0.90f, 0.90f);
            style.Colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(0.60f, 0.60f, 0.60f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(0.09f, 0.09f, 0.15f, 1.00f);
            style.Colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.Border]               = new Num.Vector4(0.70f, 0.70f, 0.70f, 0.65f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(0.00f, 0.00f, 0.01f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(0.70f, 0.70f, 0.70f, 0.20f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(0.90f, 0.00f, 0.00f, 0.75f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(but.X, but.Y, but.Z, 0.35f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(0.30f, 0.30f, 0.37f, 0.70f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(0.01f, 0.01f, 0.02f, 0.80f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(0.20f, 0.25f, 0.30f, 0.60f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(0.55f, 0.53f, 0.55f, 0.51f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = ch1;
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = ch2;
            style.Colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(chk.X, chk.Y, chk.Z, 1.00f);
            style.Colors[(int)ImGuiCol.SliderGrab]           = ch1;
            style.Colors[(int)ImGuiCol.SliderGrabActive]     = ch2;
            style.Colors[(int)ImGuiCol.Button]               = new Num.Vector4(0.50f, 0.50f, 0.50f, 0.50f);
            style.Colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(but.X, but.Y, but.Z, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(0.60f, 0.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.Header]               = new Num.Vector4(but.X, but.Y, but.Z, 0.30f);
            style.Colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(but.X, but.Y, but.Z, 0.75f);
            style.Colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(but.X, but.Y, but.Z, 0.50f);
            style.Colors[(int)ImGuiCol.Separator]            = new Num.Vector4(0.50f, 0.50f, 0.50f, 1.00f);
            style.Colors[(int)ImGuiCol.SeparatorHovered]     = new Num.Vector4(0.70f, 0.60f, 0.60f, 1.00f);
            style.Colors[(int)ImGuiCol.SeparatorActive]      = new Num.Vector4(0.90f, 0.70f, 0.70f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(0.50f, 0.50f, 0.50f, 0.50f);
            style.Colors[(int)ImGuiCol.ResizeGripHovered]    = ch1;
            style.Colors[(int)ImGuiCol.ResizeGripActive]     = ch2;
            style.Colors[(int)ImGuiCol.PlotLines]            = new Num.Vector4(1.00f, 1.00f, 1.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]     = new Num.Vector4(0.90f, 0.70f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]        = ch1;
            style.Colors[(int)ImGuiCol.PlotHistogramHovered] = ch2;
            style.Colors[(int)ImGuiCol.TextSelectedBg]       = new Num.Vector4(0.00f, 0.00f, 1.00f, 0.35f);
            style.Colors[(int)ImGuiCol.ModalWindowDimBg]     = new Num.Vector4(0.20f, 0.20f, 0.20f, 0.35f);
        }
Exemplo n.º 11
0
        private unsafe void SetupPlatformIo(Sdl2Window sdlWindow)
        {
#if DEBUG
            using Profiler fullProfiler = new Profiler(GetType());
#endif
            ImGuiStylePtr style = ImGui.GetStyle();
            style.WindowRounding = 0.0f;
            style.Colors[(int)ImGuiCol.WindowBg].W = 1.0f;

            createWindow       = PlatformCreateWindow;
            destroyWindow      = PlatformDestroyWindow;
            showWindow         = PlatformShowWindow;
            getWindowPosition  = PlatformGetWindowPosition;
            setWindowPosition  = PlatformSetWindowPosition;
            getWindowSize      = PlatformGetWindowSize;
            setWindowSize      = PlatformSetWindowSize;
            setWindowTitle     = PlatformSetWindowTitle;
            getWindowFocus     = PlatformGetWindowFocus;
            setWindowFocus     = PlatformSetWindowFocus;
            getWindowMinimized = PlatformGetWindowMinimized;
            setWindowAlpha     = PlatformSetWindowAlpha;

            createVulkanSurface = PlatformCreateVkSurface;

            ImGuiPlatformIOPtr plIo = ImGui.GetPlatformIO();
            plIo.NativePtr->Platform_CreateWindow       = Marshal.GetFunctionPointerForDelegate(createWindow);
            plIo.NativePtr->Platform_DestroyWindow      = Marshal.GetFunctionPointerForDelegate(destroyWindow);
            plIo.NativePtr->Platform_ShowWindow         = Marshal.GetFunctionPointerForDelegate(showWindow);
            plIo.NativePtr->Platform_GetWindowPos       = Marshal.GetFunctionPointerForDelegate(getWindowPosition);
            plIo.NativePtr->Platform_SetWindowPos       = Marshal.GetFunctionPointerForDelegate(setWindowPosition);
            plIo.NativePtr->Platform_GetWindowSize      = Marshal.GetFunctionPointerForDelegate(getWindowSize);
            plIo.NativePtr->Platform_SetWindowSize      = Marshal.GetFunctionPointerForDelegate(setWindowSize);
            plIo.NativePtr->Platform_SetWindowTitle     = Marshal.GetFunctionPointerForDelegate(setWindowTitle);
            plIo.NativePtr->Platform_GetWindowMinimized = Marshal.GetFunctionPointerForDelegate(getWindowMinimized);
            plIo.NativePtr->Platform_GetWindowFocus     = Marshal.GetFunctionPointerForDelegate(getWindowFocus);
            plIo.NativePtr->Platform_SetWindowFocus     = Marshal.GetFunctionPointerForDelegate(setWindowFocus);
            plIo.NativePtr->Platform_SetWindowAlpha     = Marshal.GetFunctionPointerForDelegate(setWindowAlpha);
            plIo.NativePtr->Platform_CreateVkSurface    = Marshal.GetFunctionPointerForDelegate(createVulkanSurface);

            UpdateMonitors();

            ImGuiViewportPtr mainViewport = plIo.MainViewport;
            mainViewport.PlatformHandle   = sdlWindow.Handle;
            mainViewport.PlatformUserData = (IntPtr)mainWindow.GcHandle;
        }
Exemplo n.º 12
0
        public static void HighContrast()
        {
            ImGuiStylePtr style = ImGui.GetStyle();

            style.WindowRounding    = 5.3f;
            style.FrameRounding     = 2.3f;
            style.ScrollbarRounding = 0;

            style.Colors[(int)ImGuiCol.Text]                 = new Num.Vector4(0.90f, 0.90f, 0.90f, 0.90f);
            style.Colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(0.60f, 0.60f, 0.60f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(0.09f, 0.09f, 0.15f, 1.00f);
            style.Colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(0.05f, 0.05f, 0.10f, 0.85f);
            style.Colors[(int)ImGuiCol.Border]               = new Num.Vector4(0.70f, 0.70f, 0.70f, 0.65f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(0.00f, 0.00f, 0.01f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(0.90f, 0.80f, 0.80f, 0.40f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(0.90f, 0.65f, 0.65f, 0.45f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.83f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(0.40f, 0.40f, 0.80f, 0.20f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.87f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(0.01f, 0.01f, 0.02f, 0.80f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(0.20f, 0.25f, 0.30f, 0.60f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(0.55f, 0.53f, 0.55f, 0.51f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Num.Vector4(0.56f, 0.56f, 0.56f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Num.Vector4(0.56f, 0.56f, 0.56f, 0.91f);
            style.Colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(0.90f, 0.90f, 0.90f, 0.83f);
            style.Colors[(int)ImGuiCol.SliderGrab]           = new Num.Vector4(0.70f, 0.70f, 0.70f, 0.62f);
            style.Colors[(int)ImGuiCol.SliderGrabActive]     = new Num.Vector4(0.30f, 0.30f, 0.30f, 0.84f);
            style.Colors[(int)ImGuiCol.Button]               = new Num.Vector4(0.48f, 0.72f, 0.89f, 0.49f);
            style.Colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(0.50f, 0.69f, 0.99f, 0.68f);
            style.Colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(0.80f, 0.50f, 0.50f, 1.00f);
            style.Colors[(int)ImGuiCol.Header]               = new Num.Vector4(0.30f, 0.69f, 1.00f, 0.53f);
            style.Colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(0.44f, 0.61f, 0.86f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(0.38f, 0.62f, 0.83f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.85f);
            style.Colors[(int)ImGuiCol.ResizeGripHovered]    = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.60f);
            style.Colors[(int)ImGuiCol.ResizeGripActive]     = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.90f);
            style.Colors[(int)ImGuiCol.PlotLines]            = new Num.Vector4(1.00f, 1.00f, 1.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]     = new Num.Vector4(0.90f, 0.70f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]        = new Num.Vector4(0.90f, 0.70f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogramHovered] = new Num.Vector4(1.00f, 0.60f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TextSelectedBg]       = new Num.Vector4(0.00f, 0.00f, 1.00f, 0.35f);
            style.Colors[(int)ImGuiCol.ModalWindowDimBg]     = new Num.Vector4(0.20f, 0.20f, 0.20f, 0.35f);
        }
Exemplo n.º 13
0
        private void InitializeStyle()
        {
            ImGuiStylePtr style = ImGui.GetStyle();

            float rounding = 3.5f;

            style.WindowRounding    = rounding;
            style.ChildRounding     = rounding;
            style.FrameRounding     = rounding;
            style.GrabRounding      = rounding;
            style.PopupRounding     = rounding;
            style.ScrollbarRounding = rounding;
            style.TabRounding       = rounding;

            var colors = style.Colors;

            colors[(int)ImGuiCol.WindowBg] = new Vector4(0f, 0f, 0f, 0.8f);
        }
Exemplo n.º 14
0
 public unsafe void ApplyTo(ImGuiStylePtr s)
 {
     s.Alpha                      = Alpha;
     s.WindowPadding              = Helper.V2f(WindowPadding);
     s.WindowRounding             = WindowRounding;
     s.WindowBorderSize           = WindowBorderSize;
     s.WindowMinSize              = Helper.V2f(WindowMinSize);
     s.WindowTitleAlign           = Helper.V2f(WindowTitleAlign);
     s.WindowMenuButtonPosition   = WindowMenuButtonPosition;
     s.ChildRounding              = ChildRounding;
     s.ChildBorderSize            = ChildBorderSize;
     s.PopupRounding              = PopupRounding;
     s.PopupBorderSize            = PopupBorderSize;
     s.FramePadding               = Helper.V2f(FramePadding);
     s.FrameRounding              = FrameRounding;
     s.FrameBorderSize            = FrameBorderSize;
     s.ItemSpacing                = Helper.V2f(ItemSpacing);
     s.ItemInnerSpacing           = Helper.V2f(ItemInnerSpacing);
     s.TouchExtraPadding          = Helper.V2f(TouchExtraPadding);
     s.IndentSpacing              = IndentSpacing;
     s.ColumnsMinSpacing          = ColumnsMinSpacing;
     s.ScrollbarSize              = ScrollbarSize;
     s.ScrollbarRounding          = ScrollbarRounding;
     s.GrabMinSize                = GrabMinSize;
     s.GrabRounding               = GrabRounding;
     s.TabRounding                = TabRounding;
     s.TabBorderSize              = TabBorderSize;
     s.ColorButtonPosition        = ColorButtonPosition;
     s.ButtonTextAlign            = Helper.V2f(ButtonTextAlign);
     s.SelectableTextAlign        = Helper.V2f(SelectableTextAlign);
     s.DisplayWindowPadding       = Helper.V2f(DisplayWindowPadding);
     s.DisplaySafeAreaPadding     = Helper.V2f(DisplaySafeAreaPadding);
     s.MouseCursorScale           = MouseCursorScale;
     s.AntiAliasedLines           = AntiAliasedLines;
     s.AntiAliasedFill            = AntiAliasedFill;
     s.CurveTessellationTol       = CurveTessellationTol;
     s.CircleTessellationMaxError = CircleTessellationMaxError;
     for (int i = 0; i < Colors.Length; ++i)
     {
         s.Colors[i] = Helper.Color(Colors[i]);
     }
 }
Exemplo n.º 15
0
 public void EasyTheming(ImGuiStylePtr style, Num.Vector3 color_for_text, Num.Vector3 color_for_head, Num.Vector3 color_for_area, Num.Vector3 color_for_body)
 {
     style.Colors[(int)ImGuiCol.Text]                 = new Num.Vector4(color_for_text.X, color_for_text.Y, color_for_text.Z, 1.00f);
     style.Colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(color_for_text.X, color_for_text.Y, color_for_text.Z, 0.58f);
     style.Colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(color_for_body.X, color_for_body.Y, color_for_body.Z, 1.00f);
     style.Colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 0.58f);
     style.Colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 1.00f);
     style.Colors[(int)ImGuiCol.Border]               = new Num.Vector4(color_for_body.X, color_for_body.Y, color_for_body.Z, 0.00f);
     style.Colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(color_for_body.X, color_for_body.Y, color_for_body.Z, 0.00f);
     style.Colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 1.00f);
     style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.78f);
     style.Colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 1.00f);
     style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 0.75f);
     style.Colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 1.00f);
     style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 1.00f);
     style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.50f);
     style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.78f);
     style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.SliderGrab]           = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.50f);
     style.Colors[(int)ImGuiCol.SliderGrabActive]     = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.Button]               = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.50f);
     style.Colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.86f);
     style.Colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.Header]               = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.76f);
     style.Colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.86f);
     style.Colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.Separator]            = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.32f);
     style.Colors[(int)ImGuiCol.SeparatorHovered]     = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.78f);
     style.Colors[(int)ImGuiCol.SeparatorActive]      = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.15f);
     style.Colors[(int)ImGuiCol.ResizeGripHovered]    = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.78f);
     style.Colors[(int)ImGuiCol.ResizeGripActive]     = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.PlotLines]            = new Num.Vector4(color_for_text.X, color_for_text.Y, color_for_text.Z, 0.63f);
     style.Colors[(int)ImGuiCol.PlotLinesHovered]     = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 1.00f);
     style.Colors[(int)ImGuiCol.PlotHistogram]        = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.50f);
     style.Colors[(int)ImGuiCol.PlotHistogramHovered] = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.75f);
     style.Colors[(int)ImGuiCol.TextSelectedBg]       = new Num.Vector4(color_for_head.X, color_for_head.Y, color_for_head.Z, 0.43f);
     style.Colors[(int)ImGuiCol.ModalWindowDimBg]     = new Num.Vector4(color_for_area.X, color_for_area.Y, color_for_area.Z, 0.73f);
 }
Exemplo n.º 16
0
 public unsafe void SetFrom(ImGuiStylePtr s)
 {
     Alpha                      = s.Alpha;
     WindowPadding              = Helper.V2f(s.WindowPadding);
     WindowRounding             = s.WindowRounding;
     WindowBorderSize           = s.WindowBorderSize;
     WindowMinSize              = Helper.V2f(s.WindowMinSize);
     WindowTitleAlign           = Helper.V2f(s.WindowTitleAlign);
     WindowMenuButtonPosition   = s.WindowMenuButtonPosition;
     ChildRounding              = s.ChildRounding;
     ChildBorderSize            = s.ChildBorderSize;
     PopupRounding              = s.PopupRounding;
     PopupBorderSize            = s.PopupBorderSize;
     FramePadding               = Helper.V2f(s.FramePadding);
     FrameRounding              = s.FrameRounding;
     FrameBorderSize            = s.FrameBorderSize;
     ItemSpacing                = Helper.V2f(s.ItemSpacing);
     ItemInnerSpacing           = Helper.V2f(s.ItemInnerSpacing);
     TouchExtraPadding          = Helper.V2f(s.TouchExtraPadding);
     IndentSpacing              = s.IndentSpacing;
     ColumnsMinSpacing          = s.ColumnsMinSpacing;
     ScrollbarSize              = s.ScrollbarSize;
     ScrollbarRounding          = s.ScrollbarRounding;
     GrabMinSize                = s.GrabMinSize;
     GrabRounding               = s.GrabRounding;
     TabRounding                = s.TabRounding;
     TabBorderSize              = s.TabBorderSize;
     ColorButtonPosition        = s.ColorButtonPosition;
     ButtonTextAlign            = Helper.V2f(s.ButtonTextAlign);
     SelectableTextAlign        = Helper.V2f(s.SelectableTextAlign);
     DisplayWindowPadding       = Helper.V2f(s.DisplayWindowPadding);
     DisplaySafeAreaPadding     = Helper.V2f(s.DisplaySafeAreaPadding);
     MouseCursorScale           = s.MouseCursorScale;
     AntiAliasedLines           = s.AntiAliasedLines;
     AntiAliasedFill            = s.AntiAliasedFill;
     CurveTessellationTol       = s.CurveTessellationTol;
     CircleTessellationMaxError = s.CircleTessellationMaxError;
     for (int i = 0; i < Colors.Length; ++i)
     {
         Colors[i] = Helper.Color(s.Colors[i]);
     }
 }
Exemplo n.º 17
0
        public static void PhotoshopDark()
        {
            ImGuiStylePtr style = ImGui.GetStyle();
            RangeAccessor <Num.Vector4> colors = style.Colors;

            colors[(int)ImGuiCol.Text]                 = new Num.Vector4(1.000f, 1.000f, 1.000f, 1.000f);
            colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(0.500f, 0.500f, 0.500f, 1.000f);
            colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(0.180f, 0.180f, 0.180f, 1.000f);
            colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(0.280f, 0.280f, 0.280f, 0.000f);
            colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(0.313f, 0.313f, 0.313f, 1.000f);
            colors[(int)ImGuiCol.Border]               = new Num.Vector4(0.266f, 0.266f, 0.266f, 1.000f);
            colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(0.000f, 0.000f, 0.000f, 0.000f);
            colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(0.160f, 0.160f, 0.160f, 1.000f);
            colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(0.200f, 0.200f, 0.200f, 1.000f);
            colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(0.280f, 0.280f, 0.280f, 1.000f);
            colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(0.148f, 0.148f, 0.148f, 1.000f);
            colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(0.148f, 0.148f, 0.148f, 1.000f);
            colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(0.148f, 0.148f, 0.148f, 1.000f);
            colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(0.195f, 0.195f, 0.195f, 1.000f);
            colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(0.160f, 0.160f, 0.160f, 1.000f);
            colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(0.277f, 0.277f, 0.277f, 1.000f);
            colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Num.Vector4(0.300f, 0.300f, 0.300f, 1.000f);
            colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(1.000f, 1.000f, 1.000f, 1.000f);
            colors[(int)ImGuiCol.SliderGrab]           = new Num.Vector4(0.391f, 0.391f, 0.391f, 1.000f);
            colors[(int)ImGuiCol.SliderGrabActive]     = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.Button]               = new Num.Vector4(1.000f, 1.000f, 1.000f, 0.000f);
            colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(1.000f, 1.000f, 1.000f, 0.156f);
            colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(1.000f, 1.000f, 1.000f, 0.391f);
            colors[(int)ImGuiCol.Header]               = new Num.Vector4(0.313f, 0.313f, 0.313f, 1.000f);
            colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(0.469f, 0.469f, 0.469f, 1.000f);
            colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(0.469f, 0.469f, 0.469f, 1.000f);
            colors[(int)ImGuiCol.Separator]            = colors[(int)ImGuiCol.Border];
            colors[(int)ImGuiCol.SeparatorHovered]     = new Num.Vector4(0.391f, 0.391f, 0.391f, 1.000f);
            colors[(int)ImGuiCol.SeparatorActive]      = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(1.000f, 1.000f, 1.000f, 0.250f);
            colors[(int)ImGuiCol.ResizeGripHovered]    = new Num.Vector4(1.000f, 1.000f, 1.000f, 0.670f);
            colors[(int)ImGuiCol.ResizeGripActive]     = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.Tab]                   = new Num.Vector4(0.098f, 0.098f, 0.098f, 1.000f);
            colors[(int)ImGuiCol.TabHovered]            = new Num.Vector4(0.352f, 0.352f, 0.352f, 1.000f);
            colors[(int)ImGuiCol.TabActive]             = new Num.Vector4(0.195f, 0.195f, 0.195f, 1.000f);
            colors[(int)ImGuiCol.TabUnfocused]          = new Num.Vector4(0.098f, 0.098f, 0.098f, 1.000f);
            colors[(int)ImGuiCol.TabUnfocusedActive]    = new Num.Vector4(0.195f, 0.195f, 0.195f, 1.000f);
            colors[(int)ImGuiCol.PlotLines]             = new Num.Vector4(0.469f, 0.469f, 0.469f, 1.000f);
            colors[(int)ImGuiCol.PlotLinesHovered]      = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.PlotHistogram]         = new Num.Vector4(0.586f, 0.586f, 0.586f, 1.000f);
            colors[(int)ImGuiCol.PlotHistogramHovered]  = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.TextSelectedBg]        = new Num.Vector4(1.000f, 1.000f, 1.000f, 0.156f);
            colors[(int)ImGuiCol.DragDropTarget]        = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.NavHighlight]          = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.NavWindowingHighlight] = new Num.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            colors[(int)ImGuiCol.NavWindowingDimBg]     = new Num.Vector4(0.000f, 0.000f, 0.000f, 0.586f);
            colors[(int)ImGuiCol.ModalWindowDimBg]      = new Num.Vector4(0.000f, 0.000f, 0.000f, 0.586f);

            style.ChildRounding     = 4.0f;
            style.FrameBorderSize   = 1.0f;
            style.FrameRounding     = 2.0f;
            style.GrabMinSize       = 7.0f;
            style.PopupRounding     = 2.0f;
            style.ScrollbarRounding = 12.0f;
            style.ScrollbarSize     = 13.0f;
            style.TabBorderSize     = 1.0f;
            style.TabRounding       = 0.0f;
            style.WindowRounding    = 4.0f;
        }
Exemplo n.º 18
0
        public static void DarkTheme2()
        {
            ImGuiStylePtr st = ImGui.GetStyle();
            RangeAccessor <Num.Vector4> colors = st.Colors;

            st.FrameBorderSize   = 1.0f;
            st.FramePadding      = new Num.Vector2(4.0f, 2.0f);
            st.ItemSpacing       = new Num.Vector2(8.0f, 2.0f);
            st.WindowBorderSize  = 1.0f;
            st.TabBorderSize     = 1.0f;
            st.WindowRounding    = 1.0f;
            st.ChildRounding     = 1.0f;
            st.FrameRounding     = 1.0f;
            st.ScrollbarRounding = 1.0f;
            st.GrabRounding      = 1.0f;
            st.TabRounding       = 1.0f;

            colors[(int)ImGuiCol.Text]                 = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.95f);
            colors[(int)ImGuiCol.TextDisabled]         = new Num.Vector4(0.50f, 0.50f, 0.50f, 1.00f);
            colors[(int)ImGuiCol.WindowBg]             = new Num.Vector4(0.13f, 0.12f, 0.12f, 1.00f);
            colors[(int)ImGuiCol.ChildBg]              = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.00f);
            colors[(int)ImGuiCol.PopupBg]              = new Num.Vector4(0.05f, 0.05f, 0.05f, 0.94f);
            colors[(int)ImGuiCol.Border]               = new Num.Vector4(0.53f, 0.53f, 0.53f, 0.46f);
            colors[(int)ImGuiCol.BorderShadow]         = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            colors[(int)ImGuiCol.FrameBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.85f);
            colors[(int)ImGuiCol.FrameBgHovered]       = new Num.Vector4(0.22f, 0.22f, 0.22f, 0.40f);
            colors[(int)ImGuiCol.FrameBgActive]        = new Num.Vector4(0.16f, 0.16f, 0.16f, 0.53f);
            colors[(int)ImGuiCol.TitleBg]              = new Num.Vector4(0.00f, 0.00f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.TitleBgActive]        = new Num.Vector4(0.00f, 0.00f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.TitleBgCollapsed]     = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.51f);
            colors[(int)ImGuiCol.MenuBarBg]            = new Num.Vector4(0.12f, 0.12f, 0.12f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarBg]          = new Num.Vector4(0.02f, 0.02f, 0.02f, 0.53f);
            colors[(int)ImGuiCol.ScrollbarGrab]        = new Num.Vector4(0.31f, 0.31f, 0.31f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Num.Vector4(0.41f, 0.41f, 0.41f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Num.Vector4(0.48f, 0.48f, 0.48f, 1.00f);
            colors[(int)ImGuiCol.CheckMark]            = new Num.Vector4(0.79f, 0.79f, 0.79f, 1.00f);
            colors[(int)ImGuiCol.SliderGrab]           = new Num.Vector4(0.48f, 0.47f, 0.47f, 0.91f);
            colors[(int)ImGuiCol.SliderGrabActive]     = new Num.Vector4(0.56f, 0.55f, 0.55f, 0.62f);
            colors[(int)ImGuiCol.Button]               = new Num.Vector4(0.50f, 0.50f, 0.50f, 0.63f);
            colors[(int)ImGuiCol.ButtonHovered]        = new Num.Vector4(0.67f, 0.67f, 0.68f, 0.63f);
            colors[(int)ImGuiCol.ButtonActive]         = new Num.Vector4(0.26f, 0.26f, 0.26f, 0.63f);
            colors[(int)ImGuiCol.Header]               = new Num.Vector4(0.54f, 0.54f, 0.54f, 0.58f);
            colors[(int)ImGuiCol.HeaderHovered]        = new Num.Vector4(0.64f, 0.65f, 0.65f, 0.80f);
            colors[(int)ImGuiCol.HeaderActive]         = new Num.Vector4(0.25f, 0.25f, 0.25f, 0.80f);
            colors[(int)ImGuiCol.Separator]            = new Num.Vector4(0.58f, 0.58f, 0.58f, 0.50f);
            colors[(int)ImGuiCol.SeparatorHovered]     = new Num.Vector4(0.81f, 0.81f, 0.81f, 0.64f);
            colors[(int)ImGuiCol.SeparatorActive]      = new Num.Vector4(0.81f, 0.81f, 0.81f, 0.64f);
            colors[(int)ImGuiCol.ResizeGrip]           = new Num.Vector4(0.87f, 0.87f, 0.87f, 0.53f);
            colors[(int)ImGuiCol.ResizeGripHovered]    = new Num.Vector4(0.87f, 0.87f, 0.87f, 0.74f);
            colors[(int)ImGuiCol.ResizeGripActive]     = new Num.Vector4(0.87f, 0.87f, 0.87f, 0.74f);
            colors[(int)ImGuiCol.Tab]                   = new Num.Vector4(0.01f, 0.01f, 0.01f, 0.86f);
            colors[(int)ImGuiCol.TabHovered]            = new Num.Vector4(0.29f, 0.29f, 0.29f, 1.00f);
            colors[(int)ImGuiCol.TabActive]             = new Num.Vector4(0.31f, 0.31f, 0.31f, 1.00f);
            colors[(int)ImGuiCol.TabUnfocused]          = new Num.Vector4(0.02f, 0.02f, 0.02f, 1.00f);
            colors[(int)ImGuiCol.TabUnfocusedActive]    = new Num.Vector4(0.19f, 0.19f, 0.19f, 1.00f);
            colors[(int)ImGuiCol.PlotLines]             = new Num.Vector4(0.61f, 0.61f, 0.61f, 1.00f);
            colors[(int)ImGuiCol.PlotLinesHovered]      = new Num.Vector4(0.68f, 0.68f, 0.68f, 1.00f);
            colors[(int)ImGuiCol.PlotHistogram]         = new Num.Vector4(0.90f, 0.77f, 0.33f, 1.00f);
            colors[(int)ImGuiCol.PlotHistogramHovered]  = new Num.Vector4(0.87f, 0.55f, 0.08f, 1.00f);
            colors[(int)ImGuiCol.TextSelectedBg]        = new Num.Vector4(0.47f, 0.60f, 0.76f, 0.47f);
            colors[(int)ImGuiCol.DragDropTarget]        = new Num.Vector4(0.58f, 0.58f, 0.58f, 0.90f);
            colors[(int)ImGuiCol.NavHighlight]          = new Num.Vector4(0.60f, 0.60f, 0.60f, 1.00f);
            colors[(int)ImGuiCol.NavWindowingHighlight] = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.70f);
            colors[(int)ImGuiCol.NavWindowingDimBg]     = new Num.Vector4(0.80f, 0.80f, 0.80f, 0.20f);
            colors[(int)ImGuiCol.ModalWindowDimBg]      = new Num.Vector4(0.80f, 0.80f, 0.80f, 0.35f);
        }
Exemplo n.º 19
0
        /// <summary>Loads the style.</summary>
        private void LoadStyle()
        {
            Logger.Log(" > Loaded main style.");
            clearColor = new RgbaFloat(1.0f, 1.0f, 1.0f, 1.0f);

            style = ImGui.GetStyle();

            style.WindowBorderSize = 1.0f;
            style.WindowPadding    = new System.Numerics.Vector2(15, 15);
            style.WindowRounding   = 5.0f;

            style.PopupBorderSize = 0.0f;

            style.FrameBorderSize = 1.0f;
            style.FramePadding    = new System.Numerics.Vector2(5, 5);
            style.FrameRounding   = 4.0f;

            style.ItemSpacing      = new System.Numerics.Vector2(12, 8);
            style.ItemInnerSpacing = new System.Numerics.Vector2(8, 6);
            style.IndentSpacing    = 25.0f;

            style.TabBorderSize = 0.0f;

            style.ScrollbarSize     = 15.0f;
            style.ScrollbarRounding = 9.0f;

            style.GrabMinSize  = 5.0f;
            style.GrabRounding = 3.0f;

            style.TabRounding = 4.0f;

            RangeAccessor <System.Numerics.Vector4> colors = ImGui.GetStyle().Colors;

            colors[(int)ImGuiCol.Text] = new System.Numerics.Vector4(1.00f, 1.00f, 1.00f, 1.00f);

            colors[(int)ImGuiCol.TextDisabled]         = new System.Numerics.Vector4(0.36f, 0.42f, 0.47f, 1.00f);
            colors[(int)ImGuiCol.WindowBg]             = new System.Numerics.Vector4(0.17f, 0.21f, 0.26f, 1.00f);
            colors[(int)ImGuiCol.ChildBg]              = new System.Numerics.Vector4(0.17f, 0.21f, 0.26f, 1.00f);
            colors[(int)ImGuiCol.PopupBg]              = new System.Numerics.Vector4(0.08f, 0.08f, 0.08f, 1f);
            colors[(int)ImGuiCol.Border]               = new System.Numerics.Vector4(0.08f, 0.11f, 0.12f, 1.00f);
            colors[(int)ImGuiCol.BorderShadow]         = new System.Numerics.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            colors[(int)ImGuiCol.FrameBg]              = new System.Numerics.Vector4(0.20f, 0.25f, 0.29f, 1.00f);
            colors[(int)ImGuiCol.FrameBgHovered]       = new System.Numerics.Vector4(0.12f, 0.20f, 0.28f, 1.00f);
            colors[(int)ImGuiCol.FrameBgActive]        = new System.Numerics.Vector4(0.09f, 0.12f, 0.14f, 1.00f);
            colors[(int)ImGuiCol.TitleBg]              = new System.Numerics.Vector4(0.09f, 0.12f, 0.14f, 0.65f);
            colors[(int)ImGuiCol.TitleBgActive]        = new System.Numerics.Vector4(0.08f, 0.10f, 0.12f, 1.00f);
            colors[(int)ImGuiCol.TitleBgCollapsed]     = new System.Numerics.Vector4(0.00f, 0.00f, 0.00f, 0.51f);
            colors[(int)ImGuiCol.MenuBarBg]            = new System.Numerics.Vector4(0.15f, 0.18f, 0.22f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarBg]          = new System.Numerics.Vector4(0.02f, 0.02f, 0.02f, 0.39f);
            colors[(int)ImGuiCol.ScrollbarGrab]        = new System.Numerics.Vector4(0.20f, 0.25f, 0.29f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarGrabHovered] = new System.Numerics.Vector4(0.18f, 0.22f, 0.25f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarGrabActive]  = new System.Numerics.Vector4(0.09f, 0.21f, 0.31f, 1.00f);
            colors[(int)ImGuiCol.CheckMark]            = new System.Numerics.Vector4(0.28f, 0.56f, 1.00f, 1.00f);
            colors[(int)ImGuiCol.SliderGrab]           = new System.Numerics.Vector4(0.28f, 0.56f, 1.00f, 1.00f);
            colors[(int)ImGuiCol.SliderGrabActive]     = new System.Numerics.Vector4(0.37f, 0.61f, 1.00f, 1.00f);
            colors[(int)ImGuiCol.Button]               = new System.Numerics.Vector4(0.20f, 0.25f, 0.29f, 1.00f);
            colors[(int)ImGuiCol.ButtonHovered]        = new System.Numerics.Vector4(0.28f, 0.56f, 1.00f, 1.00f);
            colors[(int)ImGuiCol.ButtonActive]         = new System.Numerics.Vector4(0.06f, 0.53f, 0.98f, 1.00f);
            colors[(int)ImGuiCol.Header]               = new System.Numerics.Vector4(0.20f, 0.25f, 0.29f, 0.55f);
            colors[(int)ImGuiCol.HeaderHovered]        = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 0.80f);
            colors[(int)ImGuiCol.HeaderActive]         = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 1.00f);
            colors[(int)ImGuiCol.Separator]            = new System.Numerics.Vector4(0.08f, 0.11f, 0.14f, 1.00f);
            colors[(int)ImGuiCol.SeparatorHovered]     = new System.Numerics.Vector4(0.05f, 0.06f, 0.07f, 0.78f);
            colors[(int)ImGuiCol.SeparatorActive]      = new System.Numerics.Vector4(0.10f, 0.40f, 0.75f, 1.00f);
            colors[(int)ImGuiCol.ResizeGrip]           = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 0.25f);
            colors[(int)ImGuiCol.ResizeGripHovered]    = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 0.67f);
            colors[(int)ImGuiCol.ResizeGripActive]     = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 0.95f);
            colors[(int)ImGuiCol.Tab]                   = new System.Numerics.Vector4(0.11f, 0.15f, 0.17f, 1.00f);
            colors[(int)ImGuiCol.TabHovered]            = new System.Numerics.Vector4(0.07f, 0.24f, 0.45f, 0.80f);
            colors[(int)ImGuiCol.TabActive]             = new System.Numerics.Vector4(0.20f, 0.25f, 0.29f, 1.00f);
            colors[(int)ImGuiCol.TabUnfocused]          = new System.Numerics.Vector4(0.200f, 0.276f, 0.314f, 1.000f);
            colors[(int)ImGuiCol.TabUnfocusedActive]    = new System.Numerics.Vector4(0.214f, 0.319f, 0.372f, 1.000f);
            colors[(int)ImGuiCol.PlotLines]             = new System.Numerics.Vector4(0.61f, 0.61f, 0.61f, 1.00f);
            colors[(int)ImGuiCol.PlotLinesHovered]      = new System.Numerics.Vector4(1.00f, 0.43f, 0.35f, 1.00f);
            colors[(int)ImGuiCol.PlotHistogram]         = new System.Numerics.Vector4(0.90f, 0.70f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.PlotHistogramHovered]  = new System.Numerics.Vector4(1.00f, 0.60f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.TextSelectedBg]        = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 0.35f);
            colors[(int)ImGuiCol.DragDropTarget]        = new System.Numerics.Vector4(1.00f, 1.00f, 0.00f, 0.90f);
            colors[(int)ImGuiCol.NavHighlight]          = new System.Numerics.Vector4(0.26f, 0.59f, 0.98f, 1.00f);
            colors[(int)ImGuiCol.NavWindowingHighlight] = new System.Numerics.Vector4(1.00f, 1.00f, 1.00f, 0.70f);
            colors[(int)ImGuiCol.NavWindowingDimBg]     = new System.Numerics.Vector4(0.80f, 0.80f, 0.80f, 0.20f);
            colors[(int)ImGuiCol.ModalWindowDimBg]      = new System.Numerics.Vector4(0.80f, 0.80f, 0.80f, 0.35f);
        }
Exemplo n.º 20
0
        public void InitTheme(ImGuiStylePtr style, ImGuiIOPtr io)
        {
            style.Colors[(int)ImGuiCol.Text]                 = new Vector4(0.82f, 0.81f, 0.80f, 1.00f);
            style.Colors[(int)ImGuiCol.TextDisabled]         = new Vector4(0.40f, 0.39f, 0.38f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]             = new Vector4(0.18f, 0.18f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.ChildBg]              = new Vector4(0.22f, 0.21f, 0.21f, 1.00f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new Vector4(0.24f, 0.27f, 0.20f, 1.00f);
            style.Colors[(int)ImGuiCol.Border]               = new Vector4(0.54f, 0.57f, 0.51f, 0.50f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new Vector4(0.14f, 0.16f, 0.11f, 0.52f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Vector4(0.24f, 0.27f, 0.20f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Vector4(0.27f, 0.30f, 0.23f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new Vector4(0.30f, 0.34f, 0.26f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Vector4(0.24f, 0.27f, 0.20f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Vector4(0.00f, 0.00f, 0.00f, 0.51f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new Vector4(0.24f, 0.27f, 0.20f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Vector4(0.28f, 0.32f, 0.24f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Vector4(0.25f, 0.30f, 0.22f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Vector4(0.23f, 0.27f, 0.21f, 1.00f);
            style.Colors[(int)ImGuiCol.CheckMark]            = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.SliderGrab]           = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.SliderGrabActive]     = new Vector4(0.54f, 0.57f, 0.51f, 0.50f);
            style.Colors[(int)ImGuiCol.Button]               = new Vector4(0.29f, 0.34f, 0.26f, 0.40f);
            style.Colors[(int)ImGuiCol.ButtonHovered]        = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonActive]         = new Vector4(0.54f, 0.57f, 0.51f, 0.50f);
            style.Colors[(int)ImGuiCol.Header]               = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderHovered]        = new Vector4(0.35f, 0.42f, 0.31f, 0.6f);
            style.Colors[(int)ImGuiCol.HeaderActive]         = new Vector4(0.54f, 0.57f, 0.51f, 0.50f);
            style.Colors[(int)ImGuiCol.Separator]            = new Vector4(0.14f, 0.16f, 0.11f, 1.00f);
            style.Colors[(int)ImGuiCol.SeparatorHovered]     = new Vector4(0.54f, 0.57f, 0.51f, 1.00f);
            style.Colors[(int)ImGuiCol.SeparatorActive]      = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]           = new Vector4(0.19f, 0.23f, 0.18f, 0.00f); // grip invis
            style.Colors[(int)ImGuiCol.ResizeGripHovered]    = new Vector4(0.54f, 0.57f, 0.51f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGripActive]     = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.Tab]                   = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.TabHovered]            = new Vector4(0.54f, 0.57f, 0.51f, 0.78f);
            style.Colors[(int)ImGuiCol.TabActive]             = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.TabUnfocused]          = new Vector4(0.24f, 0.27f, 0.20f, 1.00f);
            style.Colors[(int)ImGuiCol.TabUnfocusedActive]    = new Vector4(0.35f, 0.42f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.DockingPreview]        = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.DockingEmptyBg]        = new Vector4(0.20f, 0.20f, 0.20f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLines]             = new Vector4(0.61f, 0.61f, 0.61f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]      = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]         = new Vector4(1.00f, 0.78f, 0.28f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogramHovered]  = new Vector4(1.00f, 0.60f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TextSelectedBg]        = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.DragDropTarget]        = new Vector4(0.73f, 0.67f, 0.24f, 1.00f);
            style.Colors[(int)ImGuiCol.NavHighlight]          = new Vector4(0.59f, 0.54f, 0.18f, 1.00f);
            style.Colors[(int)ImGuiCol.NavWindowingHighlight] = new Vector4(1.00f, 1.00f, 1.00f, 0.70f);
            style.Colors[(int)ImGuiCol.NavWindowingDimBg]     = new Vector4(0.80f, 0.80f, 0.80f, 0.20f);
            style.Colors[(int)ImGuiCol.ModalWindowDimBg]      = new Vector4(0.80f, 0.80f, 0.80f, 0.35f);

            style.FrameBorderSize   = 0f;
            style.WindowRounding    = 0f;
            style.ChildRounding     = 0f;
            style.FrameRounding     = 0f;
            style.PopupRounding     = 0f;
            style.ScrollbarRounding = 0f;
            style.GrabRounding      = 0f;
            style.TabRounding       = 0f;

            style.WindowMenuButtonPosition = ImGuiDir.Right;

            io.Fonts.AddFontDefault();
        }
Exemplo n.º 21
0
        private void SetupDarkStyle()
        {
            ImGuiStylePtr style = ImGui.GetStyle();
            RangeAccessor <System.Numerics.Vector4> colors = style.Colors;

            //ImGuiCol_Text
            //colors[0] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.Text, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 1.000f));
            //ImGuiCol_TextDisabled
            //colors[1] = new System.Numerics.Vector4(0.500f, 0.500f, 0.500f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TextDisabled, new System.Numerics.Vector4(0.500f, 0.500f, 0.500f, 1.000f));
            //ImGuiCol_WindowBg
            //colors[2] = new System.Numerics.Vector4(0.180f, 0.180f, 0.180f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.WindowBg, new System.Numerics.Vector4(0.180f, 0.180f, 0.180f, 1.000f));
            //ImGuiCol_ChildBg
            //colors[3] = new System.Numerics.Vector4(0.280f, 0.280f, 0.280f, 0.000f);
            ImGui.PushStyleColor(ImGuiCol.ChildBg, new System.Numerics.Vector4(0.280f, 0.280f, 0.280f, 0.000f));
            //ImGuiCol_PopupBg
            //colors[4] = new System.Numerics.Vector4(0.313f, 0.313f, 0.313f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.PopupBg, new System.Numerics.Vector4(0.313f, 0.313f, 0.313f, 1.000f));
            //ImGuiCol_Border
            //colors[5] = new System.Numerics.Vector4(0.266f, 0.266f, 0.266f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.Border, new System.Numerics.Vector4(0.266f, 0.266f, 0.266f, 1.000f));
            //ImGuiCol_BorderShadow
            //colors[6] = new System.Numerics.Vector4(0.000f, 0.000f, 0.000f, 0.000f);
            ImGui.PushStyleColor(ImGuiCol.BorderShadow, new System.Numerics.Vector4(0.000f, 0.000f, 0.000f, 0.000f));
            //ImGuiCol_FrameBg
            //colors[7] = new System.Numerics.Vector4(0.160f, 0.160f, 0.160f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.FrameBg, new System.Numerics.Vector4(0.160f, 0.160f, 0.160f, 1.000f));
            //ImGuiCol_FrameBgHovered
            //colors[8] = new System.Numerics.Vector4(0.200f, 0.200f, 0.200f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.FrameBgHovered, new System.Numerics.Vector4(0.200f, 0.200f, 0.200f, 1.000f));
            //ImGuiCol_FrameBgActive
            //colors[9] = new System.Numerics.Vector4(0.280f, 0.280f, 0.280f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.FrameBgActive, new System.Numerics.Vector4(0.280f, 0.280f, 0.280f, 1.000f));
            //ImGuiCol_TitleBg
            //colors[10] = new System.Numerics.Vector4(0.148f, 0.148f, 0.148f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TitleBg, new System.Numerics.Vector4(0.148f, 0.148f, 0.148f, 1.000f));
            //ImGuiCol_TitleBgActive
            //colors[11] = new System.Numerics.Vector4(0.148f, 0.148f, 0.148f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TitleBgActive, new System.Numerics.Vector4(0.148f, 0.148f, 0.148f, 1.000f));
            //ImGuiCol_TitleBgCollapsed
            //colors[12] = new System.Numerics.Vector4(0.148f, 0.148f, 0.148f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TitleBgCollapsed, new System.Numerics.Vector4(0.148f, 0.148f, 0.148f, 1.000f));
            //ImGuiCol_MenuBarBg
            //colors[13] = new System.Numerics.Vector4(0.195f, 0.195f, 0.195f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.MenuBarBg, new System.Numerics.Vector4(0.195f, 0.195f, 0.195f, 1.000f));
            //ImGuiCol_ScrollbarBg
            //colors[14] = new System.Numerics.Vector4(0.160f, 0.160f, 0.160f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.ScrollbarBg, new System.Numerics.Vector4(0.160f, 0.160f, 0.160f, 1.000f));
            //ImGuiCol_ScrollbarGrab
            //colors[15] = new System.Numerics.Vector4(0.277f, 0.277f, 0.277f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.ScrollbarBg, new System.Numerics.Vector4(0.277f, 0.277f, 0.277f, 1.000f));
            //ImGuiCol_ScrollbarGrabHovered
            //colors[16] = new System.Numerics.Vector4(0.300f, 0.300f, 0.300f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.ScrollbarGrabHovered, new System.Numerics.Vector4(0.300f, 0.300f, 0.300f, 1.000f));
            //ImGuiCol_ScrollbarGrabActive
            //colors[17] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.ScrollbarGrabActive, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_CheckMark
            //colors[18] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.CheckMark, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 1.000f));
            //ImGuiCol_SliderGrab
            //colors[19] = new System.Numerics.Vector4(0.391f, 0.391f, 0.391f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.SliderGrab, new System.Numerics.Vector4(0.391f, 0.391f, 0.391f, 1.000f));
            //ImGuiCol_SliderGrabActive
            //colors[20] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.SliderGrabActive, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_Button
            //colors[21] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.000f);
            ImGui.PushStyleColor(ImGuiCol.Button, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.000f));
            //ImGuiCol_ButtonHovered
            //colors[22] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.156f);
            ImGui.PushStyleColor(ImGuiCol.ButtonHovered, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.156f));
            //ImGuiCol_ButtonActive
            //colors[23] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.391f);
            ImGui.PushStyleColor(ImGuiCol.ButtonActive, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.391f));
            //ImGuiCol_Header
            //colors[24] = new System.Numerics.Vector4(0.313f, 0.313f, 0.313f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.Header, new System.Numerics.Vector4(0.313f, 0.313f, 0.313f, 1.000f));
            //ImGuiCol_HeaderHovered
            //colors[25] = new System.Numerics.Vector4(0.469f, 0.469f, 0.469f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.HeaderHovered, new System.Numerics.Vector4(0.469f, 0.469f, 0.469f, 1.000f));
            //ImGuiCol_HeaderActive
            //colors[26] = new System.Numerics.Vector4(0.469f, 0.469f, 0.469f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.HeaderActive, new System.Numerics.Vector4(0.469f, 0.469f, 0.469f, 1.000f));
            //ImGuiCol_Separator
            //colors[27] = new System.Numerics.Vector4(0.266f, 0.266f, 0.266f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.Separator, new System.Numerics.Vector4(0.266f, 0.266f, 0.266f, 1.000f));
            //ImGuiCol_SeparatorHovered
            //colors[28] = new System.Numerics.Vector4(0.391f, 0.391f, 0.391f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.SeparatorHovered, new System.Numerics.Vector4(0.391f, 0.391f, 0.391f, 1.000f));
            //ImGuiCol_SeparatorActive
            //colors[29] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.SeparatorActive, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_ResizeGrip
            //colors[30] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.250f);
            ImGui.PushStyleColor(ImGuiCol.ResizeGrip, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.250f));
            //ImGuiCol_ResizeGripHovered
            //colors[31] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.670f);
            ImGui.PushStyleColor(ImGuiCol.ResizeGripHovered, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.670f));
            //ImGuiCol_ResizeGripActive
            //colors[32] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.ResizeGripActive, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_Tab
            //colors[33] = new System.Numerics.Vector4(0.098f, 0.098f, 0.098f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.Tab, new System.Numerics.Vector4(0.098f, 0.098f, 0.098f, 1.000f));
            //ImGuiCol_TabHovered
            //colors[34] = new System.Numerics.Vector4(0.352f, 0.352f, 0.352f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TabHovered, new System.Numerics.Vector4(0.352f, 0.352f, 0.352f, 1.000f));
            //ImGuiCol_TabActive
            //colors[35] = new System.Numerics.Vector4(0.195f, 0.195f, 0.195f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TabActive, new System.Numerics.Vector4(0.195f, 0.195f, 0.195f, 1.000f));
            //ImGuiCol_TabUnfocused
            //colors[36] = new System.Numerics.Vector4(0.098f, 0.098f, 0.098f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TabUnfocused, new System.Numerics.Vector4(0.098f, 0.098f, 0.098f, 1.000f));
            //ImGuiCol_TabUnfocusedActive
            //colors[37] = new System.Numerics.Vector4(0.195f, 0.195f, 0.195f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.TabUnfocusedActive, new System.Numerics.Vector4(0.195f, 0.195f, 0.195f, 1.000f));

            //ImGuiCol_DockingPreview
            //colors[38] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 0.781f);

            //ImGuiCol_DockingEmptyBg
            //colors[39] = new System.Numerics.Vector4(0.180f, 0.180f, 0.180f, 1.000f);

            //ImGuiCol_PlotLines
            //colors[40] = new System.Numerics.Vector4(0.469f, 0.469f, 0.469f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.PlotLines, new System.Numerics.Vector4(0.469f, 0.469f, 0.469f, 1.000f));
            //ImGuiCol_PlotLinesHovered
            //colors[41] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.PlotLinesHovered, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_PlotHistogram
            //colors[42] = new System.Numerics.Vector4(0.586f, 0.586f, 0.586f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.PlotHistogram, new System.Numerics.Vector4(0.586f, 0.586f, 0.586f, 1.000f));
            //ImGuiCol_PlotHistogramHovered
            //colors[43] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.PlotHistogramHovered, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_TextSelectedBg
            //colors[44] = new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.156f);
            ImGui.PushStyleColor(ImGuiCol.TextSelectedBg, new System.Numerics.Vector4(1.000f, 1.000f, 1.000f, 0.156f));
            //ImGuiCol_DragDropTarget
            //colors[45] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.DragDropTarget, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_NavHighlight
            //colors[46] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.NavHighlight, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_NavWindowingHighlight
            //colors[47] = new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f);
            ImGui.PushStyleColor(ImGuiCol.NavWindowingHighlight, new System.Numerics.Vector4(1.000f, 0.391f, 0.000f, 1.000f));
            //ImGuiCol_NavWindowingDimBg
            //colors[48] = new System.Numerics.Vector4(0.000f, 0.000f, 0.000f, 0.586f);
            ImGui.PushStyleColor(ImGuiCol.NavWindowingDimBg, new System.Numerics.Vector4(0.000f, 0.000f, 0.000f, 0.586f));
            //ImGuiCol_ModalWindowDimBg
            //colors[49] = new System.Numerics.Vector4(0.000f, 0.000f, 0.000f, 0.586f);
            ImGui.PushStyleColor(ImGuiCol.ModalWindowDimBg, new System.Numerics.Vector4(0.000f, 0.000f, 0.000f, 0.586f));

            style.ChildRounding     = 4.0f;
            style.FrameBorderSize   = 1.0f;
            style.FrameRounding     = 2.0f;
            style.GrabMinSize       = 7.0f;
            style.PopupRounding     = 2.0f;
            style.ScrollbarRounding = 12.0f;
            style.ScrollbarSize     = 13.0f;
            style.TabBorderSize     = 1.0f;
            style.TabRounding       = 0.0f;
            style.WindowRounding    = 4.0f;
        }
Exemplo n.º 22
0
        public void InitTheme(ImGuiStylePtr style, ImGuiIOPtr io)
        {
            style.Colors[(int)ImGuiCol.Text]                 = new Vector4(0.90f, 0.90f, 0.90f, 1.00f);
            style.Colors[(int)ImGuiCol.TextDisabled]         = new Vector4(0.50f, 0.50f, 0.50f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]             = new Vector4(0.05f, 0.05f, 0.05f, 1f);
            style.Colors[(int)ImGuiCol.ChildBg]              = new Vector4(0.05f, 0.05f, 0.05f, 1f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new Vector4(0.00f, 0.00f, 0.00f, 0.9f);
            style.Colors[(int)ImGuiCol.Border]               = new Vector4(0.40f, 0.40f, 0.40f, 1.00f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new Vector4(1.00f, 1.00f, 1.00f, 0.00f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new Vector4(0.00f, 0.00f, 0.00f, 0.80f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new Vector4(0.84f, 0.37f, 0.00f, 0.20f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new Vector4(0.84f, 0.37f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new Vector4(0.06f, 0.06f, 0.06f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new Vector4(0.08f, 0.08f, 0.08f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new Vector4(0.06f, 0.06f, 0.06f, 0.40f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new Vector4(0.14f, 0.14f, 0.14f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new Vector4(0.14f, 0.14f, 0.14f, 0.40f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new Vector4(0.31f, 0.31f, 0.31f, 0.30f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Vector4(1.00f, 1.00f, 1.00f, 0.30f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new Vector4(1.00f, 1.00f, 1.00f, 0.50f);
            style.Colors[(int)ImGuiCol.CheckMark]            = new Vector4(0.90f, 0.90f, 0.90f, 1.00f);
            style.Colors[(int)ImGuiCol.SliderGrab]           = new Vector4(0.31f, 0.31f, 0.31f, 1.00f);
            style.Colors[(int)ImGuiCol.SliderGrabActive]     = new Vector4(1.00f, 1.00f, 1.00f, 0.50f);
            style.Colors[(int)ImGuiCol.Button]               = new Vector4(0.14f, 0.14f, 0.14f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonHovered]        = new Vector4(0.84f, 0.37f, 0.00f, 0.20f);
            style.Colors[(int)ImGuiCol.ButtonActive]         = new Vector4(0.84f, 0.37f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.Header]               = new Vector4(0.14f, 0.14f, 0.14f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderHovered]        = new Vector4(0.84f, 0.37f, 0.00f, 0.20f);
            style.Colors[(int)ImGuiCol.HeaderActive]         = new Vector4(0.84f, 0.37f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.Separator]            = new Vector4(0.50f, 0.50f, 0.43f, 0.50f);
            style.Colors[(int)ImGuiCol.SeparatorHovered]     = new Vector4(0.75f, 0.45f, 0.10f, 0.78f);
            style.Colors[(int)ImGuiCol.SeparatorActive]      = new Vector4(0.75f, 0.45f, 0.10f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]           = new Vector4(0.98f, 0.65f, 0.26f, 0.25f);
            style.Colors[(int)ImGuiCol.ResizeGripHovered]    = new Vector4(0.98f, 0.65f, 0.26f, 0.67f);
            style.Colors[(int)ImGuiCol.ResizeGripActive]     = new Vector4(0.98f, 0.65f, 0.26f, 0.95f);
            style.Colors[(int)ImGuiCol.Tab]                   = new Vector4(0.17f, 0.10f, 0.04f, 0.94f);
            style.Colors[(int)ImGuiCol.TabHovered]            = new Vector4(0.84f, 0.37f, 0.00f, 0.60f);
            style.Colors[(int)ImGuiCol.TabActive]             = new Vector4(0.67f, 0.30f, 0.00f, 0.68f);
            style.Colors[(int)ImGuiCol.TabUnfocused]          = new Vector4(0.06f, 0.05f, 0.05f, 0.69f);
            style.Colors[(int)ImGuiCol.TabUnfocusedActive]    = new Vector4(0.36f, 0.17f, 0.03f, 0.64f);
            style.Colors[(int)ImGuiCol.PlotLines]             = new Vector4(0.39f, 0.39f, 0.39f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]      = new Vector4(0.35f, 0.92f, 1.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]         = new Vector4(0.00f, 0.20f, 0.90f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogramHovered]  = new Vector4(0.00f, 0.40f, 1.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TextSelectedBg]        = new Vector4(0.98f, 0.65f, 0.26f, 0.35f);
            style.Colors[(int)ImGuiCol.DragDropTarget]        = new Vector4(0.00f, 0.00f, 1.00f, 0.90f);
            style.Colors[(int)ImGuiCol.NavHighlight]          = new Vector4(0.98f, 0.65f, 0.26f, 1.00f);
            style.Colors[(int)ImGuiCol.NavWindowingHighlight] = new Vector4(0.00f, 0.00f, 0.00f, 0.70f);
            style.Colors[(int)ImGuiCol.NavWindowingDimBg]     = new Vector4(0.20f, 0.20f, 0.20f, 0.20f);
            style.Colors[(int)ImGuiCol.ModalWindowDimBg]      = new Vector4(0.20f, 0.20f, 0.20f, 0.35f);

            style.WindowPadding    = new Vector2(4f, 6f);
            style.FramePadding     = new Vector2(8f, 6f);
            style.ItemSpacing      = new Vector2(8f, 6f);
            style.ItemInnerSpacing = new Vector2(8f, 6f);
            style.IndentSpacing    = 20f;

            style.ScrollbarSize    = 20f;
            style.GrabMinSize      = 8f;
            style.WindowBorderSize = 0f;
            style.ChildBorderSize  = 0f;
            style.PopupBorderSize  = 0f;
            style.FrameBorderSize  = 0f;
            style.TabBorderSize    = 0f;

            style.WindowRounding    = 0f;
            style.ChildRounding     = 0f;
            style.FrameRounding     = 0f;
            style.PopupRounding     = 0f;
            style.ScrollbarRounding = 0f;
            style.GrabRounding      = 0f;
            style.TabRounding       = 0f;

            style.WindowTitleAlign         = new Vector2(0.5f, 0.5f);
            style.WindowRounding           = 0f;
            style.WindowMenuButtonPosition = ImGuiDir.Right;

            io.Fonts.AddFontFromFileTTF("./EngineResources/SourceCodePro.ttf", 15);
        }
Exemplo n.º 23
0
        public void CreateSkin()
        {
            ImGuiStylePtr style = ImGui.GetStyle();

            style.WindowPadding     = new System.Numerics.Vector2(15, 15);
            style.WindowRounding    = 5.0f;
            style.FramePadding      = new System.Numerics.Vector2(5, 5);
            style.FrameRounding     = 4.0f;
            style.ItemSpacing       = new System.Numerics.Vector2(12, 8);
            style.ItemInnerSpacing  = new System.Numerics.Vector2(8, 6);
            style.IndentSpacing     = 25.0f;
            style.ScrollbarSize     = 15.0f;
            style.ScrollbarRounding = 9.0f;
            style.GrabMinSize       = 5.0f;
            style.GrabRounding      = 3.0f;


            style.Colors[(int)(int)ImGuiCol.Text]    = new System.Numerics.Vector4(1f, 1f, 1f, 1.00f);
            style.Colors[(int)ImGuiCol.TextDisabled] = new System.Numerics.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.WindowBg]     = new System.Numerics.Vector4(0.07f, 0.06f, 0.08f, 1.00f);
            //  style.Colors[(int)ImGuiCol.ChildWindowBg] = new System.Numerics.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.PopupBg]              = new System.Numerics.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.Border]               = new System.Numerics.Vector4(0.80f, 0.80f, 0.83f, 0.88f);
            style.Colors[(int)ImGuiCol.BorderShadow]         = new System.Numerics.Vector4(0.92f, 0.91f, 0.88f, 0.00f);
            style.Colors[(int)ImGuiCol.FrameBg]              = new System.Numerics.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgHovered]       = new System.Numerics.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.FrameBgActive]        = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBg]              = new System.Numerics.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.TitleBgCollapsed]     = new System.Numerics.Vector4(0.2f, 0.18f, 0.24f, 0.55f);
            style.Colors[(int)ImGuiCol.TitleBgActive]        = new System.Numerics.Vector4(0.07f, 0.07f, 0.09f, 1.00f);
            style.Colors[(int)ImGuiCol.MenuBarBg]            = new System.Numerics.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarBg]          = new System.Numerics.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrab]        = new System.Numerics.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ScrollbarGrabActive]  = new System.Numerics.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            // style.Colors[(int)ImGuiCol.ComboBg] = new System.Numerics.Vector4(0.19f, 0.18f, 0.21f, 1.00f);
            style.Colors[(int)ImGuiCol.CheckMark]        = new System.Numerics.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.SliderGrab]       = new System.Numerics.Vector4(0.80f, 0.80f, 0.83f, 0.31f);
            style.Colors[(int)ImGuiCol.SliderGrabActive] = new System.Numerics.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            style.Colors[(int)ImGuiCol.Button]           = new System.Numerics.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonHovered]    = new System.Numerics.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            style.Colors[(int)ImGuiCol.ButtonActive]     = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.Header]           = new System.Numerics.Vector4(0.10f, 0.09f, 0.12f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderHovered]    = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.HeaderActive]     = new System.Numerics.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            //   style.Colors[(int)ImGuiCol.Column] = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            //   style.Colors[(int)ImGuiCol.ColumnHovered] = new System.Numerics.Vector4(0.24f, 0.23f, 0.29f, 1.00f);
            //  style.Colors[(int)ImGuiCol.ColumnActive] = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGrip]        = new System.Numerics.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            style.Colors[(int)ImGuiCol.ResizeGripHovered] = new System.Numerics.Vector4(0.56f, 0.56f, 0.58f, 1.00f);
            style.Colors[(int)ImGuiCol.ResizeGripActive]  = new System.Numerics.Vector4(0.06f, 0.05f, 0.07f, 1.00f);
            //  style.Colors[(int)ImGuiCol.CloseButton] = new System.Numerics.Vector4(0.40f, 0.39f, 0.38f, 0.16f);
            //  style.Colors[(int)ImGuiCol.CloseButtonHovered] = new System.Numerics.Vector4(0.40f, 0.39f, 0.38f, 0.39f);
            // style.Colors[(int)ImGuiCol.CloseButtonActive] = new System.Numerics.Vector4(0.40f, 0.39f, 0.38f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotLines]            = new System.Numerics.Vector4(0.40f, 0.39f, 0.38f, 0.63f);
            style.Colors[(int)ImGuiCol.PlotLinesHovered]     = new System.Numerics.Vector4(0.25f, 1.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.PlotHistogram]        = new System.Numerics.Vector4(0.40f, 0.39f, 0.38f, 0.63f);
            style.Colors[(int)ImGuiCol.PlotHistogramHovered] = new System.Numerics.Vector4(0.25f, 1.00f, 0.00f, 1.00f);
            style.Colors[(int)ImGuiCol.TextSelectedBg]       = new System.Numerics.Vector4(0.25f, 1.00f, 0.00f, 0.43f);
            //  style.Colors[(int)ImGuiCol.ModalWindowDarkening] = new System.Numerics.Vector4(1.00f, 0.98f, 0.95f, 0.73f);
        }
Exemplo n.º 24
0
        public static void LightGreenMiniDart()
        {
            ImGuiStylePtr style = ImGui.GetStyle();
            RangeAccessor <Num.Vector4> colors = style.Colors;

            style.WindowRounding    = 2.0f; // Radius of window corners rounding. Set to 0.0f to have rectangular windows
            style.ScrollbarRounding = 3.0f; // Radius of grab corners rounding for scrollbar
            style.GrabRounding      =
                2.0f;                       // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
            style.AntiAliasedLines  = true;
            style.AntiAliasedFill   = true;
            style.WindowRounding    = 2;
            style.ChildRounding     = 2;
            style.ScrollbarSize     = 16;
            style.ScrollbarRounding = 3;
            style.GrabRounding      = 2;
            style.ItemSpacing.X     = 10;
            style.ItemSpacing.Y     = 4;
            style.FramePadding.X    = 6;
            style.FramePadding.Y    = 4;
            style.Alpha             = 1.0f;
            style.FrameRounding     = 3.0f;

            colors[(int)ImGuiCol.Text]         = new Num.Vector4(0.00f, 0.00f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.TextDisabled] = new Num.Vector4(0.60f, 0.60f, 0.60f, 1.00f);
            colors[(int)ImGuiCol.WindowBg]     = new Num.Vector4(0.86f, 0.86f, 0.86f, 1.00f);

            //colors[(int)ImGuiCol.ChildWindowBg]         = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            colors[(int)ImGuiCol.ChildBg]               = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.00f);
            colors[(int)ImGuiCol.PopupBg]               = new Num.Vector4(0.93f, 0.93f, 0.93f, 0.98f);
            colors[(int)ImGuiCol.Border]                = new Num.Vector4(0.71f, 0.71f, 0.71f, 0.08f);
            colors[(int)ImGuiCol.BorderShadow]          = new Num.Vector4(0.00f, 0.00f, 0.00f, 0.04f);
            colors[(int)ImGuiCol.FrameBg]               = new Num.Vector4(0.71f, 0.71f, 0.71f, 0.55f);
            colors[(int)ImGuiCol.FrameBgHovered]        = new Num.Vector4(0.94f, 0.94f, 0.94f, 0.55f);
            colors[(int)ImGuiCol.FrameBgActive]         = new Num.Vector4(0.71f, 0.78f, 0.69f, 0.98f);
            colors[(int)ImGuiCol.TitleBg]               = new Num.Vector4(0.85f, 0.85f, 0.85f, 1.00f);
            colors[(int)ImGuiCol.TitleBgCollapsed]      = new Num.Vector4(0.82f, 0.78f, 0.78f, 0.51f);
            colors[(int)ImGuiCol.TitleBgActive]         = new Num.Vector4(0.78f, 0.78f, 0.78f, 1.00f);
            colors[(int)ImGuiCol.MenuBarBg]             = new Num.Vector4(0.86f, 0.86f, 0.86f, 1.00f);
            colors[(int)ImGuiCol.ScrollbarBg]           = new Num.Vector4(0.20f, 0.25f, 0.30f, 0.61f);
            colors[(int)ImGuiCol.ScrollbarGrab]         = new Num.Vector4(0.90f, 0.90f, 0.90f, 0.30f);
            colors[(int)ImGuiCol.ScrollbarGrabHovered]  = new Num.Vector4(0.92f, 0.92f, 0.92f, 0.78f);
            colors[(int)ImGuiCol.ScrollbarGrabActive]   = new Num.Vector4(1.00f, 1.00f, 1.00f, 1.00f);
            colors[(int)ImGuiCol.CheckMark]             = new Num.Vector4(0.184f, 0.407f, 0.193f, 1.00f);
            colors[(int)ImGuiCol.SliderGrab]            = new Num.Vector4(0.26f, 0.59f, 0.98f, 0.78f);
            colors[(int)ImGuiCol.SliderGrabActive]      = new Num.Vector4(0.26f, 0.59f, 0.98f, 1.00f);
            colors[(int)ImGuiCol.Button]                = new Num.Vector4(0.71f, 0.78f, 0.69f, 0.40f);
            colors[(int)ImGuiCol.ButtonHovered]         = new Num.Vector4(0.725f, 0.805f, 0.702f, 1.00f);
            colors[(int)ImGuiCol.ButtonActive]          = new Num.Vector4(0.793f, 0.900f, 0.836f, 1.00f);
            colors[(int)ImGuiCol.Header]                = new Num.Vector4(0.71f, 0.78f, 0.69f, 0.31f);
            colors[(int)ImGuiCol.HeaderHovered]         = new Num.Vector4(0.71f, 0.78f, 0.69f, 0.80f);
            colors[(int)ImGuiCol.HeaderActive]          = new Num.Vector4(0.71f, 0.78f, 0.69f, 1.00f);
            colors[(int)ImGuiCol.Separator]             = new Num.Vector4(0.39f, 0.39f, 0.39f, 1.00f);
            colors[(int)ImGuiCol.SeparatorHovered]      = new Num.Vector4(0.14f, 0.44f, 0.80f, 0.78f);
            colors[(int)ImGuiCol.SeparatorActive]       = new Num.Vector4(0.14f, 0.44f, 0.80f, 1.00f);
            colors[(int)ImGuiCol.ResizeGrip]            = new Num.Vector4(1.00f, 1.00f, 1.00f, 0.00f);
            colors[(int)ImGuiCol.ResizeGripHovered]     = new Num.Vector4(0.26f, 0.59f, 0.98f, 0.45f);
            colors[(int)ImGuiCol.ResizeGripActive]      = new Num.Vector4(0.26f, 0.59f, 0.98f, 0.78f);
            colors[(int)ImGuiCol.PlotLines]             = new Num.Vector4(0.39f, 0.39f, 0.39f, 1.00f);
            colors[(int)ImGuiCol.PlotLinesHovered]      = new Num.Vector4(1.00f, 0.43f, 0.35f, 1.00f);
            colors[(int)ImGuiCol.PlotHistogram]         = new Num.Vector4(0.90f, 0.70f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.PlotHistogramHovered]  = new Num.Vector4(1.00f, 0.60f, 0.00f, 1.00f);
            colors[(int)ImGuiCol.TextSelectedBg]        = new Num.Vector4(0.26f, 0.59f, 0.98f, 0.35f);
            colors[(int)ImGuiCol.ModalWindowDimBg]      = new Num.Vector4(0.20f, 0.20f, 0.20f, 0.35f);
            colors[(int)ImGuiCol.DragDropTarget]        = new Num.Vector4(0.26f, 0.59f, 0.98f, 0.95f);
            colors[(int)ImGuiCol.NavHighlight]          = colors[(int)ImGuiCol.HeaderHovered];
            colors[(int)ImGuiCol.NavWindowingHighlight] = new Num.Vector4(0.70f, 0.70f, 0.70f, 0.70f);
        }
Exemplo n.º 25
0
        public unsafe override void OnAttach()
        {
            ImGuiController = new ImGuiController(
                Application.Get().MainWindow.CreateOpenGL(),
                Application.Get().MainWindow,
                Application.Get().MainWindow.CreateInput()
                );

            ImGui.GetIO().NativePtr->IniFilename = null;
            if (!File.Exists(new DirectoryInfo(Environment.CurrentDirectory).Parent.FullName + @"/imgui.ini"))
            {
                ImGui.SaveIniSettingsToDisk(new DirectoryInfo(Environment.CurrentDirectory).Parent.FullName + @"/imgui.ini");
            }
            ImGui.LoadIniSettingsFromDisk(new DirectoryInfo(Environment.CurrentDirectory).Parent.FullName + @"/imgui.ini");

            ImGui.GetIO().ConfigFlags |= ImGuiConfigFlags.DockingEnable;
            ImGui.GetIO().ConfigWindowsMoveFromTitleBarOnly = true;

            FontDefault = ImGui.GetIO().Fonts.AddFontFromFileTTF
                              (@"builtin\fonts\OpenSans\OpenSans-Regular.ttf", 20);
            ImGuiController.RecreateFontDeviceTexture();

            FontDefaultHuge = ImGui.GetIO().Fonts.AddFontFromFileTTF
                                  (@"builtin\fonts\OpenSans\OpenSans-Regular.ttf", FontDefault.FontSize * 4);
            ImGuiController.RecreateFontDeviceTexture();

            ImGuiStylePtr style = ImGui.GetStyle();

            style.Alpha             = 1.0f;
            style.WindowTitleAlign  = new Vector2(0.5f, 0.5f);
            style.WindowMinSize     = new Vector2(200, 200);
            style.FramePadding      = new Vector2(4, 2);
            style.ItemSpacing       = new Vector2(6, 3);
            style.ItemInnerSpacing  = new Vector2(6, 4);
            style.WindowRounding    = 0.0f;
            style.FrameRounding     = 0.0f;
            style.ColumnsMinSpacing = 50.0f;
            style.GrabMinSize       = 14.0f;
            style.GrabRounding      = 6.0f;
            style.ScrollbarSize     = 12.0f;
            style.ScrollbarRounding = 30.0f;
            style.AntiAliasedLines  = true;
            style.AntiAliasedFill   = true;

            style.Colors[(int)ImGuiCol.Text] = new Vector4(0.9999f, 1f, 0.99994284f, 0.78f);

            style.Colors[(int)ImGuiCol.TextDisabled] = new Vector4(0.9999f, 1f, 0.99994284f, 0.28f);

            style.Colors[(int)ImGuiCol.WindowBg] = new Vector4(-0.14471881f, -0.16687626f, -0.1732549f, 1f);

            style.Colors[(int)ImGuiCol.ChildBg] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.58f);

            style.Colors[(int)ImGuiCol.PopupBg] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.9f);

            style.Colors[(int)ImGuiCol.Border] = new Vector4(0.010645908f, 0.012275871f, 0.012745101f, 0.6f);

            style.Colors[(int)ImGuiCol.BorderShadow] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0f);

            style.Colors[(int)ImGuiCol.FrameBg] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 1f);

            style.Colors[(int)ImGuiCol.FrameBgHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 0.78f);

            style.Colors[(int)ImGuiCol.FrameBgActive] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.TitleBg] = new Vector4(0.099400006f, 0.11461884f, 0.119f, 1f);

            style.Colors[(int)ImGuiCol.TitleBgActive] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 1f);

            style.Colors[(int)ImGuiCol.TitleBgCollapsed] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.75f);

            style.Colors[(int)ImGuiCol.MenuBarBg] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.47f);

            style.Colors[(int)ImGuiCol.ScrollbarBg] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 1f);

            style.Colors[(int)ImGuiCol.ScrollbarGrab] = new Vector4(0.099400006f, 0.11461884f, 0.119f, 1f);

            style.Colors[(int)ImGuiCol.ScrollbarGrabHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 0.78f);

            style.Colors[(int)ImGuiCol.ScrollbarGrabActive] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.CheckMark] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 1f);

            style.Colors[(int)ImGuiCol.SliderGrab] = new Vector4(0.13594003f, 0.15675339f, 0.1627451f, 1f);

            style.Colors[(int)ImGuiCol.SliderGrabActive] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 1f);

            style.Colors[(int)ImGuiCol.Button] = new Vector4(0.21946944f, 0.25307176f, 0.2627451f, 1f);

            style.Colors[(int)ImGuiCol.ButtonHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.ButtonActive] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 1f);

            style.Colors[(int)ImGuiCol.Header] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 0.76f);

            style.Colors[(int)ImGuiCol.HeaderHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 0.86f);

            style.Colors[(int)ImGuiCol.HeaderActive] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 1f);

            style.Colors[(int)ImGuiCol.Separator] = new Vector4(0.43f, 0.43f, 0.5f, 0.5f);

            style.Colors[(int)ImGuiCol.SeparatorHovered] = new Vector4(0.1f, 0.4f, 0.75f, 0.78f);

            style.Colors[(int)ImGuiCol.SeparatorActive] = new Vector4(0.1f, 0.4f, 0.75f, 1f);

            style.Colors[(int)ImGuiCol.ResizeGrip] = new Vector4(0.47f, 0.77f, 0.83f, 0.04f);

            style.Colors[(int)ImGuiCol.ResizeGripHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 0.78f);

            style.Colors[(int)ImGuiCol.ResizeGripActive] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.Tab] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.4f);

            style.Colors[(int)ImGuiCol.TabHovered] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 1f);

            style.Colors[(int)ImGuiCol.TabActive] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.TabUnfocused] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.4f);

            style.Colors[(int)ImGuiCol.TabUnfocusedActive] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.7f);

            style.Colors[(int)ImGuiCol.DockingPreview] = new Vector4(0.18292941f, 0.21093717f, 0.219f, 0.3f);

            style.Colors[(int)ImGuiCol.DockingEmptyBg] = new Vector4(0.2f, 0.2f, 0.2f, 1f);

            style.Colors[(int)ImGuiCol.PlotLines] = new Vector4(0.9999f, 1f, 0.99994284f, 0.63f);

            style.Colors[(int)ImGuiCol.PlotLinesHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.PlotHistogram] = new Vector4(0.9999f, 1f, 0.99994284f, 0.63f);

            style.Colors[(int)ImGuiCol.PlotHistogramHovered] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 1f);

            style.Colors[(int)ImGuiCol.TextSelectedBg] = new Vector4(0.1269647f, 0.14640388f, 0.152f, 0.43f);

            style.Colors[(int)ImGuiCol.DragDropTarget] = new Vector4(1f, 1f, 0f, 0.9f);

            style.Colors[(int)ImGuiCol.NavHighlight] = new Vector4(0.26f, 0.59f, 0.98f, 1f);

            style.Colors[(int)ImGuiCol.NavWindowingHighlight] = new Vector4(1f, 1f, 1f, 0.7f);

            style.Colors[(int)ImGuiCol.NavWindowingDimBg] = new Vector4(0.8f, 0.8f, 0.8f, 0.2f);

            style.Colors[(int)ImGuiCol.ModalWindowDimBg] = new Vector4(0.052410614f, 0.060435046f, 0.0627451f, 0.73f);
        }
Exemplo n.º 26
0
 private static void SetCherryStyle(ImGuiStylePtr style)
 {