Add ButtonComboAPI support

This commit is contained in:
Maschell
2024-12-18 16:11:14 +01:00
parent 6565585d18
commit cd92e47b9d
18 changed files with 1028 additions and 45 deletions

View File

@@ -4,10 +4,12 @@
#include "utils/logger.h"
StorageItem::StorageItem(const std::string_view key) : mKey(key) {
// Abuse this as a stable handle that references itself and survives std::move
*mHandle = reinterpret_cast<uint32_t>(mHandle.get());
}
uint32_t StorageItem::getHandle() const {
return reinterpret_cast<uint32_t>(this);
return *mHandle;
}
void StorageItem::setValue(const std::string &value) {

View File

@@ -1,5 +1,6 @@
#pragma once
#include <cstdint>
#include <memory>
#include <string>
#include <variant>
#include <vector>
@@ -78,4 +79,6 @@ private:
std::string mKey = {};
bool mBinaryConversionDone = true;
std::unique_ptr<uint32_t> mHandle = std::make_unique<uint32_t>();
};