Description:
Improve resizing.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r317:c6e295d52c0f -

@@ -18,15 +18,19
18 18 /*ImFontPtr smallFont, GameBridgeEngine bridgeEngine */ //, ref bool quit, ref bool paused, ref int rate, ref bool showBudget, string header
19 19 )
20 20 {
21 //Has to go first so the measurement is correct:
22 ImGui.PushFont(font);
21 23
22 24 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None;
23 25 bool newShow = true;
24 Num.Vector2 button_size = new Num.Vector2(80, 20);
26
27 Num.Vector2 text_size = ImGui.CalcTextSize("Quit to Main Menu");
28 Num.Vector2 button_size = new Num.Vector2((int)text_size.X*1.1f,
29 (int)text_size.Y*1.25f+5);
30
25 31 StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars);
26 32 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
27 33
28 ImGui.PushFont(font);
29 // ImGui.PushFont(smallFont);
30 34 ImGui.Begin("##Toolbar", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar);
31 35
32 36 if (ImGui.Button("New Game", button_size))
@@ -46,13 +46,13
46 46 // ImGui.PushFont(smallFont);
47 47 //
48 48 // ImGui.SetNextWindowSize(new Num.Vector2(320, 320));
49 if(ForestWindow.hadFocus)
49 if(OptionsWindow.hadFocus)
50 50 {
51 51 ImGui.PushStyleColor(ImGuiCol.Text, StyleSet.white);
52 52 }
53 53 ImGui.Begin("Options", ref newShow, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse);
54 54
55 if (ForestWindow.hadFocus)
55 if (OptionsWindow.hadFocus)
56 56 {
57 57 ImGui.PopStyleColor();
58 58 }
You need to be logged in to leave comments. Login now