From 1cad087969efefa401a11051343cd0689f660770 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 24 May 2014 01:35:47 -0300 Subject: Making Godot Easier to Use.. -=-=-=-=-=-=-=-=-=-=-=-=-=-= -Auto indenter in code editor, this makes it much easier to paste external code. -Zoom in 2D viewport now uses the mouse pointer as reference. -Obscure hack to see where code/line of GDScript in C++ backtrace. -Fixed a bug where keys would get stuck on X11 if pressed simultaneously -Added Api on IP singleton to request local IPs. -Premultiplied alpha support when importing texture, editing PNGs and as a blend mode. --- .../android/java/src/com/android/godot/Godot.java | 33 +++++++++++++++++++ .../java/src/com/android/godot/GodotPaymentV3.java | 37 ++++++++++++++++++---- .../com/android/godot/payments/ConsumeTask.java | 3 +- .../android/godot/payments/HandlePurchaseTask.java | 10 +++--- .../com/android/godot/payments/PaymentsCache.java | 3 ++ .../android/godot/payments/PaymentsManager.java | 12 ++++--- .../com/android/godot/payments/PurchaseTask.java | 6 ++-- 7 files changed, 83 insertions(+), 21 deletions(-) (limited to 'platform/android/java/src') diff --git a/platform/android/java/src/com/android/godot/Godot.java b/platform/android/java/src/com/android/godot/Godot.java index 35ecdc818e..bd973ce49b 100644 --- a/platform/android/java/src/com/android/godot/Godot.java +++ b/platform/android/java/src/com/android/godot/Godot.java @@ -65,6 +65,9 @@ import java.io.InputStream; public class Godot extends Activity implements SensorEventListener { + + static final int MAX_SINGLETONS = 64; + static public class SingletonBase { protected void registerClass(String p_name, String[] p_methods) { @@ -104,8 +107,21 @@ public class Godot extends Activity implements SensorEventListener } + + Godot.singletons[Godot.singleton_count++]=this; + } + + protected void onMainActivityResult(int requestCode, int resultCode, Intent data) { + + + } + + protected void onMainResume() { + + } + public void registerMethods() {} } @@ -133,6 +149,12 @@ public class Godot extends Activity implements SensorEventListener //setTitle(title); } + + static SingletonBase singletons[] = new SingletonBase[MAX_SINGLETONS]; + static int singleton_count=0; + + + public interface ResultCallback { public void callback(int requestCode, int resultCode, Intent data); }; @@ -147,6 +169,11 @@ public class Godot extends Activity implements SensorEventListener result_callback.callback(requestCode, resultCode, data); result_callback = null; }; + + for(int i=0;i