mirror of https://github.com/axmolengine/axmol.git
temp commit
This commit is contained in:
parent
0fe61642f6
commit
ced029257f
|
@ -181,7 +181,7 @@
|
||||||
</References>
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<Filter
|
<Filter
|
||||||
Name="source"
|
Name="Classes"
|
||||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
>
|
>
|
||||||
|
@ -203,19 +203,7 @@
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Makefiles"
|
Name="wophone"
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath=".\HelloWorld.TMK3"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Makefile.ARM"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Framework"
|
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\HelloWorldUnicodeScript.h"
|
RelativePath=".\HelloWorldUnicodeScript.h"
|
||||||
|
@ -251,22 +239,18 @@
|
||||||
RelativePath=".\TG3AppDllEntry.h"
|
RelativePath=".\TG3AppDllEntry.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
<Filter
|
||||||
<Filter
|
Name="Makefiles"
|
||||||
Name="Resource"
|
|
||||||
>
|
|
||||||
<File
|
|
||||||
RelativePath="..\Resource\CloseNormal.png"
|
|
||||||
>
|
>
|
||||||
</File>
|
<File
|
||||||
<File
|
RelativePath=".\HelloWorld.TMK3"
|
||||||
RelativePath="..\Resource\CloseSelected.png"
|
>
|
||||||
>
|
</File>
|
||||||
</File>
|
<File
|
||||||
<File
|
RelativePath=".\Makefile.ARM"
|
||||||
RelativePath="..\Resource\HelloWorld.png"
|
>
|
||||||
>
|
</File>
|
||||||
</File>
|
</Filter>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
|
|
|
@ -206,6 +206,7 @@ CCEGLView::CCEGLView(TApplication * pApp)
|
||||||
, m_pTextField(NULL)
|
, m_pTextField(NULL)
|
||||||
, m_nTextLen(0)
|
, m_nTextLen(0)
|
||||||
{
|
{
|
||||||
|
memset(&m_rcKeyboard, 0, sizeof(m_rcKeyboard));
|
||||||
}
|
}
|
||||||
|
|
||||||
CCEGLView::~CCEGLView()
|
CCEGLView::~CCEGLView()
|
||||||
|
@ -214,7 +215,7 @@ CCEGLView::~CCEGLView()
|
||||||
CC_SAFE_DELETE(m_pEGL);
|
CC_SAFE_DELETE(m_pEGL);
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean CCEGLView::Create(int nWidthInPoints, int nHeightInPoints)
|
Boolean CCEGLView::Create(int nWidthInPoints, int nHeightInPoints, UInt32 eRotateMode)
|
||||||
{
|
{
|
||||||
// record the window size in points
|
// record the window size in points
|
||||||
m_tSizeInPoints.SetWidth(nWidthInPoints);
|
m_tSizeInPoints.SetWidth(nWidthInPoints);
|
||||||
|
@ -236,6 +237,23 @@ Boolean CCEGLView::Create(int nWidthInPoints, int nHeightInPoints)
|
||||||
|
|
||||||
Boolean bRet = TWindow::Create(&TRectangle(0, 0, nWidth, nHeight));
|
Boolean bRet = TWindow::Create(&TRectangle(0, 0, nWidth, nHeight));
|
||||||
|
|
||||||
|
Coord temp;
|
||||||
|
Int32 tmp;
|
||||||
|
if (WM_WINDOW_ROTATE_MODE_CW == eRotateMode
|
||||||
|
|| WM_WINDOW_ROTATE_MODE_CCW == eRotateMode)
|
||||||
|
{
|
||||||
|
temp = m_rcViewPort.X();
|
||||||
|
m_rcViewPort.SetX(m_rcViewPort.Y());
|
||||||
|
m_rcViewPort.SetY(temp);
|
||||||
|
temp = m_rcViewPort.Width();
|
||||||
|
m_rcViewPort.SetWidth(m_rcViewPort.Height());
|
||||||
|
m_rcViewPort.SetHeight(temp);
|
||||||
|
|
||||||
|
tmp = m_tSizeInPoints.Width();
|
||||||
|
m_tSizeInPoints.SetWidth(m_tSizeInPoints.Height());
|
||||||
|
m_tSizeInPoints.SetHeight(tmp);
|
||||||
|
}
|
||||||
|
this->RotateWindow(eRotateMode);
|
||||||
if (bRet)
|
if (bRet)
|
||||||
{
|
{
|
||||||
s_pMainWindow = this;
|
s_pMainWindow = this;
|
||||||
|
@ -310,6 +328,46 @@ Boolean CCEGLView::EventHandler(TApplication * pApp, EventType * pEvent)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case EVENT_WinImeStatusNotify:
|
||||||
|
{
|
||||||
|
EosImeNotifyEventType * pNotify = (EosImeNotifyEventType*)pEvent;
|
||||||
|
if (IME_NOTIFY_TYPE_KEYBOARD_SIZE == pNotify->notifyType)
|
||||||
|
{
|
||||||
|
m_rcKeyboard = pNotify->rtKeyboard;
|
||||||
|
|
||||||
|
//keyboard open
|
||||||
|
CCIMEKeyboardNotificationInfo info;
|
||||||
|
info.begin = CCRectMake((float)0
|
||||||
|
, (float)0 - m_rcKeyboard.extent.Y
|
||||||
|
, (float)m_rcKeyboard.extent.X
|
||||||
|
, (float)m_rcKeyboard.extent.Y);
|
||||||
|
info.end = CCRectMake((float)0
|
||||||
|
, (float)0
|
||||||
|
, (float)m_rcKeyboard.extent.X
|
||||||
|
, (float)m_rcKeyboard.extent.Y);
|
||||||
|
info.duration = 0;
|
||||||
|
CCIMEDispatcher::sharedDispatcher()->dispatchKeyboardWillShow(info);
|
||||||
|
CCIMEDispatcher::sharedDispatcher()->dispatchKeyboardDidShow(info);
|
||||||
|
}
|
||||||
|
else if (IME_NOTIFY_TYPE_IME_CLOSE == pNotify->notifyType)
|
||||||
|
{
|
||||||
|
CCIMEKeyboardNotificationInfo info;
|
||||||
|
info.begin = CCRectMake((float)0
|
||||||
|
, (float)0
|
||||||
|
, (float)m_rcKeyboard.extent.X
|
||||||
|
, (float)m_rcKeyboard.extent.Y);
|
||||||
|
info.end = CCRectMake((float)0
|
||||||
|
, (float)0 - m_rcKeyboard.extent.Y
|
||||||
|
, (float)m_rcKeyboard.extent.X
|
||||||
|
, (float)m_rcKeyboard.extent.Y);
|
||||||
|
info.duration = 0;
|
||||||
|
CCIMEDispatcher::sharedDispatcher()->dispatchKeyboardWillHide(info);
|
||||||
|
CCIMEDispatcher::sharedDispatcher()->dispatchKeyboardDidHide(info);
|
||||||
|
}
|
||||||
|
pEvent->sParam1 = pEvent->sParam1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case EVENT_FieldChanged:
|
case EVENT_FieldChanged:
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
CCEGLView(TApplication * pApp);
|
CCEGLView(TApplication * pApp);
|
||||||
virtual ~CCEGLView();
|
virtual ~CCEGLView();
|
||||||
|
|
||||||
virtual Boolean Create(int nWidthInPoints, int nHeightInPoints);
|
virtual Boolean Create(int nWidthInPoints, int nHeightInPoints, UInt32 eRotateMode = WM_WINDOW_ROTATE_MODE_NORMAL);
|
||||||
virtual Boolean AfterCreate(void);
|
virtual Boolean AfterCreate(void);
|
||||||
virtual Boolean EventHandler(TApplication * pApp, EventType * pEvent);
|
virtual Boolean EventHandler(TApplication * pApp, EventType * pEvent);
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ private:
|
||||||
TRectangle m_rcViewPort;
|
TRectangle m_rcViewPort;
|
||||||
TEdit * m_pTextField;
|
TEdit * m_pTextField;
|
||||||
int m_nTextLen;
|
int m_nTextLen;
|
||||||
|
RectangleType m_rcKeyboard;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end of namespace cocos2d
|
} // end of namespace cocos2d
|
||||||
|
|
|
@ -46,7 +46,7 @@ bool AppDelegate::initInstance()
|
||||||
// Initialize OpenGLView instance, that release by CCDirector when application terminate.
|
// Initialize OpenGLView instance, that release by CCDirector when application terminate.
|
||||||
// The tests is designed as HVGA.
|
// The tests is designed as HVGA.
|
||||||
CCEGLView* pMainWnd = new CCEGLView(this);
|
CCEGLView* pMainWnd = new CCEGLView(this);
|
||||||
CC_BREAK_IF(! pMainWnd || ! pMainWnd->Create(320,480));
|
CC_BREAK_IF(! pMainWnd || ! pMainWnd->Create(320 ,480, WM_WINDOW_ROTATE_MODE_CW));
|
||||||
|
|
||||||
#ifndef _TRANZDA_VM_
|
#ifndef _TRANZDA_VM_
|
||||||
// on wophone emulator, we copy resources files to Work7/NEWPLUS/TDA_DATA/Data folder instead of zip file
|
// on wophone emulator, we copy resources files to Work7/NEWPLUS/TDA_DATA/Data folder instead of zip file
|
||||||
|
|
|
@ -83,6 +83,7 @@ OBJECTS = \
|
||||||
$(OBJECTS_DIR)/KeypadTest.o \
|
$(OBJECTS_DIR)/KeypadTest.o \
|
||||||
$(OBJECTS_DIR)/LabelTest.o \
|
$(OBJECTS_DIR)/LabelTest.o \
|
||||||
$(OBJECTS_DIR)/LayerTest.o \
|
$(OBJECTS_DIR)/LayerTest.o \
|
||||||
|
$(OBJECTS_DIR)/TextInputTest.o \
|
||||||
$(OBJECTS_DIR)/MenuTest.o \
|
$(OBJECTS_DIR)/MenuTest.o \
|
||||||
$(OBJECTS_DIR)/MotionStreakTest.o \
|
$(OBJECTS_DIR)/MotionStreakTest.o \
|
||||||
$(OBJECTS_DIR)/ParallaxTest.o \
|
$(OBJECTS_DIR)/ParallaxTest.o \
|
||||||
|
@ -258,6 +259,9 @@ $(OBJECTS_DIR)/KeypadTest.o : ../tests/KeypadTest/KeypadTest.cpp
|
||||||
$(OBJECTS_DIR)/LabelTest.o : ../tests/LabelTest/LabelTest.cpp
|
$(OBJECTS_DIR)/LabelTest.o : ../tests/LabelTest/LabelTest.cpp
|
||||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/LabelTest.o ../tests/LabelTest/LabelTest.cpp
|
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/LabelTest.o ../tests/LabelTest/LabelTest.cpp
|
||||||
|
|
||||||
|
$(OBJECTS_DIR)/TextInputTest.o : ../tests/TextInputTest/TextInputTest.cpp
|
||||||
|
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/TextInputTest.o ../tests/TextInputTest/TextInputTest.cpp
|
||||||
|
|
||||||
$(OBJECTS_DIR)/LayerTest.o : ../tests/LayerTest/LayerTest.cpp
|
$(OBJECTS_DIR)/LayerTest.o : ../tests/LayerTest/LayerTest.cpp
|
||||||
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/LayerTest.o ../tests/LayerTest/LayerTest.cpp
|
$(CXX) -c $(CXX_FLAGS) $(INCLUDE_PATH) $(LAST_INCLUDE_PATH) -o $(OBJECTS_DIR)/LayerTest.o ../tests/LayerTest/LayerTest.cpp
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue