Merge pull request #14848 from iota97/dpad-size-fix

Fix DPAD size calculation
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-11-20 15:58:56 +01:00
commit 20c3c8f291
2 files changed
+14 -8

No files matched your search

+2 -2
View File
@@ -273,8 +273,8 @@ public:
void GetContentDimensions(const UIContext &dc, float &w, float &h) const override {
const AtlasImage *image = dc.Draw()->GetAtlas()->getImage(ImageID("I_DIR"));
w = 2 * D_pad_Radius * spacing_ + image->w * scale_;
h = 2 * D_pad_Radius * spacing_ + image->h * scale_;
w = 2.0f * D_pad_Radius * spacing_ + image->w * scale_;
h = w;
};
float GetSpacing() const override { return spacing_; }