载入中...
搜索中...
未找到
GameplayTagPicker.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "common/Result.h"
8#include "tags/GameplayTag.h"
9
10#include <string>
11#include <vector>
12
13namespace eve::editor {
14
18 std::string name;
19 std::string description;
20 std::size_t depth = 0;
21 bool hasChildren = false;
22};
23
32public:
34 explicit GameplayTagPicker(const tags::GameplayTagRegistry& registry) : registry_(registry) {}
35
37 void setFilter(std::string filter) { filter_ = std::move(filter); }
39 [[nodiscard]] Result<void> setRoot(std::string root);
41 [[nodiscard]] Result<void> select(std::string name);
43 void clearSelection() { selected_.clear(); }
45 const std::string& selected() const noexcept { return selected_; }
47 [[nodiscard]] std::vector<GameplayTagPickerEntry> entries() const;
48
49private:
50 const tags::GameplayTagRegistry& registry_;
51 std::string filter_;
52 std::string root_;
53 std::string selected_;
54};
55
56} // namespace eve::editor
int root
Definition AnimSmr.cpp:119
std::unordered_map< std::string, QuestRuntime > entries
#define EVENGINE_API_ORCHESTRATION
Definition Export.h:111
Stable hierarchical gameplay-tag definitions and registry.
std::string name
Move-only, checked operation results for the common layer.
std::string filter
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Searchable selection model shared by developer and in-game editors.
const std::string & selected() const noexcept
Return the selected canonical name, or empty.
void clearSelection()
Clear the current selection.
GameplayTagPicker(const tags::GameplayTagRegistry &registry)
Construct a picker borrowing the canonical registry.
void setFilter(std::string filter)
Set a case-insensitive name/description filter.
Canonical owner of versioned gameplay-tag definitions.
Definition GameplayTag.h:49
Owning row projected for tree/list UI implementations.