Elaztek Developer Hub
Blamite Game Engine - blam!  00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
tagref.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
7 
8 #ifdef BLAM_EXPORTS
9 #define BLAM_EXT_API __declspec(dllexport)
10 #else
11 #define BLAM_EXT_API __declspec(dllimport)
12 #endif
13 
21 {
22 private:
23  std::vector<std::string> valid_classes;
24  int active_class_index = 0;
25  std::string active_tag_class_label = "";
26 
27  std::vector<BlamTagData*> filtered_tag_list = std::vector<BlamTagData*>();
28  int active_tag_index = 0;
29 
30 public:
31  TagReferenceField(std::string _display_name, std::string _extra_info, std::vector<std::string> _valid_classes);
32 
33  std::string GetFieldXMLString(int offset);
34  void ShowImPropertyControl();
35 };
TagReferenceField::GetFieldXMLString
std::string GetFieldXMLString(int offset)
Generates a string representing an XML node associated with this tag field, used for generating plugi...
Definition: tagref.cpp:17
BLAM_EXT_API
#define BLAM_EXT_API
Definition: tagref.h:11
ImGui::PopItemWidth
IMGUI_API void PopItemWidth()
Definition: imgui.cpp:6183
BlamTagClassField.h
tag_reference::GetTagPath
std::string GetTagPath()
Retrieves the path of the tag that this tagref refers to.
Definition: tag_reference.cpp:45
imgui.h
BlamTagClassField::display_name
std::string display_name
The display name of the tag field.
Definition: BlamTagClassField.h:31
Blam::Content::Tags::GetLoadedTags
BLAM std::vector< BlamTagData * > * GetLoadedTags()
Retrieves the list of loaded tag data.
Definition: tags.cpp:151
BlamTagClassField::GetFieldXMLString
virtual std::string GetFieldXMLString(int offset)
Generates a string representing an XML node associated with this tag field, used for generating plugi...
Definition: BlamTagClassField.cpp:32
BlamTagFieldType::TagReference
@ TagReference
Indicates that the field is a tag reference.
BlamTagData::path
char path[256]
The tag's path.
Definition: tags.h:84
Blam::Content::Tags::GetTagClass
BLAM_EXT_API BlamTagClass * GetTagClass(std::string id)
Retrieves a tag class that matches the given string.
Definition: tagclass.cpp:64
ImGui::SameLine
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
Definition: imgui.cpp:7147
BlamTagClassField
Base class representing a plugin field.
Definition: BlamTagClassField.h:28
BlamTagFieldType
BlamTagFieldType
Enumerator listing all possible plugin field types.
Definition: tags.h:30
TagReferenceField
Class representing a tag reference, or tagref for short.
Definition: tagref.h:20
Blam::Content::Tags::GetRegisteredTagClasses
BLAM_EXT_API std::vector< BlamTagClass * > * GetRegisteredTagClasses()
Retrieves the list of all registered tag classes.
Definition: tagclass.cpp:82
tagref.h
BlamTagClass::class_name_short
std::string class_name_short
The short, 4-character name of the tag class.
Definition: tags.h:135
ImGui::BeginCombo
IMGUI_API bool BeginCombo(const char *label, const char *preview_value, ImGuiComboFlags flags=0)
Definition: imgui_widgets.cpp:1416
ImGui::Selectable
IMGUI_API bool Selectable(const char *label, bool selected=false, ImGuiSelectableFlags flags=0, const ImVec2 &size=ImVec2(0, 0))
Definition: imgui_widgets.cpp:5469
tag_reference
Structure representing a tag reference.
Definition: tags.h:215
TagReferenceField::TagReferenceField
TagReferenceField(std::string _display_name, std::string _extra_info, std::vector< std::string > _valid_classes)
Definition: tagref.cpp:9
BlamTagClass::class_name_long
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tags.h:134
BlamTagClassField::read_address
void * read_address
The address of the data the field is currently representing.
Definition: BlamTagClassField.h:36
tag_reference::identifier
char identifier[4]
The tag reference identifier. Will always be trfd.
Definition: tags.h:217
tag_reference::class_name
char class_name[4]
The tag class identifier. Will be the short class name.
Definition: tags.h:219
tag_reference::data_is_tag
bool data_is_tag
Whether or not tagref_address points to tag data, or the tag's path.
Definition: tags.h:222
ImGui::EndCombo
IMGUI_API void EndCombo()
Definition: imgui_widgets.cpp:1522
BlamTagClassField::read_length
int read_length
How many bytes to read from the start of the address.
Definition: BlamTagClassField.h:37
BlamTagData::address
void * address
The address pointing to the start of the tag's data.
Definition: tags.h:71
tagclass.h
tags.h
tags.h
BlamTagData
Class used to contain and access tag data.
Definition: tags.h:68
tag_reference::tagref_address
void * tagref_address
The address of the tagref data.
Definition: tags.h:221
BlamTagClassField::ShowImPropertyControl
virtual void ShowImPropertyControl()
Shows a set of ImGUI controls representing the tag field.
Definition: BlamTagClassField.cpp:22
BlamTagClassField::extra_info
std::string extra_info
Additional information to show alongside the field.
Definition: BlamTagClassField.h:32
ImGui::PushItemWidth
IMGUI_API void PushItemWidth(float item_width)
Definition: imgui.cpp:6160
BlamTagClass
Class representing a tag class.
Definition: tags.h:131
TagReferenceField::ShowImPropertyControl
void ShowImPropertyControl()
Shows a set of ImGUI controls representing the tag field.
Definition: tagref.cpp:59
BlamTagClassField::visible
bool visible
Whether or not this field should be marked as visible within the editor.
Definition: BlamTagClassField.h:34
BlamTagData::tag_class
std::string tag_class
The tag's short class name.
Definition: tags.h:85