how about this

This commit is contained in:
Anna 2022-09-06 03:46:21 -04:00
parent d66aa96bb3
commit 492a583723
2 changed files with 11 additions and 5 deletions

View File

@ -68,7 +68,7 @@
<EmbeddedResource Include="../server/packs/*.yaml" LinkBase="packs"/> <EmbeddedResource Include="../server/packs/*.yaml" LinkBase="packs"/>
<EmbeddedResource Remove="../server/packs/*_old*.yaml"/> <EmbeddedResource Remove="../server/packs/*_old*.yaml"/>
<EmbeddedResource Include="vfx/b0941trp1*_o.avfx"/> <EmbeddedResource Include="vfx/b0941trp1*_o.avfx"/>
<EmbeddedResource Include="img/sign_*.png"/> <EmbeddedResource Include="img/sign_*.jpg"/>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -108,10 +108,14 @@ internal class Write : ITab {
var pack = Pack.All.Value[this._pack]; var pack = Pack.All.Value[this._pack];
var lineHeight = ImGui.CalcTextSize("A").Y;
var imageHeight = lineHeight * 4;
var glyphImage = this.GlyphImages[this._glyph];
ImGui.Image(glyphImage.ImGuiHandle, new Vector2(imageHeight));
var actualText = string.Empty; var actualText = string.Empty;
if (this._part1 == -1) { if (this._part1 != -1) {
ImGui.TextUnformatted(placeholder);
} else {
var preview = new StringBuilder(); var preview = new StringBuilder();
var template1 = pack.Templates[this._part1]; var template1 = pack.Templates[this._part1];
@ -138,6 +142,8 @@ internal class Write : ITab {
} }
actualText = preview.ToString(); actualText = preview.ToString();
var actualSize = ImGui.CalcTextSize(actualText);
ImGui.SameLine(0, imageHeight / 2 - actualSize.Y / 2);
ImGui.TextUnformatted(actualText); ImGui.TextUnformatted(actualText);
} }
@ -169,7 +175,7 @@ internal class Write : ITab {
ImGui.BeginTooltip(); ImGui.BeginTooltip();
var image = this.GlyphImages[i]; var image = this.GlyphImages[i];
ImGui.Image(image.ImGuiHandle, new Vector2(image.Width, image.Height)); ImGui.Image(image.ImGuiHandle, new Vector2(imageHeight));
ImGui.EndTooltip(); ImGui.EndTooltip();
} }