Skip to content

Commit d84688b

Browse files
add indent and unindent (#77)
* bump to c++23 * add indent and unindent
1 parent 070d070 commit d84688b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.21)
2-
set(CMAKE_CXX_STANDARD 20)
2+
set(CMAKE_CXX_STANDARD 23)
33
set(CMAKE_CXX_STANDARD_REQUIRED ON)
44
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "iOS" OR IOS)
55
set(CMAKE_OSX_ARCHITECTURES "arm64")

include/API.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ namespace devtools {
168168
inline void sameLine() GEODE_EVENT_EXPORT_NORES(&sameLine, ());
169169
inline void separator() GEODE_EVENT_EXPORT_NORES(&separator, ());
170170
inline void nextItemWidth(float width) GEODE_EVENT_EXPORT_NORES(&nextItemWidth, (width));
171+
inline void indent() GEODE_EVENT_EXPORT_NORES(&indent, ());
172+
inline void unindent() GEODE_EVENT_EXPORT_NORES(&unindent, ());
171173

172174
inline bool combo(
173175
char const* label,

src/API.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ void devtools::separator() {
5656
void devtools::nextItemWidth(float width) {
5757
ImGui::SetNextItemWidth(width);
5858
}
59+
void devtools::indent() {
60+
ImGui::Indent(16.f);
61+
}
62+
void devtools::unindent() {
63+
ImGui::Unindent(16.f);
64+
}
5965
bool devtools::combo(char const* label, int& current, std::span<char const*> items, int maxHeight) {
6066
return ImGui::Combo(
6167
label,

0 commit comments

Comments
 (0)