WKLib 0.2.3
A modding library for White Knuckle
Loading...
Searching...
No Matches
QuickPopupWindow.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Text;
4using Imui.Controls;
5using Imui.Core;
6
8
9internal static class QuickPopupWindow
10{
11 public static void Draw(ImGui gui, string text)
12 {
13 if (text.Trim() == string.Empty)
14 return;
15
16 var textSize = gui.MeasureTextSize(text);
17 gui.BeginWindow("Popup", new ImSize(textSize.x * 1.5f, gui.GetRowHeight() * 5f), ImWindowFlag.None);
18
19 gui.Text(text);
20
21 gui.EndWindow();
22 }
23}