 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
3 #include "../../debug_ui.h"
19 bool show_comments =
false;
26 void GenerateConfigurationSettingControl(BlamConfigurationSetting* setting)
28 switch (setting->type)
30 case BlamConfigurationSettingType::Boolean:
40 case BlamConfigurationSettingType::Color:
42 ImVec4 color =
ImVec4(setting->AsColor()->GetRedAsFloat(), setting->AsColor()->GetGreenAsFloat(), setting->AsColor()->GetBlueAsFloat(), setting->AsColor()->GetAlphaAsFloat());
46 setting->AsColor()->r =
color.x * 255;
47 setting->AsColor()->g =
color.y * 255;
48 setting->AsColor()->b =
color.z * 255;
49 setting->AsColor()->a =
color.w * 255;
63 case BlamConfigurationSettingType::Comment:
80 void GenerateConfigurationSectionControl(BlamConfigurationSection* section)
82 std::vector<BlamConfigurationSetting*> settings_to_show = std::vector<BlamConfigurationSetting*>();
84 std::map<std::string, BlamConfigurationSetting*>::iterator
it;
86 for (
it = section->settings.begin();
it != section->settings.end();
it++)
88 if (
it->second->type == BlamConfigurationSettingType::Comment)
92 settings_to_show.push_back(
it->second);
97 settings_to_show.push_back(
it->second);
101 if (settings_to_show.size() > 0)
105 for (
int i = 0; i < settings_to_show.size(); i++)
107 GenerateConfigurationSettingControl(settings_to_show.at(i));
125 std::map<std::string, BlamConfigurationFile*>::iterator
it;
127 for (
it = config_files->begin();
it != config_files->end();
it++)
129 BlamConfigurationFile* config_file =
it->second;
131 if (
ImGui::BeginTabItem(BlamStrings::Utils::IO::GetFileName(config_file->filename).c_str()))
135 config_file->Reload();
149 std::map<std::string, BlamConfigurationSection*>::iterator sit;
151 for (sit = config_file->sections.begin(); sit != config_file->sections.end(); sit++)
153 GenerateConfigurationSectionControl(sit->second);
@ Int
Represents an int.
Definition: globals.h:49
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
IMGUI_API bool InputText(const char *label, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3068
IMGUI_API void End()
Definition: imgui.cpp:6016
IMGUI_API void EndTabItem()
Definition: imgui_widgets.cpp:6851
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
@ ImGuiTabBarFlags_NoTooltip
Definition: imgui.h:840
@ String
Represents a std::string.
Definition: globals.h:48
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
IMGUI_API bool CollapsingHeader(const char *label, ImGuiTreeNodeFlags flags=0)
Definition: imgui_widgets.cpp:5422
@ Float
Represents a float.
Definition: globals.h:50
Class for the modern Config Editor.
Definition: config_editor.hpp:16
IMGUI_API bool BeginTabBar(const char *str_id, ImGuiTabBarFlags flags=0)
Definition: imgui_widgets.cpp:6366
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: debug_ui.h:362
BLAM std::map< std::string, BlamConfigurationFile * > * GetConfigurationFiles()
Definition: config.cpp:116
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
IMGUI_API void EndTabBar()
Definition: imgui_widgets.cpp:6432
IMGUI_API bool ColorEdit4(const char *label, float col[4], ImGuiColorEditFlags flags=0)
Definition: imgui_widgets.cpp:4154
Legacy namespace to contain data for the legacy ImGUI console.
Definition: ui.h:26
void Draw()
Draws the contents of the group.
Definition: config_editor.hpp:115
IMGUI_API void TextColored(const ImVec4 &col, const char *fmt,...) IM_FMTARGS(2)
Definition: imgui_widgets.cpp:257
IMGUI_API bool InputFloat(const char *label, float *v, float step=0.0f, float step_fast=0.0f, const char *format="%.3f", ImGuiInputTextFlags flags=0)
Definition: imgui_widgets.cpp:2975
IMGUI_API bool BeginTabItem(const char *label, bool *p_open=NULL, ImGuiTabItemFlags flags=0)
Definition: imgui_widgets.cpp:6829
IMGUI_API void TextDisabled(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:272
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:644
IMGUI_API bool InputInt(const char *label, int *v, int step=1, int step_fast=100, ImGuiInputTextFlags flags=0)
Definition: imgui_widgets.cpp:3031