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

r432:d1b7c709e384 -

@@ -204,111 +204,106
204 204 }
205 205
206 206
207 public virtual void Layout(DebugInfo debugInfo, Dictionary<String, String> additionalInfo, ref bool show)
208 {
207 public virtual void Layout(DebugInfo debugInfo, Dictionary<String, String> additionalInfo, ref bool show)
208 {
209 209
210 if (show)
211 {
212 ImGui.Begin("Debug", ref show);
210 if (show)
211 {
212 ImGui.Begin("Debug", ref show);
213 213
214 if (ImGui.BeginTabBar("DebugTabs"))
215 {
216 if(ImGui.BeginTabItem("Debug"))
217 {
218
219 ImGui.Text(string.Format("fps: {0:F3}", debugInfo.fps));
220 ImGui.Text(string.Format("Draw Time: {0:F3}", debugInfo.drawTime.TotalMilliseconds.ToString()));
221 ImGui.Text(string.Format("Update Time: {0:F3}", debugInfo.updateTime.TotalMilliseconds.ToString()));
222 ImGui.Text(string.Format("Tiles Drawn: {0:F}", debugInfo.tilesDrawn));
214 if (ImGui.BeginTabBar("DebugTabs"))
215 {
216 if(ImGui.BeginTabItem("Debug"))
217 {
223 218
224
225 ImGui.Text(string.Format("\nCamera Position: {0}", debugInfo.cameraPosition.ToString()));
226 ImGui.Text(string.Format("\nGrid Position: {0} (has tree: {1})", debugInfo.mouseGrid.ToString(), debugInfo.hasTree));
227
228 ImGui.Text(string.Format("Application average {0:F3} ms/frame ({1:F1} FPS", 1000f / ImGui.GetIO().Framerate, ImGui.GetIO().Framerate));
229
219 ImGui.Text(string.Format("fps: {0:F3}", debugInfo.fps));
220 ImGui.Text(string.Format("Draw Time: {0:F3}", debugInfo.drawTime.TotalMilliseconds.ToString()));
221 ImGui.Text(string.Format("Update Time: {0:F3}", debugInfo.updateTime.TotalMilliseconds.ToString()));
222 ImGui.Text(string.Format("Tiles Drawn: {0:F}", debugInfo.tilesDrawn));
230 223
231 224
232 if (ImGui.Button("Test Window"))
233 {
234 this.show_test_window = !this.show_test_window;
235 }
225 ImGui.Text(string.Format("\nCamera Position: {0}", debugInfo.cameraPosition.ToString()));
226 ImGui.Text(string.Format("\nGrid Position: {0} (has tree: {1})", debugInfo.mouseGrid.ToString(), debugInfo.hasTree));
227
228 ImGui.Text(string.Format("Application average {0:F3} ms/frame ({1:F1} FPS", 1000f / ImGui.GetIO().Framerate, ImGui.GetIO().Framerate));
236 229
237 if (ImGui.Button("Test Logging"))
238 {
239 Logging.Log(LogLevel.Critical, "Test");
240 Logging.Log(LogLevel.Error, "Test");
241 Logging.Log(LogLevel.Warning, "Test");
242 Logging.Log(LogLevel.Info, "Test");
243 Logging.Log(LogLevel.Debug, "Test");
244 Logging.Log(LogLevel.Trace, "Test");
230 if (ImGui.Button("Test Window"))
231 {
232 this.show_test_window = !this.show_test_window;
233 }
245 234
246 Logging.Critical("Test");
247 Logging.Error("Test");
248 Logging.Warning("Test");
249 Logging.Success("Test");
250 Logging.Info("Test");
251 Logging.Debug("Test");
252 Logging.Trace("Test");
235 if (ImGui.Button("Test Logging"))
236 {
237 Logging.Log(LogLevel.Critical, "Test");
238 Logging.Log(LogLevel.Error, "Test");
239 Logging.Log(LogLevel.Warning, "Test");
240 Logging.Log(LogLevel.Info, "Test");
241 Logging.Log(LogLevel.Debug, "Test");
242 Logging.Log(LogLevel.Trace, "Test");
253 243
254 // var t = (testa: 1, testb: 2);
255 //Logging.Log(LogLevel.Critical, "Test", t);
256 Logging.Log(LogLevel.Critical, "test", new{test=9.0f});
257 //Logging.Log(LogLevel.Critical, "{0}", 0, null, "", 9.0f);
244 Logging.Critical("Test");
245 Logging.Error("Test");
246 Logging.Warning("Test");
247 Logging.Success("Test");
248 Logging.Info("Test");
249 Logging.Debug("Test");
250 Logging.Trace("Test");
258 251
259 Logging.Spy(new {debugInfo.cameraPosition, debugInfo.updateTime, test = 9.0f /2});
252 // var t = (testa: 1, testb: 2);
253 //Logging.Log(LogLevel.Critical, "Test", t);
254 Logging.Log(LogLevel.Critical, "test", new{test=9.0f});
255 //Logging.Log(LogLevel.Critical, "{0}", 0, null, "", 9.0f);
260 256
261 }
257 Logging.Spy(new {debugInfo.cameraPosition, debugInfo.updateTime, test = 9.0f /2});
258
259 }
262 260
263 if (ImGui.BeginCombo("Log Level", Logging.minimumConsoleLevel.ToString()))
264 {
265 foreach(LogLevel level in LogLevel.GetValues(typeof(LogLevel)))
266 {
267 if(ImGui.Selectable(level.ToString()))
268 {
269 Logging.minimumConsoleLevel = level;
270 }
271 }
272 ImGui.EndCombo();
273 }
261 if (ImGui.BeginCombo("Log Level", Logging.minimumConsoleLevel.ToString()))
262 {
263 foreach(LogLevel level in LogLevel.GetValues(typeof(LogLevel)))
264 {
265 if(ImGui.Selectable(level.ToString()))
266 {
267 Logging.minimumConsoleLevel = level;
268 }
269 }
270 ImGui.EndCombo();
271 }
274 272
275 if (debugInfo.pastFps.Length >= 1)
276 {
277 ImGui.PlotLines("Frame Rate", ref debugInfo.pastFps[0], debugInfo.pastFps.Length);
278 }
279 ImGui.EndTabItem();
280 }
281 if(ImGui.BeginTabItem("Additional Info"))
282 {
283 foreach (string k in additionalInfo.Keys)
284 {
285 ImGui.Text(string.Format("{0}: {1}", k, additionalInfo[k]));
286 }
273 if (debugInfo.pastFps.Length >= 1)
274 {
275 ImGui.PlotLines("Frame Rate", ref debugInfo.pastFps[0], debugInfo.pastFps.Length);
276 }
277 ImGui.EndTabItem();
278 }
279 if(ImGui.BeginTabItem("Additional Info"))
280 {
281 foreach (string k in additionalInfo.Keys)
282 {
283 ImGui.Text(string.Format("{0}: {1}", k, additionalInfo[k]));
284 }
287 285
288 ImGui.EndTabItem();
289 }
286 ImGui.EndTabItem();
287 }
290 288
291 if(ImGui.BeginTabItem("Texture Samples"))
292 {
293
294 ImGui.Text("Texture sample");
295 ImGui.Image(_imGuiTexture, new Num.Vector2(250, 200), map.GetSourceUVStart(1), map.GetSourceUVEnd(1), Num.Vector4.One, Num.Vector4.One); // Here, the previously loaded texture is used
296 ImGui.Image(_imGuiTexture, new Num.Vector2(250, 200), map.GetSourceUVStart(4), map.GetSourceUVEnd(4), Num.Vector4.One, Num.Vector4.One); // Here, the previously loaded texture is used
289 if(ImGui.BeginTabItem("Texture Samples"))
290 {
291 ImGui.Text("Texture sample");
292 ImGui.Image(_imGuiTexture, new Num.Vector2(250, 200), map.GetSourceUVStart(1), map.GetSourceUVEnd(1), Num.Vector4.One, Num.Vector4.One); // Here, the previously loaded texture is used
293 ImGui.Image(_imGuiTexture, new Num.Vector2(250, 200), map.GetSourceUVStart(4), map.GetSourceUVEnd(4), Num.Vector4.One, Num.Vector4.One); // Here, the previously loaded texture is used
297 294
298 ImGui.EndTabItem();
299 }
300 ImGui.EndTabBar();
301 ImGui.End();
302 }
295 ImGui.EndTabItem();
296 }
297 ImGui.EndTabBar();
298 ImGui.End();
299 }
303 300
304 if (this.show_test_window)
305 {
306 ImGui.SetNextWindowPos(new Num.Vector2(650, 20), ImGuiCond.FirstUseEver);
307 ImGui.ShowDemoWindow(ref show_test_window);
308 }
309 }
310
311
312 }
313 }
301 if (this.show_test_window)
302 {
303 ImGui.SetNextWindowPos(new Num.Vector2(650, 20), ImGuiCond.FirstUseEver);
304 ImGui.ShowDemoWindow(ref show_test_window);
305 }
306 }
307 }
308 }
314 309 }
You need to be logged in to leave comments. Login now