fix circle button sprite size

This commit is contained in:
HJfod 2023-04-01 17:20:49 +03:00
parent e92541a655
commit eabb68bbcf
3 changed files with 8 additions and 3 deletions

View file

@ -1244,7 +1244,7 @@ class EditorUI : cocos2d::CCLayer, FLAlertLayerProtocol, ColorSelectDelegate, GJ
virtual void scaleChanged(float) = mac 0x25490, win 0x88df0;
virtual void scaleChangeEnded() = win 0x88de0;
void scaleObjects(cocos2d::CCArray*, float, cocos2d::CCPoint) = mac 0x252e0, win 0x8f150;
void selectObjects(cocos2d::CCArray*, bool) = mac 0x23940, win 0x864a0;
void selectObjects(cocos2d::CCArray* objs, bool ignoreFilters) = mac 0x23940, win 0x864a0;
void setupCreateMenu() = mac 0xcb50, win 0x7caf0;
void undoLastAction(cocos2d::CCObject*) = mac 0xb830, win 0x87070;
void updateButtons() = mac 0x1a300, win 0x78280;
@ -3179,8 +3179,8 @@ class GameObject : CCSpritePlus {
bool m_isEffectObject;
bool m_randomisedAnimStart;
float m_animSpeed;
bool m_blackChild;
bool m_unkOutlineMaybe;
bool m_isBlackObject;
bool m_isBlackObjectWithOutline;
float m_blackChildOpacity;
bool field_21C;
bool m_editor;

View file

@ -203,6 +203,7 @@ namespace geode {
CircleBaseColor color = CircleBaseColor::Green,
CircleBaseSize size = CircleBaseSize::Medium
);
cocos2d::CCSize getMaxTopSize() const override;
};
/**

View file

@ -303,6 +303,10 @@ DECL_BASED_CREATE_FUNS(Leaderboard);
DECL_BASED_CREATE_FUNS(Editor);
DECL_BASED_CREATE_FUNS(Category);
CCSize CircleButtonSprite::getMaxTopSize() const {
return m_obContentSize * .65f;
}
CCSize EditorButtonSprite::getMaxTopSize() const {
return m_obContentSize - CCSize { 8.f, 8.f };
}