-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
226 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// | ||
// Copyright (C) Wojciech Jarosz <[email protected]>. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can | ||
// be found in the LICENSE.txt file. | ||
// | ||
|
||
#pragma once | ||
|
||
#if defined(_MSC_VER) | ||
// Make MS cmath define M_PI but not the min/max macros | ||
#define _USE_MATH_DEFINES | ||
#define NOMINMAX | ||
#endif | ||
|
||
#include <string> | ||
|
||
std::vector<std::string> split(std::string text, const std::string &delim); | ||
std::string to_lower(std::string str); | ||
std::string to_upper(std::string str); | ||
|
||
int version_major(); | ||
int version_minor(); | ||
int version_patch(); | ||
std::string version(); | ||
std::string git_hash(); | ||
std::string git_describe(); | ||
std::string build_timestamp(); | ||
std::string backend(); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "imgui.h" | ||
|
||
namespace ImGui | ||
{ | ||
|
||
inline bool ToggleButton(const char *label, bool *active) | ||
{ | ||
ImGui::PushStyleColor(ImGuiCol_Button, *active ? GetColorU32(ImGuiCol_ButtonActive) : GetColorU32(ImGuiCol_Button)); | ||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, GetColorU32(ImGuiCol_FrameBgHovered)); | ||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, GetColorU32(ImGuiCol_FrameBgActive)); | ||
|
||
bool ret; | ||
if ((ret = ImGui::Button(label))) | ||
*active = !*active; | ||
ImGui::PopStyleColor(3); | ||
return ret; | ||
} | ||
|
||
inline void Text(const string &text) | ||
{ | ||
return TextUnformatted(text.c_str()); | ||
} | ||
|
||
// return true when activated. | ||
inline bool MenuItem(const string &label, const string &shortcut = "", bool selected = false, bool enabled = true) | ||
{ | ||
return MenuItem(label.c_str(), shortcut.c_str(), selected, enabled); | ||
} | ||
|
||
// return true when activated + toggle (*p_selected) if p_selected != NULL | ||
inline bool MenuItem(const string &label, const string &shortcut, bool *p_selected, bool enabled = true) | ||
{ | ||
return MenuItem(label.c_str(), shortcut.c_str(), p_selected, enabled); | ||
} | ||
|
||
} // namespace ImGui |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.