build: Refactor ImHexAPI into multiple separate files

This commit is contained in:
WerWolv
2025-08-14 20:16:40 +02:00
parent 4ca429e389
commit d920718b44
144 changed files with 1211 additions and 1067 deletions

View File

@@ -0,0 +1,23 @@
#include <hex/helpers/scaling.hpp>
#include <hex/api/imhex_api/system.hpp>
namespace hex {
float operator""_scaled(long double value) {
return value * ImHexApi::System::getGlobalScale();
}
float operator""_scaled(unsigned long long value) {
return value * ImHexApi::System::getGlobalScale();
}
ImVec2 scaled(const ImVec2 &vector) {
return vector * ImHexApi::System::getGlobalScale();
}
ImVec2 scaled(float x, float y) {
return ImVec2(x, y) * ImHexApi::System::getGlobalScale();
}
}