mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
add get_text, set_text, get_pos, set_pos
This commit is contained in:
parent
d74b530a83
commit
501f1b568d
6 changed files with 62 additions and 1 deletions
|
|
@ -96,6 +96,14 @@ u64id_t TextsRenderer::add(std::unique_ptr<TextNote> note) {
|
|||
return uid;
|
||||
}
|
||||
|
||||
TextNote* TextsRenderer::get(u64id_t id) const {
|
||||
const auto& found = notes.find(id);
|
||||
if (found == notes.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
return found->second.get();
|
||||
}
|
||||
|
||||
void TextsRenderer::remove(u64id_t id) {
|
||||
notes.erase(id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue