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 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None;
21 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.None;
22 bool newShow = true;
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 StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars);
30 StyleSet.pushStyleVarSet(StyleSet.defaultWindowVars);
25 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
31 StyleSet.pushColorSet(StyleSet.defaultWindowColors);
26
32
27
33
28 ImGui.SetNextWindowPos(new Num.Vector2(width/2, 200));
34 ImGui.SetNextWindowPos(new Num.Vector2(width/2, 200));
29
35
30 ImGui.PushFont(font);
36
31 // ImGui.PushFont(smallFont);
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 if (ImGui.Button("Options", button_size))
40 if (ImGui.Button("Options", button_size))
35 {
41 {
@@ -45,11 +45,12
45 ImGui.PushFont(font);
45 ImGui.PushFont(font);
46 // ImGui.PushFont(smallFont);
46 // ImGui.PushFont(smallFont);
47 //
47 //
48 // ImGui.SetNextWindowSize(new Num.Vector2(320, 320));
48 if(ForestWindow.hadFocus)
49 if(ForestWindow.hadFocus)
49 {
50 {
50 ImGui.PushStyleColor(ImGuiCol.Text, StyleSet.white);
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 if (ForestWindow.hadFocus)
55 if (ForestWindow.hadFocus)
55 {
56 {
@@ -104,7 +105,7
104 if (ImGui.BeginCombo("##FontSize", fontSize.ToString()))
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 if(ImGui.Selectable(size.ToString()))
110 if(ImGui.Selectable(size.ToString()))
110 {
111 {
You need to be logged in to leave comments. Login now