Comments (8)
I've already had a look at https://github.com/YannickL/CCControlExtension/issues/17β¦ I do not use '-hd' suffixes in the sprite name and it can't be due to rotated sprite frames as the button shown above is not rotated in the sprite sheet.
from cccontrolextension.
Hi Ryan,
Is the texture you shown is present in your sprite sheet or not at all?
I'm sorry I'll not be available before the beginning of the next week to check the code. :(
from cccontrolextension.
Thanks for getting back quickly, it's really appreciated :)
I've made it work by adding a -hd suffix to the sprite sheet and the sprites inside it⦠maybe something was making it look for a non-hd version? It was included in the sprite sheet :)
However I have other issues, one where the label is displayed to the right of a sprite, and another where the sprite is not scaled correctly to fit a label.
No worries :)
Thanks.
from cccontrolextension.
Just to expand on my earlier points:
It appears the label was placed towards the right of the sprite (and generally incorrectly in most instances) due to calling 'setEnabled' then calling 'needsLayout' - which I believe was causing a mis-placement of the objects. After removing the 'setEnabled' calls from my game's code it showed the objects correctly. This also fixed an issue where the button's contentSize & boundingBox was abnormally larger than the actual button, which was affecting the touch-detection on the button.
I have still not been able to find a solution or possible cause for when the sprite is not scaled up to fit the text.
I will be more than happy to send some example code over, just possibly not publicly.
Thanks for your time.
from cccontrolextension.
@CodeMonkeyzDevelopment Sorry for the late.
Yes It would be really helpful (and quicker) if you could send me some example code (contact (at) yannickloriot.com). π
I'll check that. Thank you!
from cccontrolextension.
HI @CodeMonkeyzDevelopment,
Sorry for the late. I just apply some fixes for your issues. I have to clean the code, but it should works now.
For your button just set the adjustBackgroundImage
flag to NO
because you have no label and so if the flag is activated the background image will try to fit the label which has no size (CGSizeZero
). :)
from cccontrolextension.
Awesome, no worries :D
Thanks for the new code :) I didn't realise that boolean existed, I've begun using it and it all works :D Thank you so much! :)
from cccontrolextension.
Thank you too for your code, it really helps me for debugging. π
from cccontrolextension.
Related Issues (20)
- progressSprite + SpriteFrame HOT 1
- spriteWithSpriteFrameName not working HOT 8
- Deprecated methods HOT 2
- CCScale9Sprite - Trim Support? HOT 1
- -[CCSprite initWithTexture:rect:rotated:]: unrecognized selector sent to instance
- initWithSpriteFrameName:capInsets: should stretch only its SpriteFrame. HOT 3
- Warnings when compiling with Cocos2d HOT 2
- CCControlButton does not catch touches when in hud layer HOT 2
- potentiometerButton-ipad HOT 1
- double psot
- Feature request: action blocks HOT 2
- CCControlPotentiometer doesn't honor anchorPoint
- Changing defaultTouchPriority for CCControlColourPicker does not propagate to children controls
- Problem with CCControlSwitch HOT 2
- CCControlSwitch problem when setting CC_ENABLE_GL_STATE_CACHE to 1
- CCSlider problems HOT 9
- CCControlSwitch + cocos2d-x + mask HOT 2
- color control problem HOT 3
- LLVM GCC 4.2 Comiler HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cccontrolextension.