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 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];
|
||||
ImGui.Image(glyphImage.ImGuiHandle, new Vector2(imageHeight));
|
||||
}
|
||||
|
||||
var actualText = string.Empty;
|
||||
if (this._part1 != -1) {
|
||||
if (ImGui.TableSetColumnIndex(1) && this._part1 != -1) {
|
||||
var preview = new StringBuilder();
|
||||
|
||||
var template1 = pack.Templates[this._part1];
|
||||
|
@ -143,10 +151,13 @@ internal class Write : ITab {
|
|||
|
||||
actualText = preview.ToString();
|
||||
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.EndTable();
|
||||
}
|
||||
|
||||
ImGui.Separator();
|
||||
|
||||
DrawPicker("Template##part-1", pack.Templates, ref this._part1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user