Skip to content

Commit

Permalink
feat: deliberately trigger assertions to test debugging helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
stergiotis committed Mar 22, 2024
1 parent 58e7c54 commit 81aed03
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions public/imzero/demo/assert.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//go:build !bootstrap

package demo

import "github.com/stergiotis/boxer/public/imzero/imgui"

func RenderAssertDemo() {
if imgui.Button("trigger assertion in ImGui::EndFrame(...)") {
imgui.End()
}
if imgui.Button("trigger immediate assertion") {
imgui.PopStyleColor()
}
}
6 changes: 6 additions & 0 deletions public/imzero/demo/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ func menu(app *application.Application, beginMenu func(name string) bool, endMen
}
endMenu()
}
if beginMenu("Development") {
if menuItem(nerdfont.FaBomb + " Assertions") {
render = RenderAssertDemo
}
endMenu()
}

if beginMenu("FFFI") {
if beginMenu("Sub sub\nmenu") {
Expand Down

0 comments on commit 81aed03

Please sign in to comment.