mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 21:47:40 -05:00
build: Refactor ImHexAPI into multiple separate files
This commit is contained in:
23
lib/libimhex/source/helpers/scaling.cpp
Normal file
23
lib/libimhex/source/helpers/scaling.cpp
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user