Update ImGuiScene to 1.88 fork and fix compilation issues.

This commit is contained in:
liam 2022-06-30 00:08:31 -04:00
parent e114f8a597
commit 777779e393
5 changed files with 6 additions and 5 deletions

View file

@ -279,7 +279,7 @@ namespace Dalamud.Interface.GameFonts
{ {
var interfaceManager = Service<InterfaceManager>.Get(); var interfaceManager = Service<InterfaceManager>.Get();
var ioFonts = ImGui.GetIO().Fonts; var ioFonts = ImGui.GetIO().Fonts;
ioFonts.GetTexDataAsRGBA32(out byte* pixels8, out var width, out var height); ioFonts.GetTexDataAsRGBA32(0, out byte* pixels8, out var width, out var height);
var pixels32 = (uint*)pixels8; var pixels32 = (uint*)pixels8;
var fontGamma = interfaceManager.FontGamma; var fontGamma = interfaceManager.FontGamma;

View file

@ -462,13 +462,13 @@ namespace Dalamud.Interface.ImGuiFileDialog
if (this.pathInputActivated) if (this.pathInputActivated)
{ {
if (ImGui.IsKeyReleased(ImGui.GetKeyIndex(ImGuiKey.Enter))) if (ImGui.IsKeyReleased(ImGuiKey.Enter))
{ {
if (Directory.Exists(this.pathInputBuffer)) this.SetPath(this.pathInputBuffer); if (Directory.Exists(this.pathInputBuffer)) this.SetPath(this.pathInputBuffer);
this.pathInputActivated = false; this.pathInputActivated = false;
} }
if (ImGui.IsKeyReleased(ImGui.GetKeyIndex(ImGuiKey.Escape))) if (ImGui.IsKeyReleased(ImGuiKey.Escape))
{ {
this.pathInputActivated = false; this.pathInputActivated = false;
} }

View file

@ -171,6 +171,7 @@ namespace Dalamud.Interface
target.Value!.AddGlyph( target.Value!.AddGlyph(
target.Value!.ConfigData, target.Value!.ConfigData,
(ushort)glyph->Codepoint, (ushort)glyph->Codepoint,
0,
glyph->X0 * scale, glyph->X0 * scale,
((glyph->Y0 - source.Value!.Ascent) * scale) + target.Value!.Ascent, ((glyph->Y0 - source.Value!.Ascent) * scale) + target.Value!.Ascent,
glyph->X1 * scale, glyph->X1 * scale,

View file

@ -884,7 +884,7 @@ namespace Dalamud.Interface.Internal
if (Math.Abs(fontGamma - 1.0f) >= 0.001) if (Math.Abs(fontGamma - 1.0f) >= 0.001)
{ {
// Gamma correction (stbtt/FreeType would output in linear space whereas most real world usages will apply 1.4 or 1.8 gamma; Windows/XIV prebaked uses 1.4) // Gamma correction (stbtt/FreeType would output in linear space whereas most real world usages will apply 1.4 or 1.8 gamma; Windows/XIV prebaked uses 1.4)
ioFonts.GetTexDataAsRGBA32(out byte* texPixels, out var texWidth, out var texHeight); ioFonts.GetTexDataAsRGBA32(0, out byte* texPixels, out var texWidth, out var texHeight);
for (int i = 3, i_ = texWidth * texHeight * 4; i < i_; i += 4) for (int i = 3, i_ = texWidth * texHeight * 4; i < i_; i += 4)
texPixels[i] = (byte)(Math.Pow(texPixels[i] / 255.0f, 1.0f / fontGamma) * 255.0f); texPixels[i] = (byte)(Math.Pow(texPixels[i] / 255.0f, 1.0f / fontGamma) * 255.0f);
} }

@ -1 +1 @@
Subproject commit 5da5fb742375aba55026f3beeef05dfe876a21bd Subproject commit d48cf7ffbbb7c545a02e8dee7705d4f302217d81