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