Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glow-extras
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glow
glow-extras
Merge requests
!67
Add ImGui::Combo and ListBox utilities for tg::span
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add ImGui::Combo and ListBox utilities for tg::span
feature/more-imgui-utils
into
develop
Overview
0
Commits
1
Pipelines
0
Changes
2
Merged
Jonathan Kunstwald
requested to merge
feature/more-imgui-utils
into
develop
5 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
00323a8e
1 commit,
5 years ago
2 files
+
37
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
debugging/glow-extras/debugging/imgui-util.cc
+
25
−
0
Options
@@ -3,6 +3,17 @@
#include
<imgui/imgui.h>
namespace
{
bool
span_getter
(
void
*
data
,
int
i
,
const
char
**
out
)
{
if
(
i
<
0
)
return
false
;
*
out
=
static_cast
<
std
::
string
*>
(
data
)[
unsigned
(
i
)].
c_str
();
return
true
;
};
}
void
glow
::
debugging
::
applyGlowImguiTheme
(
bool
darkMode
)
{
ImGuiStyle
&
style
=
ImGui
::
GetStyle
();
@@ -144,4 +155,18 @@ void glow::debugging::applyGlowImguiTheme(bool darkMode)
#endif
}
bool
glow
::
debugging
::
imgui
::
Combo
(
char
const
*
label
,
int
*
currIndex
,
tg
::
span
<
std
::
string
>
values
)
{
if
(
values
.
empty
())
return
false
;
return
::
ImGui
::
Combo
(
label
,
currIndex
,
span_getter
,
values
.
data
(),
int
(
values
.
size
()));
}
bool
glow
::
debugging
::
imgui
::
ListBox
(
char
const
*
label
,
int
*
currIndex
,
tg
::
span
<
std
::
string
>
values
)
{
if
(
values
.
empty
())
return
false
;
return
::
ImGui
::
ListBox
(
label
,
currIndex
,
span_getter
,
values
.
data
(),
int
(
values
.
size
()));
}
#endif
Loading