mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
rename keycode, mousecode enumerations
This commit is contained in:
parent
9843a1fc27
commit
881edb7b28
22 changed files with 160 additions and 154 deletions
|
|
@ -42,13 +42,13 @@ public:
|
|||
: Setting(format), initial(value), value(value) {
|
||||
}
|
||||
|
||||
observer_handler observe(consumer<T> callback, bool callOnStart = false) {
|
||||
ObserverHandler observe(consumer<T> callback, bool callOnStart = false) {
|
||||
const int id = nextid++;
|
||||
observers.emplace(id, callback);
|
||||
if (callOnStart) {
|
||||
callback(value);
|
||||
}
|
||||
return observer_handler([this, id]() {
|
||||
return ObserverHandler([this, id]() {
|
||||
observers.erase(id);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue