Something went wrong. Try again.
art software for the rest of us
drawing paint image sdl art
Something went wrong. Try again.
345 B · 20 lines
C++
123456789101112131415161718192021#include "Scale.h"
// Static member initializations - all at the topstatic float uiScale = 1.0f;
void UI::SetScale(float scale) { if (scale <= 0.0f) { uiScale = 1.0f; return; } uiScale = scale;}
float UI::GetScale() { return uiScale;}
float UI::PixelsToUnits(float pixels) { return pixels / uiScale;}