Test the joystick
This commit is contained in:
parent
d05f8d6e67
commit
929d40d3fb
53
Makefile
53
Makefile
@ -3,63 +3,12 @@
|
||||
### Some Preject properties : ###
|
||||
###############################################################################
|
||||
|
||||
PROJECT_PATH=$(shell pwd)
|
||||
ifeq ($(PLATFORM), Linux)
|
||||
#PROJECT_NDK?=$(PROJECT_PATH)/../ewol/
|
||||
PROJECT_NDK?=$(PROJECT_PATH)/../ewol/
|
||||
else ifeq ($(PLATFORM), Android)
|
||||
PROJECT_NDK?=$(PROJECT_PATH)/../android/ndk-r7/
|
||||
PROJECT_SDK?=$(PROJECT_PATH)/../android/sdk-r15/
|
||||
endif
|
||||
|
||||
|
||||
PROJECT_MODULE?=$(PROJECT_PATH)/../
|
||||
|
||||
EWOL_FOLDER=$(PROJECT_MODULE)ewol
|
||||
|
||||
# group name or constructor ... (no dot, no MAJ no Numerical char)
|
||||
PROJECT_VENDOR=heeroyui
|
||||
# Binary name ... (no dot, no MAJ no Numerical char)
|
||||
PROJECT_NAME=ewoldrawer
|
||||
|
||||
#dependence of the librairies :
|
||||
#PROJECT_LIB_DEPENDENCY= ewol
|
||||
|
||||
PROJECT_FILE_DIRECTORY=jni
|
||||
|
||||
# get the tag of the current project :
|
||||
PROJECT_VERSION_TAG=$(shell git describe --tags)
|
||||
#$(info Project version TAG : $(PROJECT_VERSION_TAG))
|
||||
|
||||
PROJECT_VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
||||
#$(info Project version TAG Short: $(PROJECT_VERSION_TAG_SHORT))
|
||||
|
||||
# enable or disable debug :
|
||||
DEBUG:=1
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
PROJECT_CXXFLAGS = -DPROJECT_DEBUG_LEVEL=1
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_NDEBUG
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||
else
|
||||
PROJECT_CXXFLAGS = -DPROJECT_DEBUG_LEVEL=3
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
||||
PROJECT_CXXFLAGS+= -I$(EWOL_FOLDER)/Sources/
|
||||
|
||||
PROJECT_LDFLAGS= -L$(EWOL_FOLDER)
|
||||
|
||||
PROJECT_SOURCES= jni/ewolAndroidAbstraction.cpp \
|
||||
jni/Main.cpp
|
||||
|
||||
PROJECT_SOURCES= Main.cpp
|
||||
|
||||
#include the specific platefom makefile
|
||||
include $(EWOL_FOLDER)/Build/Makefile.$(PLATFORM).mk
|
||||
include $(shell pwd)/../ewol/Build/Makefile.mk
|
||||
|
||||
|
||||
|
34
jni/Main.cpp
34
jni/Main.cpp
@ -38,7 +38,7 @@
|
||||
#include <ewol/widget/Spacer.h>
|
||||
#include <ewol/widget/ColorBar.h>
|
||||
#include <ewol/widget/Menu.h>
|
||||
#include <ewol/widget/widgetE2D.h>
|
||||
#include <ewol/widget/Joystick.h>
|
||||
#include <ewol/widgetMeta/FileChooser.h>
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <parserSVG/parserSVG.h>
|
||||
@ -203,14 +203,20 @@ class MainWindows :public ewol::Windows
|
||||
mybtColor->RegisterOnEvent(this, ewolEventButtonColorChange, drawerEventColorHasChange);
|
||||
mySizerVert2->SubWidgetAdd(mybtColor);
|
||||
|
||||
ewol::Joystick * myJoy = new ewol::Joystick();
|
||||
myJoy->SetMinSize(120,120);
|
||||
mySizerVert2->SubWidgetAdd(myJoy);
|
||||
|
||||
etk::File fileE2D("/home/edupin/progperso/ewolDrawer/Exemple.xml");
|
||||
ewol::widgetE2D * myE2Dwidget = new ewol::widgetE2D();
|
||||
myE2Dwidget->SetElement(fileE2D);
|
||||
myE2Dwidget->SetMinSize(120,120);
|
||||
myE2Dwidget->SetFillX(true);
|
||||
mySizerVert2->SubWidgetAdd(myE2Dwidget);
|
||||
myJoy = new ewol::Joystick();
|
||||
myJoy->SetMinSize(120,120);
|
||||
myJoy->SetLockMode(true);
|
||||
mySizerVert2->SubWidgetAdd(myJoy);
|
||||
|
||||
myJoy = new ewol::Joystick();
|
||||
myJoy->SetMinSize(120,120);
|
||||
myJoy->SetLockMode(true);
|
||||
myJoy->SetDisplayMode(ewol::JOYSTICK_ARROW_MODE);
|
||||
mySizerVert2->SubWidgetAdd(myJoy);
|
||||
|
||||
mybtColor = new ewol::ButtonColor();
|
||||
mybtColor->SetFillX(true);
|
||||
@ -440,6 +446,7 @@ void APP_Init(void)
|
||||
//fontID = GetFontIdWithFileName("dataTest/TextMonospace.ebt");
|
||||
}
|
||||
*/
|
||||
basicWindows = new MainWindows();
|
||||
|
||||
// set the default Path of the application :
|
||||
#ifdef PLATFORM_Linux
|
||||
@ -470,15 +477,13 @@ void APP_Init(void)
|
||||
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 12);
|
||||
#endif
|
||||
|
||||
basicWindows = new MainWindows();
|
||||
|
||||
|
||||
ewol::shortCut::Add("ctrl+t", drawMsgGuiLinkNew, "");
|
||||
|
||||
|
||||
// create the specific windows
|
||||
ewol::DisplayWindows(basicWindows);
|
||||
DRAW_INFO("==> Init Ewol Drawer (END)");
|
||||
|
||||
/*
|
||||
|
||||
etk::File svgFile;
|
||||
svg::Parser *mySVGElement = NULL;
|
||||
@ -495,6 +500,13 @@ void APP_Init(void)
|
||||
}
|
||||
}
|
||||
exit(-1);
|
||||
*/
|
||||
}
|
||||
|
||||
etk::File APP_Icon(void)
|
||||
{
|
||||
etk::File bitmapFile("", etk::FILE_TYPE_DATA);
|
||||
return bitmapFile;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user