table ahead
This commit is contained in:
parent
fbefc22ee3
commit
6238459476
|
@ -111,11 +111,19 @@ internal class Write : ITab {
|
||||||
var lineHeight = ImGui.CalcTextSize("A").Y;
|
var lineHeight = ImGui.CalcTextSize("A").Y;
|
||||||
var imageHeight = lineHeight * 4;
|
var imageHeight = lineHeight * 4;
|
||||||
|
|
||||||
|
var actualText = string.Empty;
|
||||||
|
|
||||||
|
if (ImGui.BeginTable("##message-preview", 2)) {
|
||||||
|
ImGui.TableSetupColumn("##image", ImGuiTableColumnFlags.WidthFixed);
|
||||||
|
ImGui.TableSetupColumn("##message", ImGuiTableColumnFlags.WidthStretch);
|
||||||
|
ImGui.TableNextRow();
|
||||||
|
|
||||||
|
if (ImGui.TableSetColumnIndex(0)) {
|
||||||
var glyphImage = this.GlyphImages[this._glyph];
|
var glyphImage = this.GlyphImages[this._glyph];
|
||||||
ImGui.Image(glyphImage.ImGuiHandle, new Vector2(imageHeight));
|
ImGui.Image(glyphImage.ImGuiHandle, new Vector2(imageHeight));
|
||||||
|
}
|
||||||
|
|
||||||
var actualText = string.Empty;
|
if (ImGui.TableSetColumnIndex(1) && this._part1 != -1) {
|
||||||
if (this._part1 != -1) {
|
|
||||||
var preview = new StringBuilder();
|
var preview = new StringBuilder();
|
||||||
|
|
||||||
var template1 = pack.Templates[this._part1];
|
var template1 = pack.Templates[this._part1];
|
||||||
|
@ -143,10 +151,13 @@ internal class Write : ITab {
|
||||||
|
|
||||||
actualText = preview.ToString();
|
actualText = preview.ToString();
|
||||||
var actualSize = ImGui.CalcTextSize(actualText);
|
var actualSize = ImGui.CalcTextSize(actualText);
|
||||||
ImGui.SameLine(0, imageHeight / 2 - actualSize.Y / 2);
|
ImGui.Dummy(new Vector2(1, imageHeight / 2 - actualSize.Y / 2));
|
||||||
ImGui.TextUnformatted(actualText);
|
ImGui.TextUnformatted(actualText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.EndTable();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
DrawPicker("Template##part-1", pack.Templates, ref this._part1);
|
DrawPicker("Template##part-1", pack.Templates, ref this._part1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user