问题
I need a input text filed with:
- background image
- text aligned to center
- text color, shadow and shadow color options
But I cannot find and appropriate one. I have investigated and found:
cocos2d::extension::EditBox
which has 1, but 2 and 3 are missing as I understandcocos2d::TextFieldTTF
ui::UICCTextField
ui::TextField
The latest 3 ones don't have 2 and 3 and also are not easy to use in terms of getting input.
cocos2d::Label seams to hove what I want (I can use a sprite for background), but it is not for input. What solution suggests cocos2d-x?
回答1:
Now there is no way to do this not considering a new TextField
definition. But cocos2d-x guys are going to merge TextField with UI system and maybe at that time it will support such features. See here: http://www.cocos2d-x.org/issues/5346#change-12942
来源:https://stackoverflow.com/questions/23846780/textfield-in-cocos2d-x-3-0-with-background-image-text-alignment-and-colored-sha