Documentation
¶
Overview ¶
Package imgui_wrapper provides a basic framework for an IMGui app.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FontMono *imgui.Font
Current monospace font.
Functions ¶
Types ¶
type Options ¶
type Options struct {
// Initial window size.
WindowSize imgui.Vec2
// Minimum window size, or zero.
WindowMinSize imgui.Vec2
// Called once, after the initial
// state is determined and before any
// drawing takes place. May be nil.
OnInitWindow func(state *State) error
// Called to do various pre-frame setup.
// If anything can err, it should happen
// in here. No drawing should take place
// in here. May be nil.
OnPreDraw func(state *State) error
// Should not return an error. Control
// flow should be straight-forward and
// always reach the end.
OnDraw func(state *State)
// Drag-and-drop drop callback, or nil.
OnDrop func(paths []string)
// Make the OpenGL context a debug context.
GLDebugContext bool
}
type State ¶
type State struct {
// Target FPS, can be changed anytime seamlessly.
FrameRate float64
// GUI Scale and CJK fonts will need a bit of
// time to load after changing to a different
// value.
GUIScale float32
LoadCJKFonts bool
// contains filtered or unexported fields
}
State contains exported fields, which can be changed anytime by the callback functions to update certain settings.
Click to show internal directories.
Click to hide internal directories.