 |
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"
5 #include <Strings/components/utils/string/string.h>
18 char search_buffer[128];
19 bool use_columns =
true;
20 std::string current_string_id =
"";
22 void GenerateStringControl(BlamEngineString
string)
24 ImGui::PushID(std::string(
"#_stringedit_" +
string.
id).c_str());
43 std::map<std::string, BlamEngineString>::iterator
it;
45 std::string search_filter = std::string(search_buffer);
54 for (
it = strings->begin();
it != strings->end();
it++)
56 bool is_active_item =
false;
57 bool matches_filter =
false;
59 if (
it->first == current_string_id)
61 is_active_item =
true;
64 if (BlamStrings::Utils::String::Contains(
it->second.id, search_filter) || search_filter.length() == 0
65 || BlamStrings::Utils::String::Contains(
it->second.text, search_filter))
67 matches_filter =
true;
74 current_string_id =
it->first;
95 for (
it = strings->begin();
it != strings->end();
it++)
97 bool matches_filter =
false;
99 if (BlamStrings::Utils::String::Contains(
it->second.id, search_filter) || search_filter.length() == 0
100 || BlamStrings::Utils::String::Contains(
it->second.text, search_filter))
102 matches_filter =
true;
107 GenerateStringControl(
it->second);
@ ImGuiInputTextFlags_ReadOnly
Definition: imgui.h:769
IMGUI_API bool Checkbox(const char *label, bool *v)
Definition: imgui_widgets.cpp:974
IMGUI_API void ListBoxFooter()
Definition: imgui_widgets.cpp:5668
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 NextColumn()
Definition: imgui_widgets.cpp:7445
BLAM float * GetGlobalAsFloat(std::string name)
Retrieves a global's value as a float.
Definition: globals.cpp:407
IMGUI_API void End()
Definition: imgui.cpp:6016
IMGUI_API void SetColumnWidth(int column_index, float width)
Definition: imgui_widgets.cpp:7297
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
Definition: imgui.cpp:5397
BLAM bool StringExists(std::string id)
Looks through the list of loaded engine strings to see if a given string has been loaded.
Definition: engine_text.cpp:70
IMGUI_API float GetColumnWidth(int column_index=-1)
Definition: imgui_widgets.cpp:7262
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
bool show
Controls whether or not the group should be shown. May not be used in all groups.
Definition: debug_ui.h:362
IMGUI_API bool InputTextWithHint(const char *label, const char *hint, char *buf, size_t buf_size, ImGuiInputTextFlags flags=0, ImGuiInputTextCallback callback=NULL, void *user_data=NULL)
Definition: imgui_widgets.cpp:3079
Class representing an ImGUI drawing group/draw list item.
Definition: debug_ui.h:359
IMGUI_API void Columns(int count=1, const char *id=NULL, bool border=true)
Definition: imgui_widgets.cpp:7572
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 PopID()
Definition: imgui.cpp:7026
BLAM std::map< std::string, BlamEngineString > * GetEngineStrings()
Retrieves the list of all loaded engine strings.
Definition: engine_text.cpp:60
IMGUI_API void TextWrapped(const char *fmt,...) IM_FMTARGS(1)
Definition: imgui_widgets.cpp:287
Class for the engine Globals editor.
Definition: engine_text_viewer.hpp:15
#define ENGINE_TEXT(string_id)
Definition: engine_text.h:7
void Draw()
Draws the contents of the group.
Definition: engine_text_viewer.hpp:30
IMGUI_API void Separator()
Definition: imgui_widgets.cpp:1284
Legacy namespace to contain data for the legacy ImGUI console.
Definition: ui.h:26
IMGUI_API void PushID(const char *str_id)
Definition: imgui.cpp:6995
IMGUI_API bool ListBoxHeader(const char *label, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5614