mirror of
https://github.com/bloeys/nterm.git
synced 2025-12-29 14:38:19 +00:00
Remove some stuff
This commit is contained in:
46
main.go
46
main.go
@ -21,7 +21,6 @@ import (
|
|||||||
"github.com/bloeys/nterm/consts"
|
"github.com/bloeys/nterm/consts"
|
||||||
"github.com/bloeys/nterm/glyphs"
|
"github.com/bloeys/nterm/glyphs"
|
||||||
"github.com/golang/freetype/truetype"
|
"github.com/golang/freetype/truetype"
|
||||||
"github.com/inkyblackness/imgui-go/v4"
|
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
"golang.org/x/exp/constraints"
|
"golang.org/x/exp/constraints"
|
||||||
"golang.org/x/image/font"
|
"golang.org/x/image/font"
|
||||||
@ -74,9 +73,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
isDrawingBounds = false
|
// isDrawingBounds = false
|
||||||
drawManyLines = false
|
drawManyLines = false
|
||||||
drawGrid bool
|
drawGrid bool
|
||||||
|
|
||||||
textToShow = ""
|
textToShow = ""
|
||||||
textColor = gglm.NewVec4(1, 1, 1, 1)
|
textColor = gglm.NewVec4(1, 1, 1, 1)
|
||||||
@ -428,31 +427,30 @@ func (p *program) DebugUpdate() {
|
|||||||
if input.KeyDown(sdl.K_LCTRL) && input.KeyClicked(sdl.K_SPACE) {
|
if input.KeyDown(sdl.K_LCTRL) && input.KeyClicked(sdl.K_SPACE) {
|
||||||
drawGrid = !drawGrid
|
drawGrid = !drawGrid
|
||||||
}
|
}
|
||||||
return
|
|
||||||
|
|
||||||
//UI
|
// //UI
|
||||||
imgui.InputText("", &textToShow)
|
// imgui.InputText("", &textToShow)
|
||||||
|
|
||||||
if imgui.Button("Print Runs") {
|
// if imgui.Button("Print Runs") {
|
||||||
runs := make([]glyphs.TextRun, 0, 20)
|
// runs := make([]glyphs.TextRun, 0, 20)
|
||||||
p.GlyphRend.GetTextRuns([]rune(textToShow), &runs)
|
// p.GlyphRend.GetTextRuns([]rune(textToShow), &runs)
|
||||||
for _, run := range runs {
|
// for _, run := range runs {
|
||||||
fmt.Printf("%s; runes: %#x\n\n", string(run.Runes), run.Runes)
|
// fmt.Printf("%s; runes: %#x\n\n", string(run.Runes), run.Runes)
|
||||||
}
|
// }
|
||||||
fmt.Printf("----------------\n")
|
// fmt.Printf("----------------\n")
|
||||||
}
|
// }
|
||||||
|
|
||||||
if imgui.Checkbox("Draw Bounds", &isDrawingBounds) {
|
// if imgui.Checkbox("Draw Bounds", &isDrawingBounds) {
|
||||||
|
|
||||||
if isDrawingBounds {
|
// if isDrawingBounds {
|
||||||
p.GlyphRend.GlyphMat.SetUnifInt32("drawBounds", 1)
|
// p.GlyphRend.GlyphMat.SetUnifInt32("drawBounds", 1)
|
||||||
} else {
|
// } else {
|
||||||
p.GlyphRend.GlyphMat.SetUnifInt32("drawBounds", 0)
|
// p.GlyphRend.GlyphMat.SetUnifInt32("drawBounds", 0)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
imgui.Checkbox("Draw many", &drawManyLines)
|
// imgui.Checkbox("Draw many", &drawManyLines)
|
||||||
glyphs.PrintPositions = imgui.Button("Print positions")
|
// glyphs.PrintPositions = imgui.Button("Print positions")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *program) Render() {
|
func (p *program) Render() {
|
||||||
|
|||||||
Reference in New Issue
Block a user