mirror of https://github.com/axmolengine/axmol.git
issue #5176, fix compile error on other platforms
This commit is contained in:
parent
e866800044
commit
9118d7a98a
|
@ -29,7 +29,8 @@ CCProtectedNode.cpp \
|
|||
UIHBox.cpp \
|
||||
UIVBox.cpp \
|
||||
UIRelativeBox.cpp \
|
||||
UIVideoPlayerAndroid.cpp
|
||||
UIVideoPlayerAndroid.cpp \
|
||||
UIFocusManager.cpp
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \
|
||||
$(LOCAL_PATH)/../editor-support
|
||||
|
|
|
@ -22,5 +22,6 @@ set(COCOS_UI_SRC
|
|||
ui/UITextField.cpp
|
||||
ui/UIVBox.cpp
|
||||
ui/UIWidget.cpp
|
||||
ui/UIFocusManager.cpp
|
||||
)
|
||||
|
||||
|
|
|
@ -46,20 +46,24 @@ namespace ui {
|
|||
void enableAndroidDpad(bool flag);
|
||||
void setFirstFocsuedWidget(Widget* widget);
|
||||
|
||||
std::function<void(EventKeyboard::KeyCode, Event*)> onKeypadReleased = nullptr;
|
||||
std::function<void(EventKeyboard::KeyCode, Event*)> onKeypadReleased;
|
||||
|
||||
protected:
|
||||
void onKeypadKeyPressed(EventKeyboard::KeyCode, Event*);
|
||||
|
||||
private:
|
||||
FocusManager(){}
|
||||
FocusManager():_keyboardListener(nullptr),
|
||||
_firstFocusedWidget(nullptr),
|
||||
_enableAndroidDpad(false),
|
||||
onKeypadReleased(nullptr)
|
||||
{}
|
||||
~FocusManager();
|
||||
|
||||
static FocusManager* _instance;
|
||||
|
||||
EventListenerKeyboard* _keyboardListener = nullptr;
|
||||
Widget* _firstFocusedWidget = nullptr;
|
||||
bool _enableAndroidDpad = false;
|
||||
EventListenerKeyboard* _keyboardListener ;
|
||||
Widget* _firstFocusedWidget ;
|
||||
bool _enableAndroidDpad ;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
<ClInclude Include="..\CocosGUI.h" />
|
||||
<ClInclude Include="..\UIButton.h" />
|
||||
<ClInclude Include="..\UICheckBox.h" />
|
||||
<ClInclude Include="..\UIFocusManager.h" />
|
||||
<ClInclude Include="..\UIHBox.h" />
|
||||
<ClInclude Include="..\UIHelper.h" />
|
||||
<ClInclude Include="..\UIImageView.h" />
|
||||
|
@ -41,6 +42,7 @@
|
|||
<ClCompile Include="..\CocosGUI.cpp" />
|
||||
<ClCompile Include="..\UIButton.cpp" />
|
||||
<ClCompile Include="..\UICheckBox.cpp" />
|
||||
<ClCompile Include="..\UIFocusManager.cpp" />
|
||||
<ClCompile Include="..\UIHBox.cpp" />
|
||||
<ClCompile Include="..\UIHelper.cpp" />
|
||||
<ClCompile Include="..\UIImageView.cpp" />
|
||||
|
|
|
@ -90,6 +90,9 @@
|
|||
<ClInclude Include="..\UILayoutExecutant.h">
|
||||
<Filter>Layouts</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\UIFocusManager.h">
|
||||
<Filter>BaseClasses</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\UIScrollView.cpp">
|
||||
|
@ -161,5 +164,8 @@
|
|||
<ClCompile Include="..\UILayoutExecutant.cpp">
|
||||
<Filter>Layouts</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\UIFocusManager.cpp">
|
||||
<Filter>BaseClasses</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue