diff options
Diffstat (limited to 'ide')
| -rw-r--r-- | ide/AndroidStudio3/app/app.iml | 4 | ||||
| -rw-r--r-- | ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx | 16 |
2 files changed, 14 insertions, 6 deletions
diff --git a/ide/AndroidStudio3/app/app.iml b/ide/AndroidStudio3/app/app.iml index ffb02d88c..ed9347e99 100644 --- a/ide/AndroidStudio3/app/app.iml +++ b/ide/AndroidStudio3/app/app.iml @@ -98,17 +98,13 @@ <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" /> - <excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/cmake" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaPrecompile" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" /> - <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> - <excludeFolder url="file://$MODULE_DIR$/build/intermediates/prebuild" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> - <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/splits-support" /> <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> diff --git a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx index 911683944..582319020 100644 --- a/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx +++ b/ide/AndroidStudio3/app/src/main/cpp/HelloAndroid.cxx @@ -19,13 +19,25 @@ #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include <FL/Enumerations.H> +#include <FL/fl_draw.H> Fl_Window *win; Fl_Button *btn; +class MyButton : public Fl_Button +{ +public: + MyButton(int x, int y, int w, int h, const char *l) : Fl_Button(x, y, w, h, l) { } + void draw() { + fl_push_clip(x(), y(), w()/2, h()/2); + Fl_Button::draw(); + fl_pop_clip(); + } +}; + int h(void*, void*) { - Fl_Android_Application::log_w("App global even %p", Fl::event()); + Fl_Android_Application::log_w("App global event %p", Fl::event()); return 0; } @@ -33,7 +45,7 @@ int main(int argc, char **argv) { Fl::add_system_handler(h, 0); win = new Fl_Window(10, 10, 600, 400, "Hallo"); - btn = new Fl_Button(190, 200, 280, 35, "Hello, Android!"); + btn = new MyButton(190, 200, 280, 35, "Hello, Android!"); btn->color(FL_LIGHT2); win->show(argc, argv); |
