Description:
Fix issues with rescaling.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r316:bf0e283a135a -

@@ -20,16 +20,22
20 20
21 21 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None;
22 22 bool newShow = true;
23 Num.Vector2 button_size = new Num.Vector2(120, 20);
23
24 //Has to go first so the measurement is correct:
25 ImGui.PushFont(font);
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);
24 30 StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars);
25 31 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
26 32
27 33
28 34 ImGui.SetNextWindowPos(new Num.Vector2(width/2, 200));
29 35
30 ImGui.PushFont(font);
36
31 37 // ImGui.PushFont(smallFont);
32 ImGui.Begin("##In-game Toolbar", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar);
38 ImGui.Begin("##In-game Toolbar", ref newShow, ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.AlwaysAutoResize);
33 39
34 40 if (ImGui.Button("Options", button_size))
35 41 {
@@ -45,11 +45,12
45 45 ImGui.PushFont(font);
46 46 // ImGui.PushFont(smallFont);
47 47 //
48 // ImGui.SetNextWindowSize(new Num.Vector2(320, 320));
48 49 if(ForestWindow.hadFocus)
49 50 {
50 51 ImGui.PushStyleColor(ImGuiCol.Text, StyleSet.white);
51 52 }
52 ImGui.Begin("Options", ref newShow, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings);
53 ImGui.Begin("Options", ref newShow, ImGuiWindowFlags.NoCollapse | ImGuiWindowFlags.NoSavedSettings | ImGuiWindowFlags.AlwaysAutoResize | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse);
53 54
54 55 if (ForestWindow.hadFocus)
55 56 {
@@ -104,7 +105,7
104 105 if (ImGui.BeginCombo("##FontSize", fontSize.ToString()))
105 106 {
106 107
107 foreach(var size in new[]{9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20})
108 foreach(var size in new[]{9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25})
108 109 {
109 110 if(ImGui.Selectable(size.ToString()))
110 111 {
You need to be logged in to leave comments. Login now