mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
feat: nicer colors and font
This commit is contained in:
parent
1453c2d553
commit
c95b39b6e8
4 changed files with 47 additions and 7 deletions
|
|
@ -1,4 +1,4 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup Label="Target">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
|
|
@ -14,10 +14,10 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Label="Feature">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>4.3.1.0</AssemblyVersion>
|
||||
<FileVersion>4.3.1.0</FileVersion>
|
||||
<AssemblyVersion>4.7.0.0</AssemblyVersion>
|
||||
<FileVersion>4.7.0.0</FileVersion>
|
||||
<Description>XIVLauncher addon injection</Description>
|
||||
<Version>4.3.1.0</Version>
|
||||
<Version>4.7.0.0</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DocumentationFile></DocumentationFile>
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@
|
|||
</PropertyGroup>
|
||||
<PropertyGroup Label="Feature">
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<AssemblyVersion>4.3.1.0</AssemblyVersion>
|
||||
<Version>4.3.1.0</Version>
|
||||
<FileVersion>4.3.1.0</FileVersion>
|
||||
<AssemblyVersion>4.7.0.0</AssemblyVersion>
|
||||
<Version>4.7.0.0</Version>
|
||||
<FileVersion>4.7.0.0</FileVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="Resources">
|
||||
<None Include="$(SolutionDir)/Resources/**/*" CopyToOutputDirectory="PreserveNewest" Visible="false" />
|
||||
|
|
@ -74,4 +74,9 @@
|
|||
<ProjectReference Include="..\lib\ImGuiScene\deps\SDL2-CS\SDL2-CS.csproj" />
|
||||
<ProjectReference Include="..\lib\ImGuiScene\ImGuiScene\ImGuiScene.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Update="NotoSansCJKjp-Medium.otf">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.Internal.DXGI;
|
||||
|
|
@ -115,6 +116,40 @@ namespace Dalamud.Interface
|
|||
this.scene = new RawDX11Scene(swapChain);
|
||||
this.scene.ImGuiIniPath = Path.Combine(Path.GetDirectoryName(this.dalamud.StartInfo.ConfigurationPath), "dalamudUI.ini");
|
||||
this.scene.OnBuildUI += Display;
|
||||
|
||||
var fontPathJp = Path.Combine(Path.GetDirectoryName(typeof(InterfaceManager).Assembly.Location), "NotoSansCJKjp-Medium.otf");
|
||||
Log.Verbose("FontPathJP: " + fontPathJp);
|
||||
ImGui.GetIO().Fonts.AddFontFromFileTTF(fontPathJp, 17.0f, null, ImGui.GetIO().Fonts.GetGlyphRangesJapanese());
|
||||
|
||||
ImGui.GetIO().Fonts.Build();
|
||||
|
||||
ImGui.GetStyle().GrabRounding = 3f;
|
||||
ImGui.GetStyle().FrameRounding = 4f;
|
||||
ImGui.GetStyle().WindowRounding = 4f;
|
||||
ImGui.GetStyle().WindowBorderSize = 0f;
|
||||
ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Right;
|
||||
ImGui.GetStyle().ScrollbarSize = 16f;
|
||||
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.WindowBg] = new Vector4(0.06f, 0.06f, 0.06f, 0.87f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.FrameBg] = new Vector4(0.29f, 0.29f, 0.29f, 0.54f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.FrameBgHovered] = new Vector4(0.54f, 0.54f, 0.54f, 0.40f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.FrameBgActive] = new Vector4(0.64f, 0.64f, 0.64f, 0.67f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.TitleBgActive] = new Vector4(0.29f, 0.29f, 0.29f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.CheckMark] = new Vector4(0.86f, 0.86f, 0.86f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.SliderGrab] = new Vector4(0.54f, 0.54f, 0.54f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.SliderGrabActive] = new Vector4(0.67f, 0.67f, 0.67f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.Button] = new Vector4(0.71f, 0.71f, 0.71f, 0.40f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.ButtonHovered] = new Vector4(0.47f, 0.47f, 0.47f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.ButtonActive] = new Vector4(0.74f, 0.74f, 0.74f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.Header] = new Vector4(0.59f, 0.59f, 0.59f, 0.31f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.HeaderHovered] = new Vector4(0.50f, 0.50f, 0.50f, 0.80f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.HeaderActive] = new Vector4(0.60f, 0.60f, 0.60f, 1.00f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.ResizeGrip] = new Vector4(0.79f, 0.79f, 0.79f, 0.25f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.ResizeGripHovered] = new Vector4(0.78f, 0.78f, 0.78f, 0.67f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.ResizeGripActive] = new Vector4(0.88f, 0.88f, 0.88f, 0.95f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.Tab] = new Vector4(0.23f, 0.23f, 0.23f, 0.86f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.TabHovered] = new Vector4(0.71f, 0.71f, 0.71f, 0.80f);
|
||||
ImGui.GetStyle().Colors[(int) ImGuiCol.TabActive] = new Vector4(0.36f, 0.36f, 0.36f, 1.00f);
|
||||
}
|
||||
|
||||
this.scene.Render();
|
||||
|
|
|
|||
BIN
Dalamud/NotoSansCJKjp-Medium.otf
Normal file
BIN
Dalamud/NotoSansCJKjp-Medium.otf
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue