get windows further along

This commit is contained in:
matcool 2023-12-20 23:14:53 -03:00
parent baaec62bc0
commit 5c71bc9e32
48 changed files with 339 additions and 33 deletions

View file

@ -7,6 +7,9 @@
#include <utility>
#include <map>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <set>
namespace gd {
struct InternalString {
@ -41,47 +44,47 @@ namespace gd {
}
string(string const& param) : string() {
(void)this->winAssign(param.c_str(), param.size());
// (void)this->winAssign(param.c_str(), param.size());
}
string(string&& param) : string() {
(void)this->winAssign(param.c_str(), param.size());
// (void)this->winAssign(param.c_str(), param.size());
}
string(char const* param) : string() {
(void)this->winAssign(param, std::strlen(param));
// (void)this->winAssign(param, std::strlen(param));
}
string(std::string const& param) : string() {
(void)this->winAssign(param.c_str(), param.size());
// (void)this->winAssign(param.c_str(), param.size());
}
string& operator=(string const& param) {
(void)this->winAssign(param.c_str(), param.size());
// (void)this->winAssign(param.c_str(), param.size());
return *this;
}
string& operator=(string&& param) {
(void)this->winAssign(param.c_str(), param.size());
// (void)this->winAssign(param.c_str(), param.size());
return *this;
}
string& operator=(char const* param) {
(void)this->winAssign(param, std::strlen(param));
// (void)this->winAssign(param, std::strlen(param));
return *this;
}
string& operator=(std::string const& param) {
(void)this->winAssign(param.c_str(), param.size());
// (void)this->winAssign(param.c_str(), param.size());
return *this;
}
void clear() {
(void)this->winDtor();
// (void)this->winDtor();
}
~string() {
(void)this->winDtor();
// (void)this->winDtor();
}
char& at(size_t pos) {
@ -144,4 +147,13 @@ namespace gd {
template <class K, class V>
using map = std::map<K, V>;
template <class K, class V>
using unordered_map = std::unordered_map<K, V>;
template <class K>
using set = std::set<K>;
template <class K>
using unordered_set = std::unordered_set<K>;
}

View file

@ -378,6 +378,11 @@ public:
void updateContentScale(TextureQuality);
void updateScreenScale(CCSize);
void applySmoothFix();
void createStatsLabel();
void showFPSLabel();
void toggleShowFPS(bool, gd::string, cocos2d::CCPoint);
protected:
CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactor, ScreenScaleFactor);
CC_SYNTHESIZE_READONLY_NV(float, m_fScreenScaleFactorMax, ScreenScaleFactorMax);

View file

@ -145,6 +145,8 @@ class CC_DLL CCFiniteTimeAction : public CCAction
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCFiniteTimeAction, CCAction)
/**
* @js ctor
*/

View file

@ -45,6 +45,7 @@ class CC_DLL CCActionCamera : public CCActionInterval //<NSCopying>
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCActionCamera, CCActionInterval)
/**
* @js ctor
*/

View file

@ -46,6 +46,9 @@ class CC_DLL CCActionEase : public CCActionInterval
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCActionEase, CCActionInterval);
CCActionEase() {}
/**
* @js NA
* @lua NA

View file

@ -121,6 +121,9 @@ class CC_DLL CCAccelDeccelAmplitude : public CCActionInterval
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAccelDeccelAmplitude, CCActionInterval)
CCAccelDeccelAmplitude() {}
/**
* @js NA
* @lua NA
@ -152,6 +155,9 @@ class CC_DLL CCAccelAmplitude : public CCActionInterval
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCAccelAmplitude, CCActionInterval);
CCAccelAmplitude() {}
/**
* @js NA
* @lua NA
@ -182,6 +188,9 @@ class CC_DLL CCDeccelAmplitude : public CCActionInterval
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCDeccelAmplitude, CCActionInterval);
CCDeccelAmplitude() {}
/**
* @js NA
* @lua NA

View file

@ -46,6 +46,8 @@ class CC_DLL CCActionInstant : public CCFiniteTimeAction //<NSCopying>
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCActionInstant, CCFiniteTimeAction)
/**
* @js ctor
*/

View file

@ -62,6 +62,9 @@ class CC_DLL CCActionInterval : public CCFiniteTimeAction
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCActionInterval, CCFiniteTimeAction)
CCActionInterval() {}
/** how many seconds had elapsed since the actions started to run. */
inline float getElapsed(void) { return m_elapsed; }

View file

@ -70,6 +70,9 @@ class CC_DLL CCActionTween : public CCActionInterval
public:
/** creates an initializes the action with the property name (key), and the from and to parameters. */
static CCActionTween* create(float aDuration, const char* key, float from, float to);
static cocos2d::CCActionTween* create(float, int, float, float);
/** initializes the action with the property name (key), and the from and to parameters. */
bool initWithDuration(float aDuration, const char* key, float from, float to);

View file

@ -1592,6 +1592,19 @@ public:
// 2.2 additions
virtual void updateTweenActionInt(float, int);
cocos2d::CCAffineTransform getTransformTemp();
bool getUseChildIndex();
void setUseChildIndex(bool);
void qsortAllChildrenWithIndex();
static void resetGlobalOrderOfArrival();
void sortAllChildrenNoIndex();
void sortAllChildrenWithIndex();
void updateChildIndexes();
private:
/// lazy allocs
void childrenAlloc(void);

View file

@ -236,6 +236,12 @@ public:
*/
void fastRemoveObjectAtIndexNew(unsigned int index);
void fastRemoveObjectAtIndexChild(unsigned int);
void recreateNewIndexes();
void removeObjectAtIndexChild(unsigned int, bool);
// Rearranging Content
/** Swap two elements */

View file

@ -43,6 +43,7 @@ public:
CCBool(bool v)
: m_bValue(v) {}
bool getValue() const {return m_bValue;}
bool setValue(bool value) { m_bValue = value; }
static CCBool* create(bool v)
{

View file

@ -400,6 +400,9 @@ public:
*/
virtual void acceptVisitor(CCDataVisitor &visitor);
char const* charForKey(gd::string const&);
gd::string getFirstKey();
private:
/**
* For internal usage, invoked by setObject.

View file

@ -286,6 +286,13 @@ public:
{
return CCPoint(cosf(a), sinf(a));
}
void add(int, float);
float at(int);
bool isZero() const;
void set(int, float);
void swap();
};
/**
@ -367,6 +374,11 @@ public:
inline float aspect() const {
return this->width / this->height;
}
void add(int, float);
float at(int);
void set(int, float);
};
// alk cont
@ -463,6 +475,9 @@ public:
getMaxY() < rect.getMinY() ||
rect.getMaxY() < getMinY());
}
float getMax(int);
float getMin(int);
};

View file

@ -18,6 +18,7 @@ public:
CCInteger(int v)
: m_nValue(v) {}
int getValue() const {return m_nValue;}
void setValue(int v) { m_nValue = v; };
static CCInteger* create(int v)
{

View file

@ -115,7 +115,7 @@ public:
* it means that you needn't do a release operation unless you retain it.
*/
// Geode change: this is kind of a hack but i think it will work
static inline CCString* create(std::string const& str) {
static inline CCString* create(gd::string const& str) {
return CCString::createWithData(reinterpret_cast<unsigned char const*>(str.c_str()), str.size());
}

View file

@ -78,6 +78,12 @@ public:
* @endcode
*/
void drawPolygon(CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor);
void drawCircle(cocos2d::CCPoint const&, float, cocos2d::_ccColor4F const&, float, cocos2d::_ccColor4F const&, unsigned int);
void drawCubicBezier(cocos2d::CCPoint const&, cocos2d::CCPoint const&, cocos2d::CCPoint const&, cocos2d::CCPoint const&, unsigned int, cocos2d::_ccColor4F const&);
void drawPreciseCubicBezier(cocos2d::CCPoint const&, cocos2d::CCPoint const&, cocos2d::CCPoint const&, cocos2d::CCPoint const&, unsigned int, cocos2d::_ccColor4F const&);
void drawLines(cocos2d::CCPoint*, unsigned int, float, cocos2d::_ccColor4F const&);
void drawRect(cocos2d::CCPoint const&, cocos2d::CCPoint const&, cocos2d::_ccColor4F const&, float, cocos2d::_ccColor4F const&);
/** Clear the geometry in the node's buffer. */
void clear();

View file

@ -288,6 +288,7 @@ THE SOFTWARE.
#include "../textures/CCTextureAtlas.h"
#include "../textures/CCTextureCache.h"
#include "../textures/CCTexturePVR.h"
#include "../textures/CCTextureETC.h"
// tilemap_parallax_nodes
#include "../tilemap_parallax_nodes/CCParallaxNode.h"

View file

@ -269,15 +269,25 @@ public:
#endif // CC_LABELBMFONT_DEBUG_DRAW
RT_ADD(
static CCLabelBMFont* createBatched(const char* str, const char* fntFile, CCArray*);
static CCLabelBMFont* createBatched(const char* str, const char* fntFile, CCArray*, int);
void limitLabelWidth(float width, float defaultScale, float minScale);
int getExtraKerning() const;
void setExtraKerning(int);
bool getIsBatched() const;
void setIsBatched(bool);
cocos2d::CCArray* getTargetArray() const;
void setTargetArray(cocos2d::CCArray*);
)
private:
char * atlasNameFromFntFile(const char *fntFile);
int kerningAmountForFirst(unsigned short first, unsigned short second);
float getLetterPosXLeft( CCSprite* characterSprite );
float getLetterPosXRight( CCSprite* characterSprite );
float getLetterPosXLeft( CCSprite* characterSprite, float, bool);
float getLetterPosXRight( CCSprite* characterSprite, float, bool);
protected:
virtual void setString(unsigned short *newString, bool needUpdateLabel);

View file

@ -335,6 +335,10 @@ public:
virtual void setColor(const ccColor3B &color);
virtual void setOpacity(GLubyte opacity);
void addToVertices(cocos2d::CCPoint, cocos2d::CCPoint, cocos2d::CCPoint);
void setVertices(cocos2d::CCPoint, cocos2d::CCPoint, cocos2d::CCPoint);
protected:
virtual void updateColor();
};
@ -389,6 +393,11 @@ public:
CC_PROPERTY(GLubyte, m_cEndOpacity, EndOpacity)
CC_PROPERTY_PASS_BY_REF(CCPoint, m_AlongVector, Vector)
bool getShouldPremultiply() const;
void setShouldPremultiply(bool);
void setValues(cocos2d::_ccColor3B const&, unsigned char, cocos2d::_ccColor3B const&, unsigned char, cocos2d::CCPoint const&);
/** Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors
Default: YES
*/

View file

@ -189,6 +189,7 @@ public:
protected:
CCMenuItem* itemForTouch(CCTouch * touch);
CCMenuItem* itemForTouch(CCTouch * touch, bool);
tCCMenuState m_eState;
CCMenuItem *m_pSelectedItem;
};

View file

@ -116,6 +116,19 @@ public:
RT_ADD(
void resumeStroke();
void stopStroke();
void enableRepeatMode(float);
bool getDontOpacityFade() const;
void setDontOpacityFade(bool);
float getM_fMaxSeg() const;
void setM_fMaxSeg(float);
void setStroke(float);
void updateFade(float);
)
/** When fast mode is enabled, new points are added faster but with lower precision */

View file

@ -58,6 +58,7 @@ class CC_DLL CCProgressTimer : public CCNodeRGBA
, public CCGLBufferedNode
#endif // EMSCRIPTEN
{
GEODE_FRIEND_MODIFY
public:
/**
* @js ctor

View file

@ -165,6 +165,8 @@ public:
bool isAutoDraw() const;
void setAutoDraw(bool bAutoDraw);
void updateInternalScale(float, float);
private:
void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, GLbitfield flags);

View file

@ -402,20 +402,20 @@ public:
http://particledesigner.71squared.com/
@since v0.99.3
*/
bool initWithFile(const char *plistFile);
bool initWithFile(const char *plistFile, bool);
/** initializes a CCQuadParticleSystem from a CCDictionary.
@since v0.99.3
*/
bool initWithDictionary(CCDictionary *dictionary);
bool initWithDictionary(CCDictionary *dictionary, bool);
/** initializes a particle system from a NSDictionary and the path from where to load the png
@since v2.1
*/
bool initWithDictionary(CCDictionary *dictionary, const char *dirname);
bool initWithDictionary(CCDictionary *dictionary, const char *dirname, bool);
//! Initializes a system with a fixed number of particles
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
virtual bool initWithTotalParticles(unsigned int numberOfParticles, bool);
//! Add a particle to the emitter
bool addParticle();
//! Initializes a particle
@ -459,9 +459,88 @@ public:
void saveDefaults(void);
void loadDefaults(void);
void loadScaledDefaults(float);
void calculateWorldSpace();
bool getDontCleanupOnFinish() const;
void setDontCleanupOnFinish(bool);
bool getDynamicRotationIsDir() const;
void setDynamicRotationIsDir(bool);
bool getEndRGBVarSync() const;
void setEndRGBVarSync(bool);
float getFadeInTime() const;
float getFadeInTimeVar() const;
float getFadeOutTime() const;
float getFadeOutTimeVar() const;
float getFrictionPos() const;
float getFrictionPosVar() const;
float getFrictionRot() const;
float getFrictionRotVar() const;
float getFrictionSize() const;
float getFrictionSizeVar() const;
bool getOrderSensitive() const;
float getRespawn() const;
float getRespawnVar() const;
bool getStartRGBVarSync() const;
bool getStartRadiusEqualToEnd() const;
bool getStartSizeEqualToEnd() const;
bool getStartSpinEqualToEnd() const;
float getTimeElapsed();
bool getUseUniformColorMode() const;
bool getWasRemoved() const;
bool getUsingSchedule() const;
void setEndAlpha(float);
void setFadeInTime(float);
void setFadeInTimeVar(float);
void setFadeOutTime(float);
void setFadeOutTimeVar(float);
void setFrictionPos(float);
void setFrictionPosVar(float);
void setFrictionRot(float);
void setFrictionRotVar(float);
void setFrictionSize(float);
void setFrictionSizeVar(float);
void setOrderSensitive(bool);
void setRespawn(float);
void setRespawnVar(float);
void setStartAlpha(float);
void setStartRGBVarSync(bool);
void setStartRadiusEqualToEnd(bool);
void setStartSizeEqualToEnd(bool);
void setStartSpinEqualToEnd(bool);
void setUsingSchedule(bool);
void setWasRemoved(bool);
void toggleUniformColorMode(bool);
void updateVisible();
virtual void updateEmissionRate();
)
};
class ParticleStruct {
};
// end of particle_nodes group
/// @}

View file

@ -101,7 +101,7 @@ public:
* @js NA
* @lua NA
*/
virtual bool initWithTotalParticles(unsigned int numberOfParticles);
virtual bool initWithTotalParticles(unsigned int numberOfParticles, bool);
/**
* @js NA
*/
@ -135,7 +135,14 @@ public:
void listenBackToForeground(CCObject *obj);
static CCParticleSystemQuad * create();
static CCParticleSystemQuad * createWithTotalParticles(unsigned int numberOfParticles);
static CCParticleSystemQuad * create(const char*, bool);
static CCParticleSystemQuad * createWithTotalParticles(unsigned int numberOfParticles, bool);
unsigned char getOpacity();
void setOpacity(unsigned char);
void updateTexCoords();
private:
#if CC_TEXTURE_ATLAS_USE_VAO
void setupVBOandVAO();

View file

@ -52,6 +52,9 @@ class CC_DLL CCAccelerometerDelegate
{
GEODE_FRIEND_MODIFY
public:
GEODE_CUSTOM_CONSTRUCTOR_BEGIN(CCAccelerometerDelegate)
CCAccelerometerDelegate() {}
virtual void didAccelerate(CCAcceleration* pAccelerationValue) {CC_UNUSED_PARAM(pAccelerationValue);}
};

View file

@ -79,7 +79,7 @@ public:
RT_ADD(
virtual void applicationWillBecomeActive() {}
virtual void applicationWillResignActive() {}
virtual void trySaveGame() {}
virtual void trySaveGame(bool) {}
virtual void gameDidSave() {}
)

View file

@ -176,6 +176,10 @@ public:
* Get scale factor of the vertical direction.
*/
float getScaleY() const;
virtual void pollInputEvents();
void updateDesignResolutionSize();
private:
void getSetOfTouchesEndOrCancel(CCSet& set, int num, int ids[], float xs[], float ys[]);

View file

@ -374,6 +374,10 @@ public:
virtual void setPopupNotify(bool bNotify);
virtual bool isPopupNotify();
gd::string getAndroidPath() const;
void setAndroidPath(gd::string);
protected:
/**
* The default constructor.

View file

@ -108,7 +108,8 @@ public:
EImageFormat eFmt = kFmtUnKnown,
int nWidth = 0,
int nHeight = 0,
int nBitsPerComponent = 8);
int nBitsPerComponent = 8,
int whoknows = 0);
/**
@brief Create image with specified string.

View file

@ -52,6 +52,22 @@ public:
void setupVerticalSync();
void updateVerticalSync();
void updateControllerKeys();
int getTimeElapsed();
void resetForceTimer();
void leftMouseDown();
void leftMouseUp();
void logTimeElapsed(gd::string);
void moveMouse(int, int);
void shutdownApplication();
void toggleMouseControl(bool);
void updateController();
void updateMouseControl();
)
/**

View file

@ -121,6 +121,10 @@ public:
*/
static CCEGLView* create(const gd::string&);
static cocos2d::CCEGLView* createWithFullScreen(gd::string const&);
static cocos2d::CCEGLView* createWithFullScreen(gd::string const&, GLFWvidmode const&, GLFWmonitor*);
static cocos2d::CCEGLView* createWithRect(gd::string const&, cocos2d::CCRect, float);
/**
* @note Geode addition
*/
@ -141,6 +145,34 @@ public:
*/
CCSize getDisplaySize();
void capture();
void checkErrorGL(char const*);
void enableRetina(bool);
bool getCursorLocked() const;
bool getGameplayActive() const;
bool getIsFullscreen() const;
int getRetinaFactor() const;
bool getShouldHideCursor() const;
void iconify();
bool initWithFullScreen(gd::string const&);
bool initWithFullscreen(gd::string const&, GLFWvidmode const&, GLFWmonitor*);
bool initWithRect(gd::string const&, cocos2d::CCRect, float);
bool isRetinaEnabled() const;
void onGLFWWindowCloseFunCallback(GLFWwindow*);
void releaseCapture();
void showMessage(gd::string);
void toggleGameplayActive(bool);
void toggleLockCursor(bool);
void updateDesignSize(int, int);
void updateFrameSize();
protected:
static CCEGLView* s_pEglView;
bool m_bCaptured;

View file

@ -21,7 +21,7 @@ RT_ADD(
enumKeyCodes convertKeyCode(enumKeyCodes key);
bool dispatchKeyboardMSG(enumKeyCodes key, bool);
bool dispatchKeyboardMSG(enumKeyCodes key, bool, bool);
inline bool getAltKeyPressed() const {
return m_bAltPressed;
@ -42,6 +42,10 @@ RT_ADD(
void updateModifierKeys(bool shft, bool ctrl, bool alt, bool cmd);
bool getBlockRepeat() const;
void setBlockRepeat(bool);
protected:
CCArray* m_pDelegates; // 0x20
bool m_bUnknown24; // 0x24

View file

@ -13,7 +13,7 @@ public:
public:
gd::string cleanStringWhiteSpace(const gd::string&);
void split(const gd::string&, char*, const gd::vector<gd::string>&);
void split(gd::string const&, char const*, gd::vector<gd::string>&);
bool splitWithForm(const gd::string&, gd::vector<gd::string>&);
bool rectFromString(const gd::string&, cocos2d::CCRect&);
bool vec2FromString(const gd::string&, cocos2d::CCPoint&);
@ -29,7 +29,7 @@ public:
bool loadRootSubDictFromFile(const char*);
bool loadRootSubDictFromCompressedFile(const char*);
bool loadRootSubDictFromString(gd::string);
bool loadRootSubDictFromString(gd::string const&);
bool saveRootSubDictToFile(const char*);
bool saveRootSubDictToCompressedFile(const char*);
@ -80,14 +80,14 @@ public:
void setRectArrayForKey(const char*, const gd::vector<cocos2d::CCRect>&);
void setRectArrayForKey(const char*, const gd::vector<cocos2d::CCRect>&, bool);
void setArrayForKey(const char*, cocos2d::CCArray*);
void setBoolMapForKey(const char*, const gd::map<gd::string, bool>&);
void setBoolMapForKey(const char*, gd::map<gd::string, bool>&);
void setSubDictForKey(const char*);
void setSubDictForKey(const char*, bool, bool);
void setDictForKey(const char*, cocos2d::CCDictionary*);
void setObjectForKey(const char*, cocos2d::CCObject*);
void addBoolValuesToMapForKey(const gd::map<gd::string, bool>&, const char*, bool);
void addBoolValuesToMapForKeySpecial(const gd::map<gd::string, bool>&, const char*, bool);
void addBoolValuesToMapForKey(gd::map<gd::string, bool>&, const char*, bool);
void addBoolValuesToMapForKeySpecial(gd::map<gd::string, bool>&, const char*, bool);
void checkCompatibility();
};

View file

@ -271,6 +271,8 @@ public:
*/
inline const GLuint getProgram() { return m_uProgram; }
void setUniformLocationWithMatrix3fv(int, float*, unsigned int);
private:
bool updateUniformLocation(GLint location, GLvoid* data, unsigned int bytes);
const char* description();

View file

@ -511,6 +511,11 @@ public:
void setFlipY(bool bFlipY);
/// @} End of Sprite properties getter/setters
cocos2d::CCPoint const& getUnflippedOffsetPosition();
bool getUseVertexMod() const;
void setUseVertexMod(bool);
protected:
void updateColor(void);

View file

@ -176,6 +176,7 @@ protected:
public:
int getUsedAtlasCapacity(void);
void increaseAtlasCapacity(unsigned int);
void increaseAtlasCapacity();
protected:
void manualSortAllChildren(void);
void setManualSortChildren(bool);

View file

@ -147,6 +147,8 @@ public:
*/
bool initWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize);
gd::string getFrameName() const;
void setFrameName(gd::string);
protected:
CCPoint m_obOffset;

View file

@ -57,6 +57,7 @@ namespace cocos2d
class CC_DLL ZipUtils
{
GEODE_FRIEND_MODIFY;
public:
/**
* Inflates either zlib or gzip deflated memory. The inflated memory is

View file

@ -83,7 +83,7 @@ protected:
/**
@brief Called by CCIMEDispatcher when text input received from the IME.
*/
virtual void insertText(const char * text, int len) {CC_UNUSED_PARAM(text);CC_UNUSED_PARAM(len);}
virtual void insertText(const char * text, int len, cocos2d::enumKeyCodes) {CC_UNUSED_PARAM(text);CC_UNUSED_PARAM(len);}
/**
@brief Called by CCIMEDispatcher after the user clicks the backward key.
@ -103,6 +103,8 @@ protected:
virtual void keyboardWillHide(CCIMEKeyboardNotificationInfo& info) {CC_UNUSED_PARAM(info);}
virtual void keyboardDidHide(CCIMEKeyboardNotificationInfo& info) {CC_UNUSED_PARAM(info);}
virtual void deleteForward();
protected:
CCIMEDelegate();
};

View file

@ -58,13 +58,17 @@ public:
/**
@brief Dispatches the input text from IME.
*/
void dispatchInsertText(const char * pText, int nLen);
void dispatchInsertText(const char * pText, int nLen, cocos2d::enumKeyCodes);
/**
@brief Dispatches the delete-backward operation.
*/
void dispatchDeleteBackward();
void dispatchDeleteForward();
bool hasDelegate();
/**
@brief Get the content text from CCIMEDelegate, retrieved previously from IME.
*/
@ -76,6 +80,7 @@ public:
void dispatchKeyboardWillShow(CCIMEKeyboardNotificationInfo& info);
void dispatchKeyboardDidShow(CCIMEKeyboardNotificationInfo& info);
void dispatchKeyboardWillHide(CCIMEKeyboardNotificationInfo& info);
void dispatchKeyboardWillHide();
void dispatchKeyboardDidHide(CCIMEKeyboardNotificationInfo& info);
protected:

View file

@ -65,7 +65,7 @@ public:
/**
@brief If the sender doesn't want to insert the text, return true;
*/
virtual bool onTextFieldInsertText(CCTextFieldTTF * sender, const char * text, int nLen)
virtual bool onTextFieldInsertText(CCTextFieldTTF * sender, const char * text, int nLen, cocos2d::enumKeyCodes)
{
CC_UNUSED_PARAM(sender);
CC_UNUSED_PARAM(text);
@ -175,7 +175,7 @@ protected:
virtual bool canAttachWithIME();
virtual bool canDetachWithIME();
virtual void insertText(const char * text, int len);
virtual void insertText(const char * text, int len, cocos2d::enumKeyCodes);
virtual void deleteBackward();
virtual const char * getContentText();
private:

View file

@ -269,6 +269,9 @@ public:
bool hasPremultipliedAlpha();
bool hasMipmaps();
void releaseGLTexture();
private:
bool initPremultipliedATextureWithImage(CCImage * image, unsigned int pixelsWide, unsigned int pixelsHigh);

View file

@ -117,7 +117,7 @@ public:
* @lua NA
*/
void addImageAsync(const char *path, CCObject *target, SEL_CallFuncO selector);
void addImageAsync(char const*, cocos2d::CCObject*, cocos2d::SEL_MenuHandler, int, cocos2d::CCTexture2DPixelFormat);
/* Returns a Texture2D object given an CGImageRef image
* If the image was not previously loaded, it will create a new CCTexture2D object and it will return it.
@ -196,6 +196,9 @@ public:
It's only useful when the value of CC_ENABLE_CACHE_TEXTURE_DATA is 1
*/
static void reloadAllTextures();
void prepareAsyncLoading();
};
#if CC_ENABLE_CACHE_TEXTURE_DATA

View file

@ -149,6 +149,7 @@ This information is obtained from the TMX file.
*/
class CC_DLL CCTMXMapInfo : public CCObject, public CCSAXDelegator
{
GEODE_FRIEND_MODIFY
public:
/// map orientation
CC_SYNTHESIZE(int, m_nOrientation, Orientation);

View file

@ -67,6 +67,10 @@ public:
virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);}
virtual void setPreviousPriority(int);
virtual int getPreviousPriority();
};
/**
@brief

View file

@ -201,6 +201,11 @@ public:
*/
CCTouchHandler* findHandler(CCTouchDelegate *pDelegate);
void addPrioTargetedDelegate(cocos2d::CCTouchDelegate*, int, bool);
bool isUsingForcePrio();
void registerForcePrio(cocos2d::CCObject*, int);
void unregisterForcePrio(cocos2d::CCObject*);
private:
RT_ADD(
void incrementForcePrio(int priority);