Browse Source

added InputText class
fixed Marmalade file system
fixed long log string
minor improves

Denis Muratshin 12 years ago
parent
commit
b6bf9b2866
53 changed files with 836 additions and 1527 deletions
  1. 2 2
      .hg_archival.txt
  2. 2 0
      .hgignore
  3. BIN
      doc.zip
  4. 0 12
      examples/Demo/proj.android/local.properties
  5. 24 22
      examples/Demo/proj.ios/demo_ios.xcodeproj/project.pbxproj
  6. 24 22
      examples/Demo/proj.macosx/demo_macosx.xcodeproj/project.pbxproj
  7. 1 1
      examples/Demo/proj.win32/Demo.vcxproj
  8. 4 0
      examples/Demo/proj.win32/Demo.vcxproj.user
  9. 95 0
      examples/Demo/src/TestInputText.h
  10. 8 0
      examples/Demo/src/example.cpp
  11. 0 12
      examples/Game/part1/proj.android/local.properties
  12. 4 0
      examples/Game/part1/proj.win32/GamePart1.vcxproj.user
  13. 0 12
      examples/Game/part2/proj.android/local.properties
  14. 4 0
      examples/Game/part2/proj.win32/GamePart2.vcxproj.user
  15. 0 12
      examples/Game/part3/proj.android/local.properties
  16. 32 48
      examples/Game/part3/proj.ios/GamePart3_ios.xcodeproj/project.pbxproj
  17. 32 48
      examples/Game/part3/proj.macosx/GamePart3_macosx.xcodeproj/project.pbxproj
  18. 4 0
      examples/Game/part3/proj.win32/GamePart3.vcxproj.user
  19. 0 12
      examples/Game/part4/proj.android/local.properties
  20. 4 0
      examples/Game/part4/proj.win32/GamePart4.vcxproj.user
  21. 0 12
      examples/HelloWorld/proj.android/local.properties
  22. 4 0
      examples/HelloWorld/proj.win32/HelloWorld.vcxproj.user
  23. 0 12
      examples/Match3/proj.android/local.properties
  24. 4 0
      examples/Match3/proj.win32/Match3.vcxproj.user
  25. 0 0
      libs/.empty
  26. 0 10
      oxygine/SDL/android/lib/local.properties
  27. 1 0
      oxygine/SDL/android/lib/src/org/libsdl/app/.empty
  28. 0 1040
      oxygine/SDL/android/lib/src/org/libsdl/app/SDLActivity.java
  29. 21 2
      oxygine/SDL/android/lib/src/org/oxygine/lib/Utils.java
  30. 8 0
      oxygine/SDL/ios/oxygine/oxygine_ios.xcodeproj/project.pbxproj
  31. 9 0
      oxygine/SDL/macosx/oxygine_macosx/oxygine_macosx.xcodeproj/project.pbxproj
  32. 2 0
      oxygine/SDL/win32/oxygine_vs2010.vcxproj
  33. 6 0
      oxygine/SDL/win32/oxygine_vs2010.vcxproj.filters
  34. 168 0
      oxygine/src/InputText.cpp
  35. 45 0
      oxygine/src/InputText.h
  36. 8 2
      oxygine/src/MemoryTexture.cpp
  37. 1 1
      oxygine/src/MemoryTexture.h
  38. 6 5
      oxygine/src/core/STDFileSystem.cpp
  39. 8 0
      oxygine/src/core/android/jniHelper.cpp
  40. 4 0
      oxygine/src/core/android/jniHelper.h
  41. 45 9
      oxygine/src/core/android/jniUtils.cpp
  42. 4 0
      oxygine/src/core/android/jniUtils.h
  43. 5 3
      oxygine/src/core/log.cpp
  44. 17 2
      oxygine/src/core/oxygine.cpp
  45. 1 0
      oxygine/src/oxygine-framework.h
  46. 1 1
      oxygine/src/oxygine_include.h
  47. 10 0
      oxygine/src/utils/stringUtils.cpp
  48. 2 1
      readme.Android
  49. 8 2
      tools/gen_template.py
  50. 0 12
      tools/templates/proj.android/local.properties
  51. 4 0
      tools/templates/proj.win32/${PROJECT}.vcxproj.user
  52. 9 3
      tools/templates/templates.wpr
  53. 195 207
      tools/templates/templates.wpu

+ 2 - 2
.hg_archival.txt

@@ -1,5 +1,5 @@
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
-node: c6d6c87a04dec5b83752076801b092e991ffddbd
+node: 5e5366dbfaa6e45c43d1550345b46a8088d7916a
 branch: default
 branch: default
 latesttag: oldrender
 latesttag: oldrender
-latesttagdistance: 159
+latesttagdistance: 175

+ 2 - 0
.hgignore

@@ -106,5 +106,7 @@ libs/
 examples/Game/part3/proj.win32/Debug/
 examples/Game/part3/proj.win32/Debug/
 examples/HelloWorld/proj.win32/Debug/
 examples/HelloWorld/proj.win32/Debug/
 examples/Match3/proj.win32/Debug/
 examples/Match3/proj.win32/Debug/
+examples/HelloWorld/proj.android/bin/
+examples/HelloWorld/proj.android/gen/
 syntax: regexp
 syntax: regexp
 ^build/
 ^build/

BIN
doc.zip


+ 0 - 12
examples/Demo/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 24 - 22
examples/Demo/proj.ios/demo_ios.xcodeproj/project.pbxproj

@@ -85,17 +85,18 @@
 		7746CA7A63049ED8F7D6BF42 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
 		7746CA7A63049ED8F7D6BF42 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/TestInputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestInputText.h; path = ../src/TestInputText.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
 		04FE4D4FB640E0DF92DFB865 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
 		04FE4D4FB640E0DF92DFB865 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
 		7F3B12E3C9D554D9FE28101D /* ../data/demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = demo; path = ../data/demo; sourceTree = "<group>"; };
 		7F3B12E3C9D554D9FE28101D /* ../data/demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = demo; path = ../data/demo; sourceTree = "<group>"; };
 		F6123B1E6FE4471A00F49751 /* ../data/ext */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = ext; path = ../data/ext; sourceTree = "<group>"; };
 		F6123B1E6FE4471A00F49751 /* ../data/ext */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = ext; path = ../data/ext; sourceTree = "<group>"; };
@@ -206,17 +207,18 @@
 				7746CA7A63049ED8F7D6BF42 /* TestBox9Sprite.h */, 
 				7746CA7A63049ED8F7D6BF42 /* TestBox9Sprite.h */, 
 				D954BD82D7708B65A08FB6B9 /* TestClipRect.h */, 
 				D954BD82D7708B65A08FB6B9 /* TestClipRect.h */, 
 				BD0E956CC3A2F7EB94822B5C /* TestDrag.h */, 
 				BD0E956CC3A2F7EB94822B5C /* TestDrag.h */, 
-				7623D793B59EF0CD569E6EC2 /* TestManageRes.h */, 
-				AFA30E959880563E6ABBBC4F /* TestMask.h */, 
-				B52CCD463855CF91A7FBDB8E /* TestPerf.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* TestProgressBar.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* TestRender2Texture.h */, 
-				8F2AFB956EEAEED67C5B7571 /* TestSliding.h */, 
-				047F6BD19F885FF186A1447C /* TestTexel2Pixel.h */, 
-				C570FAEF487CD34B62389F89 /* TestText.h */, 
-				2418B9A339E6004913AF5980 /* TestTextureFormat.h */, 
-				CAD9D6A98986EA8082368448 /* TestTweens.h */, 
-				67194AC90FEA68E7C96E6907 /* TestUserShader.h */, 
+				7623D793B59EF0CD569E6EC2 /* TestInputText.h */, 
+				AFA30E959880563E6ABBBC4F /* TestManageRes.h */, 
+				B52CCD463855CF91A7FBDB8E /* TestMask.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* TestPerf.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* TestProgressBar.h */, 
+				8F2AFB956EEAEED67C5B7571 /* TestRender2Texture.h */, 
+				047F6BD19F885FF186A1447C /* TestSliding.h */, 
+				C570FAEF487CD34B62389F89 /* TestTexel2Pixel.h */, 
+				2418B9A339E6004913AF5980 /* TestText.h */, 
+				CAD9D6A98986EA8082368448 /* TestTextureFormat.h */, 
+				67194AC90FEA68E7C96E6907 /* TestTweens.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* TestUserShader.h */, 
 
 
 			);
 			);
 			name = src;
 			name = src;

+ 24 - 22
examples/Demo/proj.macosx/demo_macosx.xcodeproj/project.pbxproj

@@ -102,17 +102,18 @@
 		7746CA7A63049ED8F7D6BF42 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
 		7746CA7A63049ED8F7D6BF42 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/TestInputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestInputText.h; path = ../src/TestInputText.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
 		04FE4D4FB640E0DF92DFB865 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
 		04FE4D4FB640E0DF92DFB865 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
 		7F3B12E3C9D554D9FE28101D /* ../data/demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = demo; path = ../data/demo; sourceTree = "<group>"; };
 		7F3B12E3C9D554D9FE28101D /* ../data/demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = demo; path = ../data/demo; sourceTree = "<group>"; };
 		F6123B1E6FE4471A00F49751 /* ../data/ext */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = ext; path = ../data/ext; sourceTree = "<group>"; };
 		F6123B1E6FE4471A00F49751 /* ../data/ext */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = ext; path = ../data/ext; sourceTree = "<group>"; };
@@ -228,17 +229,18 @@
 				7746CA7A63049ED8F7D6BF42 /* TestBox9Sprite.h */, 
 				7746CA7A63049ED8F7D6BF42 /* TestBox9Sprite.h */, 
 				D954BD82D7708B65A08FB6B9 /* TestClipRect.h */, 
 				D954BD82D7708B65A08FB6B9 /* TestClipRect.h */, 
 				BD0E956CC3A2F7EB94822B5C /* TestDrag.h */, 
 				BD0E956CC3A2F7EB94822B5C /* TestDrag.h */, 
-				7623D793B59EF0CD569E6EC2 /* TestManageRes.h */, 
-				AFA30E959880563E6ABBBC4F /* TestMask.h */, 
-				B52CCD463855CF91A7FBDB8E /* TestPerf.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* TestProgressBar.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* TestRender2Texture.h */, 
-				8F2AFB956EEAEED67C5B7571 /* TestSliding.h */, 
-				047F6BD19F885FF186A1447C /* TestTexel2Pixel.h */, 
-				C570FAEF487CD34B62389F89 /* TestText.h */, 
-				2418B9A339E6004913AF5980 /* TestTextureFormat.h */, 
-				CAD9D6A98986EA8082368448 /* TestTweens.h */, 
-				67194AC90FEA68E7C96E6907 /* TestUserShader.h */, 
+				7623D793B59EF0CD569E6EC2 /* TestInputText.h */, 
+				AFA30E959880563E6ABBBC4F /* TestManageRes.h */, 
+				B52CCD463855CF91A7FBDB8E /* TestMask.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* TestPerf.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* TestProgressBar.h */, 
+				8F2AFB956EEAEED67C5B7571 /* TestRender2Texture.h */, 
+				047F6BD19F885FF186A1447C /* TestSliding.h */, 
+				C570FAEF487CD34B62389F89 /* TestTexel2Pixel.h */, 
+				2418B9A339E6004913AF5980 /* TestText.h */, 
+				CAD9D6A98986EA8082368448 /* TestTextureFormat.h */, 
+				67194AC90FEA68E7C96E6907 /* TestTweens.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* TestUserShader.h */, 
 
 
 			);
 			);
 			name = src;
 			name = src;

+ 1 - 1
examples/Demo/proj.win32/Demo.vcxproj

@@ -95,7 +95,7 @@
     <ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/test.cpp" />
     <ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/test.cpp" />
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/example.h" /><ClInclude Include="../src/test.h" /><ClInclude Include="../src/TestBox9Sprite.h" /><ClInclude Include="../src/TestClipRect.h" /><ClInclude Include="../src/TestDrag.h" /><ClInclude Include="../src/TestManageRes.h" /><ClInclude Include="../src/TestMask.h" /><ClInclude Include="../src/TestPerf.h" /><ClInclude Include="../src/TestProgressBar.h" /><ClInclude Include="../src/TestRender2Texture.h" /><ClInclude Include="../src/TestSliding.h" /><ClInclude Include="../src/TestTexel2Pixel.h" /><ClInclude Include="../src/TestText.h" /><ClInclude Include="../src/TestTextureFormat.h" /><ClInclude Include="../src/TestTweens.h" /><ClInclude Include="../src/TestUserShader.h" />
+    <ClInclude Include="../src/example.h" /><ClInclude Include="../src/test.h" /><ClInclude Include="../src/TestBox9Sprite.h" /><ClInclude Include="../src/TestClipRect.h" /><ClInclude Include="../src/TestDrag.h" /><ClInclude Include="../src/TestInputText.h" /><ClInclude Include="../src/TestManageRes.h" /><ClInclude Include="../src/TestMask.h" /><ClInclude Include="../src/TestPerf.h" /><ClInclude Include="../src/TestProgressBar.h" /><ClInclude Include="../src/TestRender2Texture.h" /><ClInclude Include="../src/TestSliding.h" /><ClInclude Include="../src/TestTexel2Pixel.h" /><ClInclude Include="../src/TestText.h" /><ClInclude Include="../src/TestTextureFormat.h" /><ClInclude Include="../src/TestTweens.h" /><ClInclude Include="../src/TestUserShader.h" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   <ImportGroup Label="ExtensionTargets">

+ 4 - 0
examples/Demo/proj.win32/Demo.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 95 - 0
examples/Demo/src/TestInputText.h

@@ -0,0 +1,95 @@
+#pragma once
+#include "test.h"
+#include "InputText.h"
+
+
+
+
+DECLARE_SMART(TextWithBackground, spTextWithBackground);
+class TextWithBackground: public ColorRectSprite
+{
+public:
+	TextWithBackground(const string &defText)
+	{
+		text = new TextActor;
+		//text won't handle any touch event
+		text->setInputEnabled(false);
+
+		TextStyle style;
+		style.color = Color::Black;
+		style.hAlign = TextStyle::HALIGN_CENTER;
+		style.vAlign = TextStyle::VALIGN_MIDDLE;
+		style.multiline = true;
+		style.font = resourcesUI.getResFont("big")->getFont();
+		text->setStyle(style);
+		text->setText(defText);
+
+		addChild(text);		
+	}
+
+	spTextActor text;
+
+	void sizeChanged(const Vector2 &size)
+	{
+		text->setSize(size);
+	}
+};
+
+class TestInputText: public Test
+{
+public:
+	spInputText _input;
+	spTextWithBackground _current;
+
+	TestInputText()	
+	{
+		_input = new InputText;
+		//_input->setAllowedSymbols("1234567890");
+		//_input->setDisallowedSymbols("0");
+		_input->addEventListener(Event::COMPLETE, CLOSURE(this, &TestInputText::onComplete));
+
+		spTextWithBackground t = new TextWithBackground("click and edit me 1");
+		t->setSize(200, 60);
+		t->setPosition(content->getWidth()/2 - t->getWidth()/2, 100);
+		t->attachTo(this);
+		t->addEventListener(TouchEvent::CLICK, CLOSURE(this, &TestInputText::onClick));
+
+		t = new TextWithBackground("click and edit me 2");		
+		t->setSize(200, 60);
+		t->setPosition(content->getWidth()/2 - t->getWidth()/2, 170);
+		t->attachTo(this);
+		t->addEventListener(TouchEvent::CLICK, CLOSURE(this, &TestInputText::onClick));
+	}
+
+	void onClick(Event *ev)
+	{
+		if (_current)
+		{
+			_current->setColor(Color::White);
+		}
+
+		_current = safeSpCast<TextWithBackground>(ev->currentTarget);
+		_input->start(_current->text);
+		_current->setColor(Color::Red);
+	}
+
+	void onComplete(Event *ev)
+	{
+		if (_current)
+		{
+			_current->setColor(Color::White);
+		}
+		_current = 0;
+		InputText::stopAnyInput();
+	}
+
+	~TestInputText()
+	{
+		InputText::stopAnyInput();
+	}
+
+	void clicked(string id)
+	{		
+		
+	}
+};

+ 8 - 0
examples/Demo/src/example.cpp

@@ -15,6 +15,7 @@
 #include "TestClipRect.h"
 #include "TestClipRect.h"
 #include "TestUserShader.h"
 #include "TestUserShader.h"
 #include "TestMask.h"
 #include "TestMask.h"
+#include "TestInputText.h"
 #include "core/STDFileSystem.h"
 #include "core/STDFileSystem.h"
 
 
 #ifdef __S3E__
 #ifdef __S3E__
@@ -56,6 +57,8 @@ public:
 		addButton("cliprect", "ClipRect Actor");		
 		addButton("cliprect", "ClipRect Actor");		
 		addButton("usershader", "User Shader");		
 		addButton("usershader", "User Shader");		
 		addButton("mask", "Mask");		
 		addButton("mask", "Mask");		
+		addButton("inputtext", "Input Text");		
+		
 	}
 	}
 
 
 	void clicked(string id)
 	void clicked(string id)
@@ -130,6 +133,11 @@ public:
 		{
 		{
 			getRoot()->addChild(new TestMask);
 			getRoot()->addChild(new TestMask);
 		}
 		}
+
+		if (id == "inputtext")
+		{
+			getRoot()->addChild(new TestInputText);
+		}
 	}
 	}
 };
 };
 
 

+ 0 - 12
examples/Game/part1/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 4 - 0
examples/Game/part1/proj.win32/GamePart1.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 0 - 12
examples/Game/part2/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 4 - 0
examples/Game/part2/proj.win32/GamePart2.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 0 - 12
examples/Game/part3/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 32 - 48
examples/Game/part3/proj.ios/GamePart3_ios.xcodeproj/project.pbxproj

@@ -33,12 +33,8 @@
 		F87DC9641C1B8FCF28948580 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */; };
 		F87DC9641C1B8FCF28948580 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */; };
 		9850666D9BEB7BAAA6AAECDC /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */; };
 		9850666D9BEB7BAAA6AAECDC /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */; };
 		33E41D858B2ABD49382CD53F /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */; };
 		33E41D858B2ABD49382CD53F /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */; };
-		3BB41671209E30BDF95D1B16 /* ../data/glew32.dll in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../data/glew32.dll */; };
-		E02A0627DE00D04110ABADA6 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/images */; };
-		2EDD01D75F08726BE081C106 /* ../data/pthreadVCE2.dll in Sources */ = {isa = PBXBuildFile; fileRef = B52CCD463855CF91A7FBDB8E /* ../data/pthreadVCE2.dll */; };
-		D42581590DA5455B882E551F /* ../data/SDL2.dll in Sources */ = {isa = PBXBuildFile; fileRef = 7EEFDEEC289FCBB5FA67F822 /* ../data/SDL2.dll */; };
-		A9E26B018414A811DA2D05DB /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 4E9DE6A8FCBDF43BC876EC90 /* ../data/xmls */; };
-		D734B014EBF89888DF6A4489 /* ../data/zlib1.dll in Sources */ = {isa = PBXBuildFile; fileRef = 8F2AFB956EEAEED67C5B7571 /* ../data/zlib1.dll */; };
+		3BB41671209E30BDF95D1B16 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../data/images */; };
+		E02A0627DE00D04110ABADA6 /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/xmls */; };
 
 
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
 
 
@@ -101,24 +97,20 @@
 		7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
 		7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
-		12CAC42FDF06ABE860CFEA53 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
-		0F4469FB587862663D529DC9 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		B6A9281364AF5D3B581D374C /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		4013C6794AAE8DFC641D2870 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		22E408FD6FCDA6E7E8E76952 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
-		C0253E2158DFD901AD4F8991 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../data/glew32.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = glew32.dll; path = ../data/glew32.dll; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../data/pthreadVCE2.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = pthreadVCE2.dll; path = ../data/pthreadVCE2.dll; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../data/SDL2.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = SDL2.dll; path = ../data/SDL2.dll; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../data/zlib1.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = zlib1.dll; path = ../data/zlib1.dll; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		12CAC42FDF06ABE860CFEA53 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
+		0F4469FB587862663D529DC9 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
 
 /* End PBXFileReference section */
 /* End PBXFileReference section */
 
 
@@ -195,12 +187,8 @@
 		04998CF617F8A933003441C3 /* Supporting Files */ = {
 		04998CF617F8A933003441C3 /* Supporting Files */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				7623D793B59EF0CD569E6EC2 /* glew32.dll */, 
-				AFA30E959880563E6ABBBC4F /* images */, 
-				B52CCD463855CF91A7FBDB8E /* pthreadVCE2.dll */, 
-				7EEFDEEC289FCBB5FA67F822 /* SDL2.dll */, 
-				4E9DE6A8FCBDF43BC876EC90 /* xmls */, 
-				8F2AFB956EEAEED67C5B7571 /* zlib1.dll */, 
+				7623D793B59EF0CD569E6EC2 /* images */, 
+				AFA30E959880563E6ABBBC4F /* xmls */, 
 
 
 			);
 			);
 			name = "Supporting Files";
 			name = "Supporting Files";
@@ -230,18 +218,18 @@
 				7746CA7A63049ED8F7D6BF42 /* Rocket.cpp */, 
 				7746CA7A63049ED8F7D6BF42 /* Rocket.cpp */, 
 				D954BD82D7708B65A08FB6B9 /* Scene.cpp */, 
 				D954BD82D7708B65A08FB6B9 /* Scene.cpp */, 
 				BD0E956CC3A2F7EB94822B5C /* Unit.cpp */, 
 				BD0E956CC3A2F7EB94822B5C /* Unit.cpp */, 
-				047F6BD19F885FF186A1447C /* Enemy.h */, 
-				C570FAEF487CD34B62389F89 /* example.h */, 
-				2418B9A339E6004913AF5980 /* Game.h */, 
-				CAD9D6A98986EA8082368448 /* GameScene.h */, 
-				67194AC90FEA68E7C96E6907 /* Joystick.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* MainMenuScene.h */, 
-				12CAC42FDF06ABE860CFEA53 /* MyButton.h */, 
-				0F4469FB587862663D529DC9 /* Player.h */, 
-				B6A9281364AF5D3B581D374C /* res.h */, 
-				4013C6794AAE8DFC641D2870 /* Rocket.h */, 
-				22E408FD6FCDA6E7E8E76952 /* Scene.h */, 
-				C0253E2158DFD901AD4F8991 /* Unit.h */, 
+				B52CCD463855CF91A7FBDB8E /* Enemy.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* example.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* Game.h */, 
+				8F2AFB956EEAEED67C5B7571 /* GameScene.h */, 
+				047F6BD19F885FF186A1447C /* Joystick.h */, 
+				C570FAEF487CD34B62389F89 /* MainMenuScene.h */, 
+				2418B9A339E6004913AF5980 /* MyButton.h */, 
+				CAD9D6A98986EA8082368448 /* Player.h */, 
+				67194AC90FEA68E7C96E6907 /* res.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* Rocket.h */, 
+				12CAC42FDF06ABE860CFEA53 /* Scene.h */, 
+				0F4469FB587862663D529DC9 /* Unit.h */, 
 
 
 			);
 			);
 			name = src;
 			name = src;
@@ -337,12 +325,8 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */,
 				04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */,
-				3BB41671209E30BDF95D1B16 /* glew32.dll */, 
-				E02A0627DE00D04110ABADA6 /* images */, 
-				2EDD01D75F08726BE081C106 /* pthreadVCE2.dll */, 
-				D42581590DA5455B882E551F /* SDL2.dll */, 
-				A9E26B018414A811DA2D05DB /* xmls */, 
-				D734B014EBF89888DF6A4489 /* zlib1.dll */, 
+				3BB41671209E30BDF95D1B16 /* images */, 
+				E02A0627DE00D04110ABADA6 /* xmls */, 
 
 
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;

+ 32 - 48
examples/Game/part3/proj.macosx/GamePart3_macosx.xcodeproj/project.pbxproj

@@ -28,12 +28,8 @@
 		F87DC9641C1B8FCF28948580 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */; };
 		F87DC9641C1B8FCF28948580 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */; };
 		9850666D9BEB7BAAA6AAECDC /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */; };
 		9850666D9BEB7BAAA6AAECDC /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */; };
 		33E41D858B2ABD49382CD53F /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */; };
 		33E41D858B2ABD49382CD53F /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */; };
-		3BB41671209E30BDF95D1B16 /* ../data/glew32.dll in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../data/glew32.dll */; };
-		E02A0627DE00D04110ABADA6 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/images */; };
-		2EDD01D75F08726BE081C106 /* ../data/pthreadVCE2.dll in Sources */ = {isa = PBXBuildFile; fileRef = B52CCD463855CF91A7FBDB8E /* ../data/pthreadVCE2.dll */; };
-		D42581590DA5455B882E551F /* ../data/SDL2.dll in Sources */ = {isa = PBXBuildFile; fileRef = 7EEFDEEC289FCBB5FA67F822 /* ../data/SDL2.dll */; };
-		A9E26B018414A811DA2D05DB /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 4E9DE6A8FCBDF43BC876EC90 /* ../data/xmls */; };
-		D734B014EBF89888DF6A4489 /* ../data/zlib1.dll in Sources */ = {isa = PBXBuildFile; fileRef = 8F2AFB956EEAEED67C5B7571 /* ../data/zlib1.dll */; };
+		3BB41671209E30BDF95D1B16 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../data/images */; };
+		E02A0627DE00D04110ABADA6 /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/xmls */; };
 
 
 		
 		
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
@@ -118,24 +114,20 @@
 		7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
 		7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
 		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
-		12CAC42FDF06ABE860CFEA53 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
-		0F4469FB587862663D529DC9 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		B6A9281364AF5D3B581D374C /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		4013C6794AAE8DFC641D2870 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		22E408FD6FCDA6E7E8E76952 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
-		C0253E2158DFD901AD4F8991 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../data/glew32.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = glew32.dll; path = ../data/glew32.dll; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../data/pthreadVCE2.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = pthreadVCE2.dll; path = ../data/pthreadVCE2.dll; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../data/SDL2.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = SDL2.dll; path = ../data/SDL2.dll; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../data/zlib1.dll */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = zlib1.dll; path = ../data/zlib1.dll; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		12CAC42FDF06ABE860CFEA53 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
+		0F4469FB587862663D529DC9 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
 
 		04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = oxygine_macosx.xcodeproj; path = ../../../../..//oxygine-framework/oxygine/SDL/macosx/oxygine_macosx/oxygine_macosx.xcodeproj; sourceTree = "<group>"; };
 		04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = oxygine_macosx.xcodeproj; path = ../../../../..//oxygine-framework/oxygine/SDL/macosx/oxygine_macosx/oxygine_macosx.xcodeproj; sourceTree = "<group>"; };
 		04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../../..//SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
 		04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../../..//SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
@@ -224,12 +216,8 @@
 		049B57381871FBE900EF3C66 /* Supporting Files */ = {
 		049B57381871FBE900EF3C66 /* Supporting Files */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
-				7623D793B59EF0CD569E6EC2 /* glew32.dll */, 
-				AFA30E959880563E6ABBBC4F /* images */, 
-				B52CCD463855CF91A7FBDB8E /* pthreadVCE2.dll */, 
-				7EEFDEEC289FCBB5FA67F822 /* SDL2.dll */, 
-				4E9DE6A8FCBDF43BC876EC90 /* xmls */, 
-				8F2AFB956EEAEED67C5B7571 /* zlib1.dll */, 
+				7623D793B59EF0CD569E6EC2 /* images */, 
+				AFA30E959880563E6ABBBC4F /* xmls */, 
 
 
 				049B57391871FBE900EF3C66 /* GamePart3_macosx-Info.plist */,
 				049B57391871FBE900EF3C66 /* GamePart3_macosx-Info.plist */,
 			);
 			);
@@ -252,18 +240,18 @@
 				7746CA7A63049ED8F7D6BF42 /* Rocket.cpp */, 
 				7746CA7A63049ED8F7D6BF42 /* Rocket.cpp */, 
 				D954BD82D7708B65A08FB6B9 /* Scene.cpp */, 
 				D954BD82D7708B65A08FB6B9 /* Scene.cpp */, 
 				BD0E956CC3A2F7EB94822B5C /* Unit.cpp */, 
 				BD0E956CC3A2F7EB94822B5C /* Unit.cpp */, 
-				047F6BD19F885FF186A1447C /* Enemy.h */, 
-				C570FAEF487CD34B62389F89 /* example.h */, 
-				2418B9A339E6004913AF5980 /* Game.h */, 
-				CAD9D6A98986EA8082368448 /* GameScene.h */, 
-				67194AC90FEA68E7C96E6907 /* Joystick.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* MainMenuScene.h */, 
-				12CAC42FDF06ABE860CFEA53 /* MyButton.h */, 
-				0F4469FB587862663D529DC9 /* Player.h */, 
-				B6A9281364AF5D3B581D374C /* res.h */, 
-				4013C6794AAE8DFC641D2870 /* Rocket.h */, 
-				22E408FD6FCDA6E7E8E76952 /* Scene.h */, 
-				C0253E2158DFD901AD4F8991 /* Unit.h */, 
+				B52CCD463855CF91A7FBDB8E /* Enemy.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* example.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* Game.h */, 
+				8F2AFB956EEAEED67C5B7571 /* GameScene.h */, 
+				047F6BD19F885FF186A1447C /* Joystick.h */, 
+				C570FAEF487CD34B62389F89 /* MainMenuScene.h */, 
+				2418B9A339E6004913AF5980 /* MyButton.h */, 
+				CAD9D6A98986EA8082368448 /* Player.h */, 
+				67194AC90FEA68E7C96E6907 /* res.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* Rocket.h */, 
+				12CAC42FDF06ABE860CFEA53 /* Scene.h */, 
+				0F4469FB587862663D529DC9 /* Unit.h */, 
 
 
 			);
 			);
 			name = src;
 			name = src;
@@ -382,12 +370,8 @@
 			isa = PBXResourcesBuildPhase;
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
-				3BB41671209E30BDF95D1B16 /* glew32.dll */, 
-				E02A0627DE00D04110ABADA6 /* images */, 
-				2EDD01D75F08726BE081C106 /* pthreadVCE2.dll */, 
-				D42581590DA5455B882E551F /* SDL2.dll */, 
-				A9E26B018414A811DA2D05DB /* xmls */, 
-				D734B014EBF89888DF6A4489 /* zlib1.dll */, 
+				3BB41671209E30BDF95D1B16 /* images */, 
+				E02A0627DE00D04110ABADA6 /* xmls */, 
 
 
 				049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */,
 				049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */,
 			);
 			);

+ 4 - 0
examples/Game/part3/proj.win32/GamePart3.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 0 - 12
examples/Game/part4/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 4 - 0
examples/Game/part4/proj.win32/GamePart4.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 0 - 12
examples/HelloWorld/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 4 - 0
examples/HelloWorld/proj.win32/HelloWorld.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 0 - 12
examples/Match3/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 4 - 0
examples/Match3/proj.win32/Match3.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 0 - 0
libs/.empty


+ 0 - 10
oxygine/SDL/android/lib/local.properties

@@ -1,10 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-sdk.dir=d:/android/android-sdk/

+ 1 - 0
oxygine/SDL/android/lib/src/org/libsdl/app/.empty

@@ -0,0 +1 @@
+copy sdl java source

+ 0 - 1040
oxygine/SDL/android/lib/src/org/libsdl/app/SDLActivity.java

@@ -1,1040 +0,0 @@
-package org.libsdl.app;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import android.app.*;
-import android.content.*;
-import android.view.*;
-import android.view.inputmethod.BaseInputConnection;
-import android.view.inputmethod.EditorInfo;
-import android.view.inputmethod.InputConnection;
-import android.view.inputmethod.InputMethodManager;
-import android.widget.AbsoluteLayout;
-import android.os.*;
-import android.util.Log;
-import android.graphics.*;
-import android.media.*;
-import android.hardware.*;
-
-
-/**
-    SDL Activity
-*/
-public class SDLActivity extends Activity {
-    private static final String TAG = "SDL";
-
-    // Keep track of the paused state
-    public static boolean mIsPaused = false, mIsSurfaceReady = false, mHasFocus = true;
-    public static boolean mExitCalledFromJava;
-
-    // Main components
-    protected static SDLActivity mSingleton;
-    protected static SDLSurface mSurface;
-    protected static View mTextEdit;
-    protected static ViewGroup mLayout;
-    protected static SDLJoystickHandler mJoystickHandler;
-
-    // This is what SDL runs in. It invokes SDL_main(), eventually
-    protected static Thread mSDLThread;
-    
-    // Audio
-    protected static AudioTrack mAudioTrack;
-
-    // Load the .so
-    static {
-        System.loadLibrary("SDL2");
-        //System.loadLibrary("SDL2_image");
-        //System.loadLibrary("SDL2_mixer");
-        //System.loadLibrary("SDL2_net");
-        //System.loadLibrary("SDL2_ttf");
-        System.loadLibrary("main");
-    }
-
-    // Setup
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        //Log.v("SDL", "onCreate()");
-        super.onCreate(savedInstanceState);
-        
-        // So we can call stuff from static callbacks
-        mSingleton = this;
-
-        // Set up the surface
-        mSurface = new SDLSurface(getApplication());
-        
-        // Make sure this variable is initialized here!
-        mExitCalledFromJava = false;
-        
-        if(Build.VERSION.SDK_INT >= 12) {
-            mJoystickHandler = new SDLJoystickHandler_API12();
-        }
-        else {
-            mJoystickHandler = new SDLJoystickHandler();
-        }
-
-        mLayout = new AbsoluteLayout(this);
-        mLayout.addView(mSurface);
-
-        setContentView(mLayout);
-    }
-
-    // Events
-    @Override
-    protected void onPause() {
-        Log.v("SDL", "onPause()");
-        super.onPause();
-        SDLActivity.handlePause();
-    }
-
-    @Override
-    protected void onResume() {
-        Log.v("SDL", "onResume()");
-        super.onResume();
-        SDLActivity.handleResume();
-    }
-
-
-    @Override
-    public void onWindowFocusChanged(boolean hasFocus) {
-        super.onWindowFocusChanged(hasFocus);
-        Log.v("SDL", "onWindowFocusChanged(): " + hasFocus);
-
-        SDLActivity.mHasFocus = hasFocus;
-        if (hasFocus) {
-            SDLActivity.handleResume();
-        }
-    }
-
-    @Override
-    public void onLowMemory() {
-        Log.v("SDL", "onLowMemory()");
-        super.onLowMemory();
-        SDLActivity.nativeLowMemory();
-    }
-
-    @Override
-    protected void onDestroy() {
-        super.onDestroy();
-        Log.v("SDL", "onDestroy()");
-        // Send a quit message to the application
-        SDLActivity.mExitCalledFromJava = true;
-        SDLActivity.nativeQuit();
-
-        // Now wait for the SDL thread to quit
-        if (SDLActivity.mSDLThread != null) {
-            try {
-                SDLActivity.mSDLThread.join();
-            } catch(Exception e) {
-                Log.v("SDL", "Problem stopping thread: " + e);
-            }
-            SDLActivity.mSDLThread = null;
-
-            //Log.v("SDL", "Finished waiting for SDL thread");
-        }
-    }
-
-    @Override
-    public boolean dispatchKeyEvent(KeyEvent event) {
-        int keyCode = event.getKeyCode();
-        // Ignore certain special keys so they're handled by Android
-        if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN ||
-            keyCode == KeyEvent.KEYCODE_VOLUME_UP ||
-            keyCode == KeyEvent.KEYCODE_CAMERA ||
-            keyCode == 168 || /* API 11: KeyEvent.KEYCODE_ZOOM_IN */
-            keyCode == 169 /* API 11: KeyEvent.KEYCODE_ZOOM_OUT */
-            ) {
-            return false;
-        }
-        return super.dispatchKeyEvent(event);
-    }
-
-    /** Called by onPause or surfaceDestroyed. Even if surfaceDestroyed
-     *  is the first to be called, mIsSurfaceReady should still be set
-     *  to 'true' during the call to onPause (in a usual scenario).
-     */
-    public static void handlePause() {
-        if (!SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady) {
-            SDLActivity.mIsPaused = true;
-            SDLActivity.nativePause();
-            mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, false);
-        }
-    }
-
-    /** Called by onResume or surfaceCreated. An actual resume should be done only when the surface is ready.
-     * Note: Some Android variants may send multiple surfaceChanged events, so we don't need to resume
-     * every time we get one of those events, only if it comes after surfaceDestroyed
-     */
-    public static void handleResume() {
-        if (SDLActivity.mIsPaused && SDLActivity.mIsSurfaceReady && SDLActivity.mHasFocus) {
-            SDLActivity.mIsPaused = false;
-            SDLActivity.nativeResume();
-            mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
-        }
-    }
-        
-    /* The native thread has finished */
-    public static void handleNativeExit() {
-        SDLActivity.mSDLThread = null;
-        mSingleton.finish();
-    }
-
-
-    // Messages from the SDLMain thread
-    static final int COMMAND_CHANGE_TITLE = 1;
-    static final int COMMAND_UNUSED = 2;
-    static final int COMMAND_TEXTEDIT_HIDE = 3;
-
-    protected static final int COMMAND_USER = 0x8000;
-
-    /**
-     * This method is called by SDL if SDL did not handle a message itself.
-     * This happens if a received message contains an unsupported command.
-     * Method can be overwritten to handle Messages in a different class.
-     * @param command the command of the message.
-     * @param param the parameter of the message. May be null.
-     * @return if the message was handled in overridden method.
-     */
-    protected boolean onUnhandledMessage(int command, Object param) {
-        return false;
-    }
-
-    /**
-     * A Handler class for Messages from native SDL applications.
-     * It uses current Activities as target (e.g. for the title).
-     * static to prevent implicit references to enclosing object.
-     */
-    protected static class SDLCommandHandler extends Handler {
-        @Override
-        public void handleMessage(Message msg) {
-            Context context = getContext();
-            if (context == null) {
-                Log.e(TAG, "error handling message, getContext() returned null");
-                return;
-            }
-            switch (msg.arg1) {
-            case COMMAND_CHANGE_TITLE:
-                if (context instanceof Activity) {
-                    ((Activity) context).setTitle((String)msg.obj);
-                } else {
-                    Log.e(TAG, "error handling message, getContext() returned no Activity");
-                }
-                break;
-            case COMMAND_TEXTEDIT_HIDE:
-                if (mTextEdit != null) {
-                    mTextEdit.setVisibility(View.GONE);
-
-                    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
-                    imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
-                }
-                break;
-
-            default:
-                if ((context instanceof SDLActivity) && !((SDLActivity) context).onUnhandledMessage(msg.arg1, msg.obj)) {
-                    Log.e(TAG, "error handling message, command is " + msg.arg1);
-                }
-            }
-        }
-    }
-
-    // Handler for the messages
-    Handler commandHandler = new SDLCommandHandler();
-
-    // Send a message from the SDLMain thread
-    boolean sendCommand(int command, Object data) {
-        Message msg = commandHandler.obtainMessage();
-        msg.arg1 = command;
-        msg.obj = data;
-        return commandHandler.sendMessage(msg);
-    }
-
-    // C functions we call
-    public static native void nativeInit();
-    public static native void nativeLowMemory();
-    public static native void nativeQuit();
-    public static native void nativePause();
-    public static native void nativeResume();
-    public static native void onNativeResize(int x, int y, int format);
-    public static native int onNativePadDown(int device_id, int keycode);
-    public static native int onNativePadUp(int device_id, int keycode);
-    public static native void onNativeJoy(int device_id, int axis,
-                                          float value);
-    public static native void onNativeKeyDown(int keycode);
-    public static native void onNativeKeyUp(int keycode);
-    public static native void onNativeKeyboardFocusLost();
-    public static native void onNativeTouch(int touchDevId, int pointerFingerId,
-                                            int action, float x, 
-                                            float y, float p);
-    public static native void onNativeAccel(float x, float y, float z);
-    public static native void onNativeSurfaceChanged();
-    public static native void onNativeSurfaceDestroyed();
-    public static native void nativeFlipBuffers();
-    public static native int nativeAddJoystick(int device_id, String name, 
-                                               int is_accelerometer, int nbuttons, 
-                                               int naxes, int nhats, int nballs);
-    public static native int nativeRemoveJoystick(int device_id);
-
-    public static void flipBuffers() {
-        SDLActivity.nativeFlipBuffers();
-    }
-
-    public static boolean setActivityTitle(String title) {
-        // Called from SDLMain() thread and can't directly affect the view
-        return mSingleton.sendCommand(COMMAND_CHANGE_TITLE, title);
-    }
-
-    public static boolean sendMessage(int command, int param) {
-        return mSingleton.sendCommand(command, Integer.valueOf(param));
-    }
-
-    public static Context getContext() {
-        return mSingleton;
-    }
-
-    /**
-     * @return result of getSystemService(name) but executed on UI thread.
-     */
-    public Object getSystemServiceFromUiThread(final String name) {
-        final Object lock = new Object();
-        final Object[] results = new Object[2]; // array for writable variables
-        synchronized (lock) {
-            runOnUiThread(new Runnable() {
-                @Override
-                public void run() {
-                    synchronized (lock) {
-                        results[0] = getSystemService(name);
-                        results[1] = Boolean.TRUE;
-                        lock.notify();
-                    }
-                }
-            });
-            if (results[1] == null) {
-                try {
-                    lock.wait();
-                } catch (InterruptedException ex) {
-                    ex.printStackTrace();
-                }
-            }
-        }
-        return results[0];
-    }
-
-    static class ShowTextInputTask implements Runnable {
-        /*
-         * This is used to regulate the pan&scan method to have some offset from
-         * the bottom edge of the input region and the top edge of an input
-         * method (soft keyboard)
-         */
-        static final int HEIGHT_PADDING = 15;
-
-        public int x, y, w, h;
-
-        public ShowTextInputTask(int x, int y, int w, int h) {
-            this.x = x;
-            this.y = y;
-            this.w = w;
-            this.h = h;
-        }
-
-        @Override
-        public void run() {
-            AbsoluteLayout.LayoutParams params = new AbsoluteLayout.LayoutParams(
-                    w, h + HEIGHT_PADDING, x, y);
-
-            if (mTextEdit == null) {
-                mTextEdit = new DummyEdit(getContext());
-
-                mLayout.addView(mTextEdit, params);
-            } else {
-                mTextEdit.setLayoutParams(params);
-            }
-
-            mTextEdit.setVisibility(View.VISIBLE);
-            mTextEdit.requestFocus();
-
-            InputMethodManager imm = (InputMethodManager) getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
-            imm.showSoftInput(mTextEdit, 0);
-        }
-    }
-
-    public static boolean showTextInput(int x, int y, int w, int h) {
-        // Transfer the task to the main thread as a Runnable
-        return mSingleton.commandHandler.post(new ShowTextInputTask(x, y, w, h));
-    }
-            
-    public static Surface getNativeSurface() {
-        return SDLActivity.mSurface.getNativeSurface();
-    }
-
-    // Audio
-    public static int audioInit(int sampleRate, boolean is16Bit, boolean isStereo, int desiredFrames) {
-        int channelConfig = isStereo ? AudioFormat.CHANNEL_CONFIGURATION_STEREO : AudioFormat.CHANNEL_CONFIGURATION_MONO;
-        int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT;
-        int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1);
-        
-        Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + (sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer");
-        
-        // Let the user pick a larger buffer if they really want -- but ye
-        // gods they probably shouldn't, the minimums are horrifyingly high
-        // latency already
-        desiredFrames = Math.max(desiredFrames, (AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat) + frameSize - 1) / frameSize);
-        
-        if (mAudioTrack == null) {
-            mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate,
-                    channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
-            
-            // Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
-            // Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
-            // Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
-            
-            if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
-                Log.e("SDL", "Failed during initialization of Audio Track");
-                mAudioTrack = null;
-                return -1;
-            }
-            
-            mAudioTrack.play();
-        }
-       
-        Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + (mAudioTrack.getSampleRate() / 1000f) + "kHz, " + desiredFrames + " frames buffer");
-        
-        return 0;
-    }
-    
-    public static void audioWriteShortBuffer(short[] buffer) {
-        for (int i = 0; i < buffer.length; ) {
-            int result = mAudioTrack.write(buffer, i, buffer.length - i);
-            if (result > 0) {
-                i += result;
-            } else if (result == 0) {
-                try {
-                    Thread.sleep(1);
-                } catch(InterruptedException e) {
-                    // Nom nom
-                }
-            } else {
-                Log.w("SDL", "SDL audio: error return from write(short)");
-                return;
-            }
-        }
-    }
-    
-    public static void audioWriteByteBuffer(byte[] buffer) {
-        for (int i = 0; i < buffer.length; ) {
-            int result = mAudioTrack.write(buffer, i, buffer.length - i);
-            if (result > 0) {
-                i += result;
-            } else if (result == 0) {
-                try {
-                    Thread.sleep(1);
-                } catch(InterruptedException e) {
-                    // Nom nom
-                }
-            } else {
-                Log.w("SDL", "SDL audio: error return from write(byte)");
-                return;
-            }
-        }
-    }
-
-    public static void audioQuit() {
-        if (mAudioTrack != null) {
-            mAudioTrack.stop();
-            mAudioTrack = null;
-        }
-    }
-
-    // Input
-
-    /**
-     * @return an array which may be empty but is never null.
-     */
-    public static int[] inputGetInputDeviceIds(int sources) {
-        int[] ids = InputDevice.getDeviceIds();
-        int[] filtered = new int[ids.length];
-        int used = 0;
-        for (int i = 0; i < ids.length; ++i) {
-            InputDevice device = InputDevice.getDevice(ids[i]);
-            if ((device != null) && ((device.getSources() & sources) != 0)) {
-                filtered[used++] = device.getId();
-            }
-        }
-        return Arrays.copyOf(filtered, used);
-    }
-            
-    // Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance
-    public static boolean handleJoystickMotionEvent(MotionEvent event) {
-        return mJoystickHandler.handleMotionEvent(event);
-    }
-    
-    public static void pollInputDevices() {
-        if (SDLActivity.mSDLThread != null) {
-            mJoystickHandler.pollInputDevices();
-        }
-    }
-    
-}
-
-/**
-    Simple nativeInit() runnable
-*/
-class SDLMain implements Runnable {
-    @Override
-    public void run() {
-        // Runs SDL_main()
-        SDLActivity.nativeInit();
-
-        //Log.v("SDL", "SDL thread terminated");
-    }
-}
-
-
-/**
-    SDLSurface. This is what we draw on, so we need to know when it's created
-    in order to do anything useful. 
-
-    Because of this, that's where we set up the SDL thread
-*/
-class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, 
-    View.OnKeyListener, View.OnTouchListener, SensorEventListener  {
-
-    // Sensors
-    protected static SensorManager mSensorManager;
-    protected static Display mDisplay;
-
-    // Keep track of the surface size to normalize touch events
-    protected static float mWidth, mHeight;
-
-    // Startup    
-    public SDLSurface(Context context) {
-        super(context);
-        getHolder().addCallback(this); 
-    
-        setFocusable(true);
-        setFocusableInTouchMode(true);
-        requestFocus();
-        setOnKeyListener(this); 
-        setOnTouchListener(this);   
-
-        mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
-        mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
-        
-        if(Build.VERSION.SDK_INT >= 12) {
-            setOnGenericMotionListener(new SDLGenericMotionListener_API12());
-        }
-
-        // Some arbitrary defaults to avoid a potential division by zero
-        mWidth = 1.0f;
-        mHeight = 1.0f;
-    }
-    
-    public Surface getNativeSurface() {
-        return getHolder().getSurface();
-    }
-
-    // Called when we have a valid drawing surface
-    @Override
-    public void surfaceCreated(SurfaceHolder holder) {
-        Log.v("SDL", "surfaceCreated()");
-        holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
-    }
-
-    // Called when we lose the surface
-    @Override
-    public void surfaceDestroyed(SurfaceHolder holder) {
-        Log.v("SDL", "surfaceDestroyed()");
-        // Call this *before* setting mIsSurfaceReady to 'false'
-        SDLActivity.handlePause();
-        SDLActivity.mIsSurfaceReady = false;
-        SDLActivity.onNativeSurfaceDestroyed();
-    }
-
-    // Called when the surface is resized
-    @Override
-    public void surfaceChanged(SurfaceHolder holder,
-                               int format, int width, int height) {
-        Log.v("SDL", "surfaceChanged()");
-
-        int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
-        switch (format) {
-        case PixelFormat.A_8:
-            Log.v("SDL", "pixel format A_8");
-            break;
-        case PixelFormat.LA_88:
-            Log.v("SDL", "pixel format LA_88");
-            break;
-        case PixelFormat.L_8:
-            Log.v("SDL", "pixel format L_8");
-            break;
-        case PixelFormat.RGBA_4444:
-            Log.v("SDL", "pixel format RGBA_4444");
-            sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
-            break;
-        case PixelFormat.RGBA_5551:
-            Log.v("SDL", "pixel format RGBA_5551");
-            sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
-            break;
-        case PixelFormat.RGBA_8888:
-            Log.v("SDL", "pixel format RGBA_8888");
-            sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
-            break;
-        case PixelFormat.RGBX_8888:
-            Log.v("SDL", "pixel format RGBX_8888");
-            sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
-            break;
-        case PixelFormat.RGB_332:
-            Log.v("SDL", "pixel format RGB_332");
-            sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
-            break;
-        case PixelFormat.RGB_565:
-            Log.v("SDL", "pixel format RGB_565");
-            sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565
-            break;
-        case PixelFormat.RGB_888:
-            Log.v("SDL", "pixel format RGB_888");
-            // Not sure this is right, maybe SDL_PIXELFORMAT_RGB24 instead?
-            sdlFormat = 0x16161804; // SDL_PIXELFORMAT_RGB888
-            break;
-        default:
-            Log.v("SDL", "pixel format unknown " + format);
-            break;
-        }
-
-        mWidth = width;
-        mHeight = height;
-        SDLActivity.onNativeResize(width, height, sdlFormat);
-        Log.v("SDL", "Window size:" + width + "x"+height);
-
-        // Set mIsSurfaceReady to 'true' *before* making a call to handleResume
-        SDLActivity.mIsSurfaceReady = true;
-        SDLActivity.onNativeSurfaceChanged();
-
-
-        if (SDLActivity.mSDLThread == null) {
-            // This is the entry point to the C app.
-            // Start up the C app thread and enable sensor input for the first time
-
-            SDLActivity.mSDLThread = new Thread(new SDLMain(), "SDLThread");
-            enableSensor(Sensor.TYPE_ACCELEROMETER, true);
-            SDLActivity.mSDLThread.start();
-            
-            // Set up a listener thread to catch when the native thread ends
-            new Thread(new Runnable(){
-                @Override
-                public void run(){
-                    try {
-                        SDLActivity.mSDLThread.join();
-                    }
-                    catch(Exception e){}
-                    finally{ 
-                        // Native thread has finished
-                        if (! SDLActivity.mExitCalledFromJava) {
-                            SDLActivity.handleNativeExit();
-                        }
-                    }
-                }
-            }).start();
-        }
-    }
-
-    // unused
-    @Override
-    public void onDraw(Canvas canvas) {}
-
-
-    // Key events
-    @Override
-    public boolean onKey(View  v, int keyCode, KeyEvent event) {
-        // Dispatch the different events depending on where they come from
-        // Some SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD
-        // So, we try to process them as DPAD or GAMEPAD events first, if that fails we try them as KEYBOARD
-        
-        if ( (event.getSource() & 0x00000401) != 0 || /* API 12: SOURCE_GAMEPAD */
-                   (event.getSource() & InputDevice.SOURCE_DPAD) != 0 ) {
-            if (event.getAction() == KeyEvent.ACTION_DOWN) {
-                if (SDLActivity.onNativePadDown(event.getDeviceId(), keyCode) == 0) {
-                    return true;
-                }
-            } else if (event.getAction() == KeyEvent.ACTION_UP) {
-                if (SDLActivity.onNativePadUp(event.getDeviceId(), keyCode) == 0) {
-                    return true;
-                }
-            }
-        }
-        
-        if( (event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
-            if (event.getAction() == KeyEvent.ACTION_DOWN) {
-                //Log.v("SDL", "key down: " + keyCode);
-                SDLActivity.onNativeKeyDown(keyCode);
-                return true;
-            }
-            else if (event.getAction() == KeyEvent.ACTION_UP) {
-                //Log.v("SDL", "key up: " + keyCode);
-                SDLActivity.onNativeKeyUp(keyCode);
-                return true;
-            }
-        }
-        
-        return false;
-    }
-
-    // Touch events
-    @Override
-    public boolean onTouch(View v, MotionEvent event) {
-        /* Ref: http://developer.android.com/training/gestures/multi.html */
-        final int touchDevId = event.getDeviceId();
-        final int pointerCount = event.getPointerCount();
-        int action = event.getActionMasked();
-        int pointerFingerId;
-        int i = -1;
-        float x,y,p;
-        
-        switch(action) {
-            case MotionEvent.ACTION_MOVE:
-                for (i = 0; i < pointerCount; i++) {
-                    pointerFingerId = event.getPointerId(i);
-                    x = event.getX(i) / mWidth;
-                    y = event.getY(i) / mHeight;
-                    p = event.getPressure(i);
-                    SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
-                }
-                break;
-            
-            case MotionEvent.ACTION_UP:
-            case MotionEvent.ACTION_DOWN:
-                // Primary pointer up/down, the index is always zero
-                i = 0;
-            case MotionEvent.ACTION_POINTER_UP:
-            case MotionEvent.ACTION_POINTER_DOWN:
-                // Non primary pointer up/down
-                if (i == -1) {
-                    i = event.getActionIndex();
-                }
-                
-                pointerFingerId = event.getPointerId(i);
-                x = event.getX(i) / mWidth;
-                y = event.getY(i) / mHeight;
-                p = event.getPressure(i);
-                SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
-                break;
-            
-            default:
-                break;
-        }
-
-        return true;
-   } 
-
-    // Sensor events
-    public void enableSensor(int sensortype, boolean enabled) {
-        // TODO: This uses getDefaultSensor - what if we have >1 accels?
-        if (enabled) {
-            mSensorManager.registerListener(this, 
-                            mSensorManager.getDefaultSensor(sensortype), 
-                            SensorManager.SENSOR_DELAY_GAME, null);
-        } else {
-            mSensorManager.unregisterListener(this, 
-                            mSensorManager.getDefaultSensor(sensortype));
-        }
-    }
-    
-    @Override
-    public void onAccuracyChanged(Sensor sensor, int accuracy) {
-        // TODO
-    }
-
-    @Override
-    public void onSensorChanged(SensorEvent event) {
-        if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
-            float x, y;
-            switch (mDisplay.getRotation()) {
-                case Surface.ROTATION_90:
-                    x = -event.values[1];
-                    y = event.values[0];
-                    break;
-                case Surface.ROTATION_270:
-                    x = event.values[1];
-                    y = -event.values[0];
-                    break;
-                case Surface.ROTATION_180:
-                    x = -event.values[1];
-                    y = -event.values[0];
-                    break;
-                default:
-                    x = event.values[0];
-                    y = event.values[1];
-                    break;
-            }
-            SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
-                                      y / SensorManager.GRAVITY_EARTH,
-                                      event.values[2] / SensorManager.GRAVITY_EARTH - 1);
-        }
-    }    
-}
-
-/* This is a fake invisible editor view that receives the input and defines the
- * pan&scan region
- */
-class DummyEdit extends View implements View.OnKeyListener {
-    InputConnection ic;
-
-    public DummyEdit(Context context) {
-        super(context);
-        setFocusableInTouchMode(true);
-        setFocusable(true);
-        setOnKeyListener(this);
-    }
-
-    @Override
-    public boolean onCheckIsTextEditor() {
-        return true;
-    }
-
-    @Override
-    public boolean onKey(View v, int keyCode, KeyEvent event) {
-
-        // This handles the hardware keyboard input
-        if (event.isPrintingKey()) {
-            if (event.getAction() == KeyEvent.ACTION_DOWN) {
-                ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
-            }
-            return true;
-        }
-
-        if (event.getAction() == KeyEvent.ACTION_DOWN) {
-            SDLActivity.onNativeKeyDown(keyCode);
-            return true;
-        } else if (event.getAction() == KeyEvent.ACTION_UP) {
-            SDLActivity.onNativeKeyUp(keyCode);
-            return true;
-        }
-
-        return false;
-    }
-        
-    //
-    @Override
-    public boolean onKeyPreIme (int keyCode, KeyEvent event) {
-        // As seen on StackOverflow: http://stackoverflow.com/questions/7634346/keyboard-hide-event
-        // FIXME: Discussion at http://bugzilla.libsdl.org/show_bug.cgi?id=1639
-        // FIXME: This is not a 100% effective solution to the problem of detecting if the keyboard is showing or not
-        // FIXME: A more effective solution would be to change our Layout from AbsoluteLayout to Relative or Linear
-        // FIXME: And determine the keyboard presence doing this: http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android
-        // FIXME: An even more effective way would be if Android provided this out of the box, but where would the fun be in that :)
-        if (event.getAction()==KeyEvent.ACTION_UP && keyCode == KeyEvent.KEYCODE_BACK) {
-            if (SDLActivity.mTextEdit != null && SDLActivity.mTextEdit.getVisibility() == View.VISIBLE) {
-                SDLActivity.onNativeKeyboardFocusLost();
-            }
-        }
-        return super.onKeyPreIme(keyCode, event);
-    }
-
-    @Override
-    public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
-        ic = new SDLInputConnection(this, true);
-
-        outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
-                | 33554432 /* API 11: EditorInfo.IME_FLAG_NO_FULLSCREEN */;
-
-        return ic;
-    }
-}
-
-class SDLInputConnection extends BaseInputConnection {
-
-    public SDLInputConnection(View targetView, boolean fullEditor) {
-        super(targetView, fullEditor);
-
-    }
-
-    @Override
-    public boolean sendKeyEvent(KeyEvent event) {
-
-        /*
-         * This handles the keycodes from soft keyboard (and IME-translated
-         * input from hardkeyboard)
-         */
-        int keyCode = event.getKeyCode();
-        if (event.getAction() == KeyEvent.ACTION_DOWN) {
-            if (event.isPrintingKey()) {
-                commitText(String.valueOf((char) event.getUnicodeChar()), 1);
-            }
-            SDLActivity.onNativeKeyDown(keyCode);
-            return true;
-        } else if (event.getAction() == KeyEvent.ACTION_UP) {
-
-            SDLActivity.onNativeKeyUp(keyCode);
-            return true;
-        }
-        return super.sendKeyEvent(event);
-    }
-
-    @Override
-    public boolean commitText(CharSequence text, int newCursorPosition) {
-
-        nativeCommitText(text.toString(), newCursorPosition);
-
-        return super.commitText(text, newCursorPosition);
-    }
-
-    @Override
-    public boolean setComposingText(CharSequence text, int newCursorPosition) {
-
-        nativeSetComposingText(text.toString(), newCursorPosition);
-
-        return super.setComposingText(text, newCursorPosition);
-    }
-
-    public native void nativeCommitText(String text, int newCursorPosition);
-
-    public native void nativeSetComposingText(String text, int newCursorPosition);
-
-    @Override
-    public boolean deleteSurroundingText(int beforeLength, int afterLength) {       
-        // Workaround to capture backspace key. Ref: http://stackoverflow.com/questions/14560344/android-backspace-in-webview-baseinputconnection
-        if (beforeLength == 1 && afterLength == 0) {
-            // backspace
-            return super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
-                && super.sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL));
-        }
-
-        return super.deleteSurroundingText(beforeLength, afterLength);
-    }
-}
-
-/* A null joystick handler for API level < 12 devices (the accelerometer is handled separately) */
-class SDLJoystickHandler {
-    
-    public boolean handleMotionEvent(MotionEvent event) {
-        return false;
-    }
-    
-    public void pollInputDevices() {
-    }
-}
-
-/* Actual joystick functionality available for API >= 12 devices */
-class SDLJoystickHandler_API12 extends SDLJoystickHandler {
-  
-    class SDLJoystick {
-        public int device_id;
-        public String name;
-        public ArrayList<InputDevice.MotionRange> axes;
-    }
-    class RangeComparator implements Comparator<InputDevice.MotionRange>
-    {
-        @Override
-        public int compare(InputDevice.MotionRange arg0, InputDevice.MotionRange arg1) {
-            return arg0.getAxis() - arg1.getAxis();
-        }
-    }
-    
-    private ArrayList<SDLJoystick> mJoysticks;
-    
-    public SDLJoystickHandler_API12() {
-       
-        mJoysticks = new ArrayList<SDLJoystick>();
-    }
-
-    @Override
-    public void pollInputDevices() {
-        int[] deviceIds = InputDevice.getDeviceIds();
-        // It helps processing the device ids in reverse order
-        // For example, in the case of the XBox 360 wireless dongle,
-        // so the first controller seen by SDL matches what the receiver
-        // considers to be the first controller
-        
-        for(int i=deviceIds.length-1; i>-1; i--) {
-            SDLJoystick joystick = getJoystick(deviceIds[i]);
-            if (joystick == null) {
-                joystick = new SDLJoystick();
-                InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
-                if( (joystickDevice.getSources() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
-                    joystick.device_id = deviceIds[i];
-                    joystick.name = joystickDevice.getName();
-                    joystick.axes = new ArrayList<InputDevice.MotionRange>();
-                    
-                    List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
-                    Collections.sort(ranges, new RangeComparator());
-                    for (InputDevice.MotionRange range : ranges ) {
-                        if ( (range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ) {
-                            joystick.axes.add(range);
-                         }
-                    }
-                    
-                    mJoysticks.add(joystick);
-                    SDLActivity.nativeAddJoystick(joystick.device_id, joystick.name, 0, -1, joystick.axes.size(), 0, 0);
-                }
-            }
-        }
-        
-        /* Check removed devices */
-        ArrayList<Integer> removedDevices = new ArrayList<Integer>();
-        for(int i=0; i < mJoysticks.size(); i++) {
-            int device_id = mJoysticks.get(i).device_id;
-            int j;
-            for (j=0; j < deviceIds.length; j++) {
-                if (device_id == deviceIds[j]) break;
-            }
-            if (j == deviceIds.length) {
-                removedDevices.add(device_id);
-            }
-        }
-            
-        for(int i=0; i < removedDevices.size(); i++) {
-            int device_id = removedDevices.get(i);
-            SDLActivity.nativeRemoveJoystick(device_id);
-            for (int j=0; j < mJoysticks.size(); j++) {
-                if (mJoysticks.get(j).device_id == device_id) {
-                    mJoysticks.remove(j);
-                    break;
-                }
-            }
-        }        
-    }
-    
-    protected SDLJoystick getJoystick(int device_id) {
-        for(int i=0; i < mJoysticks.size(); i++) {
-            if (mJoysticks.get(i).device_id == device_id) {
-                return mJoysticks.get(i);
-            }
-        }
-        return null;
-    }   
-    
-    @Override        
-    public boolean handleMotionEvent(MotionEvent event) {
-        if ( (event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
-            int actionPointerIndex = event.getActionIndex();
-            int action = event.getActionMasked();
-            switch(action) {
-                case MotionEvent.ACTION_MOVE:
-                    SDLJoystick joystick = getJoystick(event.getDeviceId());
-                    if ( joystick != null ) {
-                        for (int i = 0; i < joystick.axes.size(); i++) {
-                            InputDevice.MotionRange range = joystick.axes.get(i);
-                            /* Normalize the value to -1...1 */
-                            float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
-                            SDLActivity.onNativeJoy(joystick.device_id, i, value );
-                        }                       
-                    }
-                    break;
-                default:
-                    break;
-            }
-        }
-        return true;
-    }            
-}
-
-class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
-    // Generic Motion (mouse hover, joystick...) events go here
-    // We only have joysticks yet
-    @Override
-    public boolean onGenericMotion(View v, MotionEvent event) {
-        return SDLActivity.handleJoystickMotionEvent(event);
-    }
-}

+ 21 - 2
oxygine/SDL/android/lib/src/org/oxygine/lib/Utils.java

@@ -1,14 +1,17 @@
 package org.oxygine.lib;
 package org.oxygine.lib;
 
 
-import android.content.Context;
+import android.app.*;
+import android.content.*;
+import android.view.*;
 import android.net.ConnectivityManager;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.net.NetworkInfo;
+import android.net.Uri;
 
 
 import java.util.Locale;
 import java.util.Locale;
 
 
 public class Utils
 public class Utils
 {
 {
-    static public Context _context;
+    static public Activity _context;
 	public static long		getTimeUTCMS()
 	public static long		getTimeUTCMS()
 	{
 	{
         return System.currentTimeMillis();
         return System.currentTimeMillis();
@@ -27,4 +30,20 @@ public class Utils
         NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
         NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo();
         return activeNetworkInfo != null;
         return activeNetworkInfo != null;
     }
     }
+
+    public static void exit()
+    {
+        System.exit(0);
+    }
+
+    public static void moveTaskToBack()
+    {
+        _context.moveTaskToBack(true);
+    }
+
+    public static void browse(String url)
+    {
+        Intent browseIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
+        _context.startActivity(browseIntent);
+    }
 }
 }

+ 8 - 0
oxygine/SDL/ios/oxygine/oxygine_ios.xcodeproj/project.pbxproj

@@ -39,6 +39,8 @@
 		04AEC310182BD912006413A9 /* ShaderProgramGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 04AEC30E182BD912006413A9 /* ShaderProgramGL.h */; };
 		04AEC310182BD912006413A9 /* ShaderProgramGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 04AEC30E182BD912006413A9 /* ShaderProgramGL.h */; };
 		04AEC313182BD98D006413A9 /* UberShaderProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04AEC311182BD98D006413A9 /* UberShaderProgram.cpp */; };
 		04AEC313182BD98D006413A9 /* UberShaderProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04AEC311182BD98D006413A9 /* UberShaderProgram.cpp */; };
 		04AEC314182BD98D006413A9 /* UberShaderProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 04AEC312182BD98D006413A9 /* UberShaderProgram.h */; };
 		04AEC314182BD98D006413A9 /* UberShaderProgram.h in Headers */ = {isa = PBXBuildFile; fileRef = 04AEC312182BD98D006413A9 /* UberShaderProgram.h */; };
+		04B3A71918A65668004C67E3 /* InputText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04B3A71718A65668004C67E3 /* InputText.cpp */; };
+		04B3A71A18A65668004C67E3 /* InputText.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B3A71818A65668004C67E3 /* InputText.h */; };
 		04D6FB4C1851914000A5403A /* ThreadMessages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04D6FB4A1851914000A5403A /* ThreadMessages.cpp */; };
 		04D6FB4C1851914000A5403A /* ThreadMessages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04D6FB4A1851914000A5403A /* ThreadMessages.cpp */; };
 		04D6FB4D1851914000A5403A /* ThreadMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 04D6FB4B1851914000A5403A /* ThreadMessages.h */; };
 		04D6FB4D1851914000A5403A /* ThreadMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 04D6FB4B1851914000A5403A /* ThreadMessages.h */; };
 		C38704A217C0C6AC00015CA8 /* VideoDriverGLES11.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C38704A017C0C6AC00015CA8 /* VideoDriverGLES11.cpp */; };
 		C38704A217C0C6AC00015CA8 /* VideoDriverGLES11.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C38704A017C0C6AC00015CA8 /* VideoDriverGLES11.cpp */; };
@@ -232,6 +234,8 @@
 		04AEC30E182BD912006413A9 /* ShaderProgramGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ShaderProgramGL.h; path = gl/ShaderProgramGL.h; sourceTree = "<group>"; };
 		04AEC30E182BD912006413A9 /* ShaderProgramGL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ShaderProgramGL.h; path = gl/ShaderProgramGL.h; sourceTree = "<group>"; };
 		04AEC311182BD98D006413A9 /* UberShaderProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UberShaderProgram.cpp; sourceTree = "<group>"; };
 		04AEC311182BD98D006413A9 /* UberShaderProgram.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UberShaderProgram.cpp; sourceTree = "<group>"; };
 		04AEC312182BD98D006413A9 /* UberShaderProgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UberShaderProgram.h; sourceTree = "<group>"; };
 		04AEC312182BD98D006413A9 /* UberShaderProgram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UberShaderProgram.h; sourceTree = "<group>"; };
+		04B3A71718A65668004C67E3 /* InputText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputText.cpp; path = ../../../src/InputText.cpp; sourceTree = "<group>"; };
+		04B3A71818A65668004C67E3 /* InputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputText.h; path = ../../../src/InputText.h; sourceTree = "<group>"; };
 		04D6FB4A1851914000A5403A /* ThreadMessages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadMessages.cpp; sourceTree = "<group>"; };
 		04D6FB4A1851914000A5403A /* ThreadMessages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadMessages.cpp; sourceTree = "<group>"; };
 		04D6FB4B1851914000A5403A /* ThreadMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadMessages.h; sourceTree = "<group>"; };
 		04D6FB4B1851914000A5403A /* ThreadMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadMessages.h; sourceTree = "<group>"; };
 		C38704A017C0C6AC00015CA8 /* VideoDriverGLES11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VideoDriverGLES11.cpp; path = gl/VideoDriverGLES11.cpp; sourceTree = "<group>"; };
 		C38704A017C0C6AC00015CA8 /* VideoDriverGLES11.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VideoDriverGLES11.cpp; path = gl/VideoDriverGLES11.cpp; sourceTree = "<group>"; };
@@ -468,6 +472,8 @@
 		C3E86F5316EBC8C200052915 /* src */ = {
 		C3E86F5316EBC8C200052915 /* src */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				04B3A71718A65668004C67E3 /* InputText.cpp */,
+				04B3A71818A65668004C67E3 /* InputText.h */,
 				0472E37B17F8A2EC0016A832 /* MaskedSprite.cpp */,
 				0472E37B17F8A2EC0016A832 /* MaskedSprite.cpp */,
 				0472E37C17F8A2EC0016A832 /* MaskedSprite.h */,
 				0472E37C17F8A2EC0016A832 /* MaskedSprite.h */,
 				0472E37D17F8A2EC0016A832 /* oxygine_include.h */,
 				0472E37D17F8A2EC0016A832 /* oxygine_include.h */,
@@ -845,6 +851,7 @@
 				0472E36217F8A1A80016A832 /* vertex.h in Headers */,
 				0472E36217F8A1A80016A832 /* vertex.h in Headers */,
 				C3EE216417BECD7200715678 /* VideoDriverGL.h in Headers */,
 				C3EE216417BECD7200715678 /* VideoDriverGL.h in Headers */,
 				C38704A317C0C6AC00015CA8 /* VideoDriverGLES11.h in Headers */,
 				C38704A317C0C6AC00015CA8 /* VideoDriverGLES11.h in Headers */,
+				04B3A71A18A65668004C67E3 /* InputText.h in Headers */,
 				C38704A717C0C71700015CA8 /* VideoDriverGLES20.h in Headers */,
 				C38704A717C0C71700015CA8 /* VideoDriverGLES20.h in Headers */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -918,6 +925,7 @@
 				C3E8701F16EBC8EB00052915 /* Mutex.cpp in Sources */,
 				C3E8701F16EBC8EB00052915 /* Mutex.cpp in Sources */,
 				C3E8702116EBC8EB00052915 /* NativeTexture.cpp in Sources */,
 				C3E8702116EBC8EB00052915 /* NativeTexture.cpp in Sources */,
 				C3E8702316EBC8EB00052915 /* Object.cpp in Sources */,
 				C3E8702316EBC8EB00052915 /* Object.cpp in Sources */,
+				04B3A71918A65668004C67E3 /* InputText.cpp in Sources */,
 				C3E8702816EBC8EB00052915 /* oxygine.cpp in Sources */,
 				C3E8702816EBC8EB00052915 /* oxygine.cpp in Sources */,
 				04967C4D180B3D7400D66EFA /* Restorable.cpp in Sources */,
 				04967C4D180B3D7400D66EFA /* Restorable.cpp in Sources */,
 				C3E8702C16EBC8EB00052915 /* Renderer.cpp in Sources */,
 				C3E8702C16EBC8EB00052915 /* Renderer.cpp in Sources */,

+ 9 - 0
oxygine/SDL/macosx/oxygine_macosx/oxygine_macosx.xcodeproj/project.pbxproj

@@ -195,6 +195,8 @@
 		049B57221871F21E00EF3C66 /* winnie_alloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 049B56621871F21E00EF3C66 /* winnie_alloc.cpp */; };
 		049B57221871F21E00EF3C66 /* winnie_alloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 049B56621871F21E00EF3C66 /* winnie_alloc.cpp */; };
 		049B57231871F21E00EF3C66 /* winnie_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B56631871F21E00EF3C66 /* winnie_alloc.h */; };
 		049B57231871F21E00EF3C66 /* winnie_alloc.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B56631871F21E00EF3C66 /* winnie_alloc.h */; };
 		049B57241871F21E00EF3C66 /* winnie_alloc_config.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B56641871F21E00EF3C66 /* winnie_alloc_config.h */; };
 		049B57241871F21E00EF3C66 /* winnie_alloc_config.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B56641871F21E00EF3C66 /* winnie_alloc_config.h */; };
+		04B3A71F18A6594D004C67E3 /* InputText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04B3A71D18A6594D004C67E3 /* InputText.cpp */; };
+		04B3A72018A6594D004C67E3 /* InputText.h in Headers */ = {isa = PBXBuildFile; fileRef = 04B3A71E18A6594D004C67E3 /* InputText.h */; };
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
@@ -395,6 +397,8 @@
 		049B56621871F21E00EF3C66 /* winnie_alloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = winnie_alloc.cpp; sourceTree = "<group>"; };
 		049B56621871F21E00EF3C66 /* winnie_alloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = winnie_alloc.cpp; sourceTree = "<group>"; };
 		049B56631871F21E00EF3C66 /* winnie_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winnie_alloc.h; sourceTree = "<group>"; };
 		049B56631871F21E00EF3C66 /* winnie_alloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winnie_alloc.h; sourceTree = "<group>"; };
 		049B56641871F21E00EF3C66 /* winnie_alloc_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winnie_alloc_config.h; sourceTree = "<group>"; };
 		049B56641871F21E00EF3C66 /* winnie_alloc_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = winnie_alloc_config.h; sourceTree = "<group>"; };
+		04B3A71D18A6594D004C67E3 /* InputText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputText.cpp; path = ../../../src/InputText.cpp; sourceTree = "<group>"; };
+		04B3A71E18A6594D004C67E3 /* InputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputText.h; path = ../../../src/InputText.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 /* End PBXFileReference section */
 
 
 /* Begin PBXFrameworksBuildPhase section */
 /* Begin PBXFrameworksBuildPhase section */
@@ -427,6 +431,8 @@
 		049B55901871F21000EF3C66 /* src */ = {
 		049B55901871F21000EF3C66 /* src */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				04B3A71D18A6594D004C67E3 /* InputText.cpp */,
+				04B3A71E18A6594D004C67E3 /* InputText.h */,
 				049B55911871F21D00EF3C66 /* Actor.cpp */,
 				049B55911871F21D00EF3C66 /* Actor.cpp */,
 				049B55921871F21D00EF3C66 /* Actor.h */,
 				049B55921871F21D00EF3C66 /* Actor.h */,
 				049B55931871F21D00EF3C66 /* AnimationFrame.cpp */,
 				049B55931871F21D00EF3C66 /* AnimationFrame.cpp */,
@@ -839,6 +845,7 @@
 				049B56F41871F21E00EF3C66 /* CreateResourceContext.h in Headers */,
 				049B56F41871F21E00EF3C66 /* CreateResourceContext.h in Headers */,
 				049B571D1871F21E00EF3C66 /* stringUtils.h in Headers */,
 				049B571D1871F21E00EF3C66 /* stringUtils.h in Headers */,
 				049B56AF1871F21E00EF3C66 /* system_data.h in Headers */,
 				049B56AF1871F21E00EF3C66 /* system_data.h in Headers */,
+				04B3A72018A6594D004C67E3 /* InputText.h in Headers */,
 				049B571B1871F21E00EF3C66 /* intrusive_list.h in Headers */,
 				049B571B1871F21E00EF3C66 /* intrusive_list.h in Headers */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
@@ -912,6 +919,7 @@
 				049B56DF1871F21E00EF3C66 /* MemoryTexture.cpp in Sources */,
 				049B56DF1871F21E00EF3C66 /* MemoryTexture.cpp in Sources */,
 				049B56ED1871F21E00EF3C66 /* ProgressBar.cpp in Sources */,
 				049B56ED1871F21E00EF3C66 /* ProgressBar.cpp in Sources */,
 				049B56A31871F21E00EF3C66 /* Renderer.cpp in Sources */,
 				049B56A31871F21E00EF3C66 /* Renderer.cpp in Sources */,
+				04B3A71F18A6594D004C67E3 /* InputText.cpp in Sources */,
 				049B57191871F21E00EF3C66 /* ImageUtils.cpp in Sources */,
 				049B57191871F21E00EF3C66 /* ImageUtils.cpp in Sources */,
 				049B569C1871F21E00EF3C66 /* Object.cpp in Sources */,
 				049B569C1871F21E00EF3C66 /* Object.cpp in Sources */,
 				049B56D21871F21E00EF3C66 /* Input.cpp in Sources */,
 				049B56D21871F21E00EF3C66 /* Input.cpp in Sources */,
@@ -1094,6 +1102,7 @@
 				049B52C11871EDE900EF3C66 /* Release */,
 				049B52C11871EDE900EF3C66 /* Release */,
 			);
 			);
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
 		};
 		};
 /* End XCConfigurationList section */
 /* End XCConfigurationList section */
 	};
 	};

+ 2 - 0
oxygine/SDL/win32/oxygine_vs2010.vcxproj

@@ -139,6 +139,7 @@
     <ClCompile Include="..\..\src\EventDispatcher.cpp" />
     <ClCompile Include="..\..\src\EventDispatcher.cpp" />
     <ClCompile Include="..\..\src\Font.cpp" />
     <ClCompile Include="..\..\src\Font.cpp" />
     <ClCompile Include="..\..\src\Input.cpp" />
     <ClCompile Include="..\..\src\Input.cpp" />
+    <ClCompile Include="..\..\src\InputText.cpp" />
     <ClCompile Include="..\..\src\MaskedSprite.cpp" />
     <ClCompile Include="..\..\src\MaskedSprite.cpp" />
     <ClCompile Include="..\..\src\MemoryTexture.cpp" />
     <ClCompile Include="..\..\src\MemoryTexture.cpp" />
     <ClCompile Include="..\..\src\minizip\ioapi.c" />
     <ClCompile Include="..\..\src\minizip\ioapi.c" />
@@ -233,6 +234,7 @@
     <ClInclude Include="..\..\src\Font.h" />
     <ClInclude Include="..\..\src\Font.h" />
     <ClInclude Include="..\..\src\InitActor.h" />
     <ClInclude Include="..\..\src\InitActor.h" />
     <ClInclude Include="..\..\src\Input.h" />
     <ClInclude Include="..\..\src\Input.h" />
+    <ClInclude Include="..\..\src\InputText.h" />
     <ClInclude Include="..\..\src\MaskedSprite.h" />
     <ClInclude Include="..\..\src\MaskedSprite.h" />
     <ClInclude Include="..\..\src\MemoryTexture.h" />
     <ClInclude Include="..\..\src\MemoryTexture.h" />
     <ClInclude Include="..\..\src\minizip\ioapi.h" />
     <ClInclude Include="..\..\src\minizip\ioapi.h" />

+ 6 - 0
oxygine/SDL/win32/oxygine_vs2010.vcxproj.filters

@@ -288,6 +288,9 @@
     <ClCompile Include="..\..\src\core\ThreadMessages.cpp">
     <ClCompile Include="..\..\src\core\ThreadMessages.cpp">
       <Filter>src\core</Filter>
       <Filter>src\core</Filter>
     </ClCompile>
     </ClCompile>
+    <ClCompile Include="..\..\src\InputText.cpp">
+      <Filter>src</Filter>
+    </ClCompile>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\src\closure\closure.h">
     <ClInclude Include="..\..\src\closure\closure.h">
@@ -617,6 +620,9 @@
     <ClInclude Include="..\..\src\core\ThreadMessages.h">
     <ClInclude Include="..\..\src\core\ThreadMessages.h">
       <Filter>src\core</Filter>
       <Filter>src\core</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="..\..\src\InputText.h">
+      <Filter>src</Filter>
+    </ClInclude>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <None Include="ReadMe.txt" />
     <None Include="ReadMe.txt" />

+ 168 - 0
oxygine/src/InputText.cpp

@@ -0,0 +1,168 @@
+#include "InputText.h"
+#include "TextActor.h"
+#include "utils/stringUtils.h"
+
+#ifndef __S3E__
+#include "SDL_keyboard.h"
+#include "SDL_events.h"
+#endif
+
+namespace oxygine
+{
+	InputText *InputText::_active = 0;
+
+	void InputText::stopAnyInput()
+	{
+		if (!_active)
+			return;		
+		_active->stop();
+		_active = 0;
+	}
+
+	void InputText::start(spTextActor ta)
+	{
+#ifdef __S3E__
+		log::error("InputText isn't implemented for MARMALADE");
+#endif
+
+		addRef();
+		
+		//if (_active == this)
+		//	return;
+		if (_active)
+		{
+			_active->stop();
+		}
+
+		_active = this;
+
+		_textActor = ta;		
+#ifndef __S3E__
+		SDL_AddEventWatch(onSDLEvent, this);
+		SDL_StartTextInput();
+#endif
+		//log::messageln("InputText::start  %x", this);
+		_txt = "";
+		updateText();
+	}
+
+	void InputText::setAllowedSymbols(const string &utf8str)
+	{
+		_allowed = utf8str;
+	}
+
+	void InputText::setAllowedSymbols(const wstring &str)
+	{
+		_allowed = ws2utf8(str.c_str());
+	}
+
+	void InputText::setDisallowedSymbols(const string &utf8str)
+	{
+		_disallowed = utf8str;
+	}
+
+	void InputText::setDisallowedSymbols(const wstring &str)
+	{
+		_disallowed = ws2utf8(str.c_str());
+	}
+
+	void InputText::stop()
+	{
+#ifndef __S3E__
+		SDL_StopTextInput();
+		SDL_DelEventWatch(onSDLEvent, this);		
+#endif
+		_active = 0;
+		_textActor = 0;
+		//log::messageln("InputText::stop  %x", this);
+		releaseRef();
+	}
+
+#ifndef __S3E__
+	int SDLCALL InputText::onSDLEvent(void *userdata, SDL_Event * event)
+	{
+		return ((InputText*)userdata)->_onSDLEvent(event);
+	}
+#endif
+
+	void InputText::updateText()
+	{
+		_textActor->setText(_txt);
+	}
+
+	bool findCode(const char *str, int c)
+	{
+		while(*str)
+		{
+			int code = 0;
+			str = getNextCode(code, str);
+			if (code == c)
+				return true;
+		}
+		return false;
+	}
+#ifndef __S3E__
+	int InputText::_onSDLEvent(SDL_Event *event)
+	{
+		switch(event->type)
+		{
+		case SDL_TEXTEDITING:
+			{
+				SDL_TextEditingEvent &te = event->edit;
+				int q=0;
+			}
+			break;
+		case SDL_TEXTINPUT:
+			{
+				SDL_TextInputEvent &te = event->text;
+
+				int newCode = 0;
+				getNextCode(newCode, te.text);
+
+				if (!_disallowed.empty())
+				{
+					if (findCode(_disallowed.c_str(), newCode))
+						newCode = 0;
+				}
+
+				if (!newCode)
+					return 0;
+
+				if (!_allowed.empty())
+				{
+					if (!findCode(_allowed.c_str(), newCode))					
+						newCode = 0;
+				}
+
+				if (!newCode)
+					return 0;
+				
+				_txt.append(te.text, te.text + strlen(te.text));
+				updateText();	
+			}
+			break;
+		case SDL_KEYDOWN:
+			{
+				switch (event->key.keysym.sym)
+				{
+				case SDLK_BACKSPACE:
+					{
+						if (!_txt.empty())
+							_txt.erase(_txt.end() - 1);
+						updateText();
+					}
+					break;
+				case SDLK_RETURN:
+					{
+						Event evnt(Event::COMPLETE);
+						dispatchEvent(&evnt);
+					}
+					break;
+				}
+			}
+			break;
+		}
+		return 0;
+	}
+#endif
+}

+ 45 - 0
oxygine/src/InputText.h

@@ -0,0 +1,45 @@
+#pragma once
+#include "oxygine_include.h"
+#include "EventDispatcher.h"
+#include <string>
+
+#ifndef __S3E__
+#include "SDL.h"
+#endif
+
+namespace oxygine
+{
+	using namespace std;
+
+	DECLARE_SMART(TextActor, spTextActor);
+	DECLARE_SMART(InputText, spInputText);
+
+	class InputText: public EventDispatcher
+	{
+	public:
+		/**Shows virtual keyboard(if supported on platform) and sends pressed chars to TextActor*/
+		void start(spTextActor textActor);
+		void stop();
+
+		void setAllowedSymbols(const string &utf8str);
+		void setAllowedSymbols(const wstring &str);
+		void setDisallowedSymbols(const string &utf8str);
+		void setDisallowedSymbols(const wstring &str);
+
+		static void stopAnyInput();
+
+	private:
+		spTextActor _textActor;
+
+		string _allowed;
+		string _disallowed;
+		string _txt;
+		void updateText();
+		static InputText *_active;		
+
+#ifndef __S3E__		
+		static int SDLCALL onSDLEvent(void *userdata, SDL_Event * event);
+		int _onSDLEvent(SDL_Event *event);
+#endif
+	};
+}

+ 8 - 2
oxygine/src/MemoryTexture.cpp

@@ -424,7 +424,7 @@ namespace oxygine
 		memset(&_buffer.front(), 0, _buffer.size());
 		memset(&_buffer.front(), 0, _buffer.size());
 	}
 	}
 
 
-	void MemoryTexture::init(file::buffer &buffer, bool premultiplied, TextureFormat format)
+	bool MemoryTexture::init(file::buffer &buffer, bool premultiplied, TextureFormat format)
 	{
 	{
 		cleanup();
 		cleanup();
 
 
@@ -517,14 +517,20 @@ namespace oxygine
 
 
 //						saveImage(lock(), "test.png", "png");
 //						saveImage(lock(), "test.png", "png");
 					}
 					}
-					int q=0;
+					else
+					{
+						log::warning("tga 32bpp only supported");
+						return false;
+					}
 				}
 				}
 				break;
 				break;
 			default:
 			default:
 				log::warning("MemoryTexture. can't unpack data %s");
 				log::warning("MemoryTexture. can't unpack data %s");
+				return false;
 				break;
 				break;
 			}			
 			}			
 		}
 		}
+		return true;
 	}
 	}
 
 
 	void MemoryTexture::init(const ImageData &src)
 	void MemoryTexture::init(const ImageData &src)

+ 1 - 1
oxygine/src/MemoryTexture.h

@@ -15,7 +15,7 @@ namespace oxygine
 		MemoryTexture();
 		MemoryTexture();
 		~MemoryTexture();
 		~MemoryTexture();
 
 
-		void init(file::buffer &bf, bool premultiplied = false, TextureFormat format = TF_UNDEFINED);
+		bool init(file::buffer &bf, bool premultiplied = false, TextureFormat format = TF_UNDEFINED);
 		void init(const ImageData &src);
 		void init(const ImageData &src);
 		void init(int w, int h, TextureFormat Format);
 		void init(int w, int h, TextureFormat Format);
 
 

+ 6 - 5
oxygine/src/core/STDFileSystem.cpp

@@ -12,7 +12,7 @@
 
 
 
 
 //#define LOGD(...) oxygine::log::messageln(__VA_ARGS__)
 //#define LOGD(...) oxygine::log::messageln(__VA_ARGS__)
-#define LOGD(...) 
+#define LOGD(...) ((void)0)
 
 
 #if __S3E__
 #if __S3E__
 #define USE_S3E_FILE
 #define USE_S3E_FILE
@@ -164,8 +164,9 @@ namespace oxygine
 				unsigned int size  = (unsigned int)oxFileTell(_handle);
 				unsigned int size  = (unsigned int)oxFileTell(_handle);
 				oxFileSeek(_handle, 0, ox_FILESEEK_SET);
 				oxFileSeek(_handle, 0, ox_FILESEEK_SET);
 				return size;
 				return size;
-#endif
+#else
 				return SDL_RWsize((SDL_RWops*)_handle);				
 				return SDL_RWsize((SDL_RWops*)_handle);				
+#endif				
 			}
 			}
 
 
 		private:
 		private:
@@ -193,11 +194,11 @@ namespace oxygine
 
 
 		void STDFileSystem::setPath(const char *folder)
 		void STDFileSystem::setPath(const char *folder)
 		{
 		{
-			_path = folder;
-			_path += "/";
+			_path = folder;			
 			char norm[512];
 			char norm[512];
-			path::normalize(_path.c_str(), norm);
+			path::normalize(_path.c_str(), norm);			
 			_path = norm;
 			_path = norm;
+			_path += "/";
 		}
 		}
 
 
 
 

+ 8 - 0
oxygine/src/core/android/jniHelper.cpp

@@ -11,4 +11,12 @@ namespace oxygine
 	{
 	{
 		return Android_JNI_GetEnv();
 		return Android_JNI_GetEnv();
 	}
 	}
+
+	std::string jniGetString(JNIEnv *env, jstring jstr)
+	{
+		const char *cstr = env->GetStringUTFChars(jstr, 0);
+		string str = cstr;
+		env->ReleaseStringUTFChars(jstr, cstr);
+		return str;
+	}
 }
 }

+ 4 - 0
oxygine/src/core/android/jniHelper.h

@@ -1,8 +1,11 @@
 #pragma once
 #pragma once
 #include <jni.h> 
 #include <jni.h> 
 #include <android/log.h>
 #include <android/log.h>
+#include <string>
 namespace oxygine
 namespace oxygine
 {
 {
+	using namespace std;
+	
 	#define STRINGIZE_DETAIL(x) #x
 	#define STRINGIZE_DETAIL(x) #x
 	#define STRINGIZE(x) STRINGIZE_DETAIL(x)
 	#define STRINGIZE(x) STRINGIZE_DETAIL(x)
 
 
@@ -40,4 +43,5 @@ namespace oxygine
 
 
 
 
 	JNIEnv* jniGetEnv(void);
 	JNIEnv* jniGetEnv(void);
+	std::string jniGetString(JNIEnv *env, jstring jstr);
 }
 }

+ 45 - 9
oxygine/src/core/android/jniUtils.cpp

@@ -71,14 +71,6 @@ namespace oxygine
 		return 0;
 		return 0;
 	}
 	}
 
 
-	std::string 	getString(JNIEnv *env, jstring jstr)
-	{
-		const char *cstr = env->GetStringUTFChars(jstr, 0);
-		string str = cstr;
-		env->ReleaseStringUTFChars(jstr, cstr);
-		return str;
-	}
-
 	std::string		jniGetLanguage()
 	std::string		jniGetLanguage()
 	{
 	{
 		try
 		try
@@ -88,7 +80,7 @@ namespace oxygine
 
 
 			jstring jstr = (jstring)env->CallStaticObjectMethod(_jUtils, _jUtils_getLanguage);
 			jstring jstr = (jstring)env->CallStaticObjectMethod(_jUtils, _jUtils_getLanguage);
 
 
-			return getString(env, jstr);
+			return jniGetString(env, jstr);
 		}
 		}
 		catch(const notFound&)
 		catch(const notFound&)
 		{
 		{
@@ -115,6 +107,50 @@ namespace oxygine
 
 
 		return false;
 		return false;
 	}
 	}
+
+	bool			jniExit()
+	{
+		try
+		{
+			JNIEnv *env = jniGetEnv();
+			LOCAL_REF_HOLDER(env);
+
+			jmethodID m = env->GetStaticMethodID(_jUtils, "exit", "()V");
+			JNI_NOT_NULL(m);
+			env->CallStaticVoidMethod(_jUtils, m);			
+		}
+		catch(const notFound&){}		
+	}
+
+	void			jniMoveTaskToBack()
+	{
+		try
+		{
+			JNIEnv *env = jniGetEnv();
+			LOCAL_REF_HOLDER(env);
+
+			jmethodID m = env->GetStaticMethodID(_jUtils, "moveTaskToBack", "()V");
+			JNI_NOT_NULL(m);
+			env->CallStaticVoidMethod(_jUtils, m);			
+		}
+		catch(const notFound&){}		
+	}
+
+	void			jniBrowse(const char *url)
+	{
+		try
+		{
+			JNIEnv *env = jniGetEnv();
+			LOCAL_REF_HOLDER(env);
+
+			jstring jstr = env->NewStringUTF(url);
+
+			jmethodID m = env->GetStaticMethodID(_jUtils, "browse", "(Ljava/lang/String;)V");
+			JNI_NOT_NULL(m);
+			env->CallStaticVoidMethod(_jUtils, m, jstr);
+		}
+		catch(const notFound&){}				
+	}
 }
 }
 
 
 static void _init(JNIEnv *env)
 static void _init(JNIEnv *env)

+ 4 - 0
oxygine/src/core/android/jniUtils.h

@@ -16,4 +16,8 @@ namespace oxygine
 	/**returns locale. ISO 639-1 */
 	/**returns locale. ISO 639-1 */
 	std::string		jniGetLanguage();
 	std::string		jniGetLanguage();
 	bool			jniIsNetworkAvailable();
 	bool			jniIsNetworkAvailable();
+
+	bool			jniExit();
+	void			jniMoveTaskToBack();
+	void			jniBrowse(const char *url);
 }
 }

+ 5 - 3
oxygine/src/core/log.cpp

@@ -9,7 +9,7 @@
 
 
 #if defined(ANDROID)
 #if defined(ANDROID)
 #include <android/log.h>
 #include <android/log.h>
-#define  LOG_TAG    "oxygine"
+#define  LOG_TAG    "SDL"
 #define  LOGD(str)  __android_log_write(ANDROID_LOG_DEBUG, LOG_TAG, str)
 #define  LOGD(str)  __android_log_write(ANDROID_LOG_DEBUG, LOG_TAG, str)
 
 
 #else
 #else
@@ -66,7 +66,8 @@ namespace oxygine
 			
 			
 			int len = strlen(buff);
 			int len = strlen(buff);
 			int i = vsnprintf(buff + len, sizeof(buff) - len, format, args);
 			int i = vsnprintf(buff + len, sizeof(buff) - len, format, args);
-						
+			if (i == -1)
+				buff[SIZE - 1] = 0;
 			out_line(buff, i + len);
 			out_line(buff, i + len);
 		}
 		}
 
 
@@ -77,7 +78,8 @@ namespace oxygine
 
 
 			int len = strlen(buff);
 			int len = strlen(buff);
 			int i = vsnprintf(buff + len, sizeof(buff) - len, format, args);
 			int i = vsnprintf(buff + len, sizeof(buff) - len, format, args);
-
+			if (i == -1)
+				buff[SIZE - 1] = 0;
 			out(buff);
 			out(buff);
 		}
 		}
 
 

+ 17 - 2
oxygine/src/core/oxygine.cpp

@@ -660,6 +660,19 @@ namespace oxygine
 							input->getTouchByID((int)event.tfinger.fingerId));
 							input->getTouchByID((int)event.tfinger.fingerId));
 					}				
 					}				
 					break;
 					break;
+					/*
+				case SDL_TEXTEDITING:
+					{
+						int q=0;
+					}
+					break;
+				case SDL_TEXTINPUT:
+					{
+						log::messageln("t: %s", event.text.text);
+						int q=0;
+					}
+					break;
+					*/
 				}
 				}
 			}
 			}
 
 
@@ -707,8 +720,10 @@ namespace oxygine
 		{
 		{
 #ifdef __S3E__
 #ifdef __S3E__
 			s3eOSExecExecute(str, false);
 			s3eOSExecExecute(str, false);
+#elif __ANDROID__
+			jniBrowse(str);
 #else
 #else
-			OX_ASSERT(!"execute");
+			OX_ASSERT(!"execute not implemented");
 #endif
 #endif
 		}
 		}
 
 
@@ -825,7 +840,7 @@ namespace oxygine
 #ifdef __ANDROID__
 #ifdef __ANDROID__
 		return jniGetLanguage();
 		return jniGetLanguage();
 #endif		
 #endif		
-		return "unknown";
+		return "en";
 	}
 	}
 
 
 	void	sleep(timeMS time)
 	void	sleep(timeMS time)

+ 1 - 0
oxygine/src/oxygine-framework.h

@@ -20,6 +20,7 @@
 #include "Font.h"
 #include "Font.h"
 #include "initActor.h"
 #include "initActor.h"
 #include "Input.h"
 #include "Input.h"
+#include "InputText.h"
 #include "MemoryTexture.h"
 #include "MemoryTexture.h"
 #include "Multithreading.h"
 #include "Multithreading.h"
 #include "PointerState.h"
 #include "PointerState.h"

+ 1 - 1
oxygine/src/oxygine_include.h

@@ -47,7 +47,7 @@
 namespace oxygine{namespace log{void error(const char *format, ...);}}
 namespace oxygine{namespace log{void error(const char *format, ...);}}
 #define OX_ASSERT(x) if (!(x)) oxygine::log::error("Assert! %d %s", __LINE__, __FILE__); (assert(x))
 #define OX_ASSERT(x) if (!(x)) oxygine::log::error("Assert! %d %s", __LINE__, __FILE__); (assert(x))
 #else
 #else
-#define OX_ASSERT(x) (assert(x))
+#define OX_ASSERT(x) (if (!(x)) oxygine::log::error("Assert! %d %s", __LINE__, __FILE__))
 #endif
 #endif
 
 
 #define OXYGINE_HAS_RESTORE
 #define OXYGINE_HAS_RESTORE

+ 10 - 0
oxygine/src/utils/stringUtils.cpp

@@ -23,6 +23,9 @@ namespace oxygine
 			//normalize("//", dest);
 			//normalize("//", dest);
 			//OX_ASSERT(strcmp(dest, "/") == 0);
 			//OX_ASSERT(strcmp(dest, "/") == 0);
 
 
+			normalize("rom://abc", dest);
+			OX_ASSERT(strcmp(dest, "rom://abc") == 0);
+
 			normalize("/../", dest);
 			normalize("/../", dest);
 			OX_ASSERT(strcmp(dest, "/../") == 0);
 			OX_ASSERT(strcmp(dest, "/../") == 0);
 
 
@@ -144,6 +147,13 @@ namespace oxygine
 
 
 				if (c == '\\')
 				if (c == '\\')
 					c = '/';
 					c = '/';
+				if (c == ':')
+				{
+					*dest++ = *src++;
+					*dest++ = *src++;
+					*dest++ = *src++;
+					continue;
+				}
 				if (c == '/' && last == '.' && last_last == '.' && (dest > copy + 2))
 				if (c == '/' && last == '.' && last_last == '.' && (dest > copy + 2))
 				{
 				{
 					dest -= 3;
 					dest -= 3;

+ 2 - 1
readme.Android

@@ -24,10 +24,11 @@ how to build. Steps:
   	example: d:\android\android-sdk\platform-tools\
   	example: d:\android\android-sdk\platform-tools\
   	example: d:\android\android-sdk\tools\)
   	example: d:\android\android-sdk\tools\)
 
 
-- copy latest source code 
+- copy latest source code (and don't forget to update it if you updated SDL)
 	from SDL/android-project/src/
 	from SDL/android-project/src/
 	to oxygine-framework/oxygine/SDL/android/lib/src/
 	to oxygine-framework/oxygine/SDL/android/lib/src/
 
 
+
 - goto oxygine-framework\examples and choose any example. Lets call it "Demo" 
 - goto oxygine-framework\examples and choose any example. Lets call it "Demo" 
 - try to build and run it using these scripts located in proj.android folder:
 - try to build and run it using these scripts located in proj.android folder:
 	build.cmd
 	build.cmd

+ 8 - 2
tools/gen_template.py

@@ -67,7 +67,13 @@ def run(args):
     data = "../data"
     data = "../data"
     abs_data = os.path.normpath(args.dest + "/" + data)
     abs_data = os.path.normpath(args.dest + "/" + data)
     
     
-    data_files = glob.glob(abs_data + "/*")
+    data_files_ = glob.glob(abs_data + "/*")
+    data_files = []
+    for d in data_files_:
+        if os.path.splitext(d)[1]  in (".dll", ):
+            continue
+        data_files.append(d)
+
     cpp_files = glob.glob(args.src + "/*.cpp")
     cpp_files = glob.glob(args.src + "/*.cpp")
     h_files = glob.glob(args.src + "/*.h")    
     h_files = glob.glob(args.src + "/*.h")    
 
 
@@ -254,7 +260,7 @@ def run(args):
                 dest_file.write(dest_data)      
                 dest_file.write(dest_data)      
             else:
             else:
                 print "copying file: " + dest_path
                 print "copying file: " + dest_path
-                import shutil
+                import shutil                
                 shutil.copyfile(src_path, dest_path)
                 shutil.copyfile(src_path, dest_path)
 
 
 
 

+ 0 - 12
tools/templates/proj.android/local.properties

@@ -1,12 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-# 
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-
-#set sdk.dir or set ENV variable ANDROID_HOME
-#sdk.dir=d:/android/android-sdk/

+ 4 - 0
tools/templates/proj.win32/${PROJECT}.vcxproj.user

@@ -4,4 +4,8 @@
     <LocalDebuggerWorkingDirectory>${DATA}</LocalDebuggerWorkingDirectory>
     <LocalDebuggerWorkingDirectory>${DATA}</LocalDebuggerWorkingDirectory>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
     <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LocalDebuggerWorkingDirectory>../data</LocalDebuggerWorkingDirectory>
+    <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
+   </PropertyGroup>
 </Project>
 </Project>

+ 9 - 3
tools/templates/templates.wpr

@@ -18,7 +18,13 @@ proj.directory-list = [{'dirloc': loc('.'),
                         'watch_for_changes': True}]
                         'watch_for_changes': True}]
 proj.file-list = [loc('../gen.py')]
 proj.file-list = [loc('../gen.py')]
 proj.file-type = 'shared'
 proj.file-type = 'shared'
-proj.launch-config = {loc('../gen_template.py'): ('project',
-        (u'MyGame -t macosx -d d:/dropbox/Demo/proj.macosx  -s d:/dropbox/Demo/src/',
-         ''))}
+proj.launch-config = {loc('../gen.py'): ('project',
+        (u'example -t win32 -d folder/temp -s d:\\oxygine-framework\\examples\\Demo\\src\\ --data d:\\oxygine-framework\\examples\\Demo\\data',
+         '')),
+                      loc('../gen_template.py'): ('project',
+        (u'Demo -t win32 -d e:/Demo/proj.win32  -s e:\\Demo\\src\\',
+         '')),
+                      loc('gen.py'): ('project',
+                                      (u'example -t win32 -d folder/temp -s d:\\oxygine-framework\\examples\\Demo\\src\\ --data d:\\oxygine-framework\\examples\\Demo\\data',
+                                       ''))}
 proj.main-file = loc('../gen_template.py')
 proj.main-file = loc('../gen_template.py')

+ 195 - 207
tools/templates/templates.wpu

@@ -4,7 +4,7 @@
 # Wing IDE project file : User-specific branch                   #
 # Wing IDE project file : User-specific branch                   #
 ##################################################################
 ##################################################################
 [user attributes]
 [user attributes]
-debug.breakpoints = {loc('../../../../c:/Python27/Lib/posixpath.py'): {344: (0,
+debug.breakpoints = {loc('file:c:/Python27/Lib/posixpath.py'): {344: (0,
         None,
         None,
         1,
         1,
         0)}}
         0)}}
@@ -12,8 +12,8 @@ debug.err-values = {loc('../gen_template.py'): {}}
 debug.show-args-dialog = {loc('../gen.py'): False,
 debug.show-args-dialog = {loc('../gen.py'): False,
                           loc('../gen_template.py'): False,
                           loc('../gen_template.py'): False,
                           loc('gen.py'): False}
                           loc('gen.py'): False}
-debug.var-col-widths = [0.3989071038251366,
-                        0.6010928961748634]
+debug.var-col-widths = [0.39903846153846156,
+                        0.6009615384615384]
 guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
 guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
                             'windows': [{'name': 'Q6CT9O5su5XYHRFfzo05pJtcAB'\
                             'windows': [{'name': 'Q6CT9O5su5XYHRFfzo05pJtcAB'\
         '1X8ffB',
         '1X8ffB',
@@ -22,7 +22,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
         'view': {'area': 'tall',
         'view': {'area': 'tall',
                  'constraint': None,
                  'constraint': None,
                  'current_pages': [0,
                  'current_pages': [0,
-                                   1],
+                                   0],
                  'full-screen': False,
                  'full-screen': False,
                  'notebook_display': 'normal',
                  'notebook_display': 'normal',
                  'notebook_percent': 0.25,
                  'notebook_percent': 0.25,
@@ -34,7 +34,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
         'list-files-first': False,
         'list-files-first': False,
         'tree-states': {'deep': {'expanded-nodes': [(0,)],
         'tree-states': {'deep': {'expanded-nodes': [(0,)],
                                  'selected-nodes': [(0,
                                  'selected-nodes': [(0,
-        7)],
+        6)],
                                  'top-node': (0,)}},
                                  'top-node': (0,)}},
         'tree-style': 'deep'}}),
         'tree-style': 'deep'}}),
                               ('snippets',
                               ('snippets',
@@ -101,7 +101,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
                                        'fRegexFlags': 46,
                                        'fRegexFlags': 46,
                                        'fReplaceText': u'self.free_rects',
                                        'fReplaceText': u'self.free_rects',
                                        'fReverse': False,
                                        'fReverse': False,
-                                       'fSearchText': u'04A57D621871FF9F0068B1E5',
+                                       'fSearchText': u'separator',
                                        'fStartPos': 0,
                                        'fStartPos': 0,
                                        'fStyle': 'text',
                                        'fStyle': 'text',
                                        'fWholeWords': False,
                                        'fWholeWords': False,
@@ -166,24 +166,25 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
                       {'attrib-starts': [],
                       {'attrib-starts': [],
                        'first-line': 0,
                        'first-line': 0,
                        'folded-linenos': [],
                        'folded-linenos': [],
-                       'sel-line': 13,
-                       'sel-line-start': 1270,
-                       'selection_end': 1270,
-                       'selection_start': 1270}),
+                       'sel-line': 8,
+                       'sel-line-start': 716,
+                       'selection_end': 716,
+                       'selection_start': 716}),
                      ('debug-probe',
                      ('debug-probe',
                       'wide',
                       'wide',
                       2,
                       2,
                       {'attrib-starts': [],
                       {'attrib-starts': [],
-                       'first-line': 0,
+                       'first-line': 146,
                        'folded-linenos': [],
                        'folded-linenos': [],
-                       'history': {u'file:/Users/Mac/dev/oxygine-framework/tools/gen_template.py': [''\
-        'print ls\n',
-        'print files\n']},
+                       'history': {u'file:D:/oxygine-framework/oxygine/templates/gen.py': [''\
+        'print src_data\n',
+        'print dest_data\n',
+        'print SRC\n']},
                        'launch-id': None,
                        'launch-id': None,
-                       'sel-line': 7,
-                       'sel-line-start': 1199,
-                       'selection_end': 1199,
-                       'selection_start': 1199}),
+                       'sel-line': 164,
+                       'sel-line-start': 11140,
+                       'selection_end': 11140,
+                       'selection_start': 11140}),
                      ('messages',
                      ('messages',
                       'wide',
                       'wide',
                       2,
                       2,
@@ -206,10 +207,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
                        'folded-linenos': [],
                        'folded-linenos': [],
                        'history': {},
                        'history': {},
                        'launch-id': None,
                        'launch-id': None,
-                       'sel-line': 3,
-                       'sel-line-start': 185,
-                       'selection_end': 185,
-                       'selection_start': 185}),
+                       'sel-line': 2,
+                       'sel-line-start': 145,
+                       'selection_end': 145,
+                       'selection_start': 145}),
                      ('debug-watch',
                      ('debug-watch',
                       'wide',
                       'wide',
                       1,
                       1,
@@ -222,249 +223,237 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
                                        ('eval',
                                        ('eval',
         u'a'),
         u'a'),
                                        ('eval',
                                        ('eval',
-        u'b'),
-                                       ('eval',
-        u'ls'),
-                                       ('eval',
-        u'r')],
-                       'tree-state': {'expanded-nodes': [(5,),
-        (6,)],
-                                      'selected-nodes': [(5,)],
+        u'b')],
+                       'tree-state': {'expanded-nodes': [],
+                                      'selected-nodes': [(0,)],
                                       'top-node': (0,)}})],
                                       'top-node': (0,)}})],
-        'primary_view_state': {'editor_states': ({'bookmarks': ([(loc('../gen_template.py'),
-        {'attrib-starts': [('run',
-                            16),
-                           ('run.files',
-                            46)],
-         'first-line': 44,
+        'primary_view_state': {'editor_states': ({'bookmarks': ([(loc('file:c:/Python27/Lib/ntpath.py'),
+        {'attrib-starts': [('normpath',
+                            397)],
+         'first-line': 395,
          'folded-linenos': [],
          'folded-linenos': [],
-         'sel-line': 49,
-         'sel-line-start': 1133,
-         'selection_end': 1133,
-         'selection_start': 1133},
-        1391358396.481137),
-        (loc('../gen_template.py'),
-         {'attrib-starts': [('run',
-                             16)],
-          'first-line': 90,
+         'sel-line': 407,
+         'sel-line-start': 14274,
+         'selection_end': 14274,
+         'selection_start': 14274},
+        1391336549.643),
+        (loc('file:c:/Python27/Lib/ntpath.py'),
+         {'attrib-starts': [('normpath',
+                             397)],
+          'first-line': 395,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 122,
-          'sel-line-start': 4792,
-          'selection_end': 4835,
-          'selection_start': 4835},
-         1391358398.519029),
+          'sel-line': 418,
+          'sel-line-start': 14957,
+          'selection_end': 14977,
+          'selection_start': 14977},
+         1391336551.64),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16)],
-          'first-line': 101,
+                             14)],
+          'first-line': 52,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 123,
-          'sel-line-start': 4838,
-          'selection_end': 4873,
-          'selection_start': 4873},
-         1391358446.720885),
-        (loc('../gen_template.py'),
-         {'attrib-starts': [('run',
-                             16)],
-          'first-line': 101,
+          'sel-line': 68,
+          'sel-line-start': 1611,
+          'selection_end': 1631,
+          'selection_start': 1631},
+         1391336701.959),
+        (loc('file:c:/Python27/Lib/ntpath.py'),
+         {'attrib-starts': [('abspath',
+                             465)],
+          'first-line': 423,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 122,
-          'sel-line-start': 4792,
-          'selection_end': 4806,
-          'selection_start': 4806},
-         1391358455.295095),
+          'sel-line': 468,
+          'sel-line-start': 16497,
+          'selection_end': 16497,
+          'selection_start': 16497},
+         1391336772.147),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16),
-                            ('run.fn',
-                             96)],
-          'first-line': 86,
+                             14),
+                            ('run.process_folder',
+                             71)],
+          'first-line': 58,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 98,
-          'sel-line-start': 2829,
-          'selection_end': 2840,
-          'selection_start': 2840},
-         1391358481.06345),
+          'sel-line': 93,
+          'sel-line-start': 2283,
+          'selection_end': 2297,
+          'selection_start': 2297},
+         1391337215.581),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16),
-                            ('run.Refs',
-                             78)],
-          'first-line': 66,
+                             14),
+                            ('run.process_folder',
+                             71)],
+          'first-line': 58,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 78,
-          'sel-line-start': 1997,
-          'selection_end': 2009,
-          'selection_start': 2009},
-         1391358825.826649),
+          'sel-line': 93,
+          'sel-line-start': 2283,
+          'selection_end': 2283,
+          'selection_start': 2283},
+         1391337392.085),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16)],
-          'first-line': 66,
+                             14),
+                            ('run.process_folder',
+                             71)],
+          'first-line': 58,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 75,
-          'sel-line-start': 1948,
-          'selection_end': 1972,
-          'selection_start': 1972},
-         1391359056.540459),
+          'sel-line': 93,
+          'sel-line-start': 2283,
+          'selection_end': 2283,
+          'selection_start': 2283},
+         1391337396.09),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16)],
-          'first-line': 96,
+                             14),
+                            ('run.process_folder',
+                             71)],
+          'first-line': 58,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 118,
-          'sel-line-start': 4122,
-          'selection_end': 4214,
-          'selection_start': 4214},
-         1391359085.354354),
+          'sel-line': 102,
+          'sel-line-start': 2629,
+          'selection_end': 2656,
+          'selection_start': 2656},
+         1391337398.593),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16),
-                            ('run.files',
-                             46)],
-          'first-line': 42,
+                             14),
+                            ('run.process_folder',
+                             71)],
+          'first-line': 58,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 51,
-          'sel-line-start': 1201,
-          'selection_end': 1241,
-          'selection_start': 1241},
-         1391359645.278684),
+          'sel-line': 91,
+          'sel-line-start': 2201,
+          'selection_end': 2235,
+          'selection_start': 2235},
+         1391337534.103),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
                              16)],
                              16)],
-          'first-line': 168,
+          'first-line': 0,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 191,
-          'sel-line-start': 8166,
-          'selection_end': 8196,
-          'selection_start': 8172},
-         1391361943.639915),
+          'sel-line': 22,
+          'sel-line-start': 420,
+          'selection_end': 459,
+          'selection_start': 459},
+         1391337548.095),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
                              16)],
                              16)],
-          'first-line': 63,
-          'folded-linenos': [],
-          'sel-line': 67,
-          'sel-line-start': 1604,
-          'selection_end': 1604,
-          'selection_start': 1604},
-         1391365808.763829),
-        (loc('../gen_template.py'),
-         {'attrib-starts': [],
-          'first-line': 235,
+          'first-line': 7,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 266,
-          'sel-line-start': 10480,
-          'selection_end': 10493,
-          'selection_start': 10493},
-         1391366689.08102),
+          'sel-line': 23,
+          'sel-line-start': 461,
+          'selection_end': 491,
+          'selection_start': 491},
+         1391337610.616),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
                              16)],
                              16)],
-          'first-line': 102,
+          'first-line': 14,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 204,
-          'sel-line-start': 8543,
-          'selection_end': 8598,
-          'selection_start': 8598},
-         1391366690.231315),
-        (loc('../gen_template.py'),
+          'sel-line': 24,
+          'sel-line-start': 495,
+          'selection_end': 524,
+          'selection_start': 524},
+         1391337622.615),
+        [loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16)],
-          'first-line': 136,
+                             16),
+                            ('run.process_folder',
+                             77)],
+          'first-line': 54,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 152,
-          'sel-line-start': 5914,
-          'selection_end': 5914,
-          'selection_start': 5914},
-         1391366732.389646),
+          'sel-line': 99,
+          'sel-line-start': 2427,
+          'selection_end': 2427,
+          'selection_start': 2427},
+         1391337634.101],
+        [loc('file:c:/Python27/Lib/ntpath.py'),
+         {'attrib-starts': [('abspath',
+                             465)],
+          'first-line': 423,
+          'folded-linenos': [],
+          'sel-line': 468,
+          'sel-line-start': 16497,
+          'selection_end': 16497,
+          'selection_start': 16497},
+         1391352491.228],
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
-         {'attrib-starts': [('run',
-                             16)],
-          'first-line': 142,
+         {'attrib-starts': [],
+          'first-line': 93,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 166,
-          'sel-line-start': 7012,
-          'selection_end': 7012,
-          'selection_start': 7012},
-         1391366751.226992),
+          'sel-line': 128,
+          'sel-line-start': 3477,
+          'selection_end': 3538,
+          'selection_start': 3538},
+         1391352526.84),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
                              16)],
                              16)],
-          'first-line': 133,
+          'first-line': 15,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 160,
-          'sel-line-start': 6800,
-          'selection_end': 6816,
-          'selection_start': 6816},
-         1391366826.280298),
+          'sel-line': 24,
+          'sel-line-start': 541,
+          'selection_end': 571,
+          'selection_start': 571},
+         1391353006.175),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16),
-                            ('run.process',
-                             46)],
-          'first-line': 40,
+                             16)],
+          'first-line': 4,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 46,
-          'sel-line-start': 1059,
-          'selection_end': 1074,
-          'selection_start': 1074},
-         1391366836.862063),
+          'sel-line': 22,
+          'sel-line-start': 420,
+          'selection_end': 526,
+          'selection_start': 526},
+         1391353081.681),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
                              16)],
                              16)],
-          'first-line': 130,
+          'first-line': 10,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 144,
-          'sel-line-start': 4960,
-          'selection_end': 5003,
-          'selection_start': 5003},
-         1391366884.545355),
+          'sel-line': 22,
+          'sel-line-start': 420,
+          'selection_end': 535,
+          'selection_start': 535},
+         1391353098.663),
         (loc('../gen_template.py'),
         (loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16),
-                            ('run.fn',
-                             113)],
-          'first-line': 106,
+                             16)],
+          'first-line': 4,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 122,
-          'sel-line-start': 3472,
-          'selection_end': 3493,
-          'selection_start': 3493},
-         1391366893.052536),
+          'sel-line': 22,
+          'sel-line-start': 420,
+          'selection_end': 546,
+          'selection_start': 546},
+         1391353105.665),
         [loc('../gen_template.py'),
         [loc('../gen_template.py'),
          {'attrib-starts': [('run',
          {'attrib-starts': [('run',
-                             16)],
-          'first-line': 175,
+                             16),
+                            ('run.process_folder',
+                             77)],
+          'first-line': 55,
           'folded-linenos': [],
           'folded-linenos': [],
-          'sel-line': 206,
-          'sel-line-start': 8617,
-          'selection_end': 8617,
-          'selection_start': 8617},
-         1391367963.979408]],
+          'sel-line': 100,
+          'sel-line-start': 2535,
+          'selection_end': 2535,
+          'selection_start': 2535},
+         1391353116.664]],
         19),
         19),
         'current-loc': loc('../gen_template.py'),
         'current-loc': loc('../gen_template.py'),
         'editor-state-list': [(loc('../gen_template.py'),
         'editor-state-list': [(loc('../gen_template.py'),
                                {'attrib-starts': [('run',
                                {'attrib-starts': [('run',
         16)],
         16)],
-                                'first-line': 73,
+                                'first-line': 49,
                                 'folded-linenos': [],
                                 'folded-linenos': [],
                                 'sel-line': 84,
                                 'sel-line': 84,
                                 'sel-line-start': 2151,
                                 'sel-line-start': 2151,
-                                'selection_end': 2164,
-                                'selection_start': 2164}),
-                              (loc('../../../../../../System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py'),
-                               {'attrib-starts': [],
-                                'first-line': 817,
-                                'folded-linenos': [],
-                                'sel-line': 887,
-                                'sel-line-start': 31659,
-                                'selection_end': 31666,
-                                'selection_start': 31659})],
-        'has-focus': True,
+                                'selection_end': 2172,
+                                'selection_start': 2172})],
+        'has-focus': False,
         'locked': False},
         'locked': False},
-        [loc('../gen_template.py'),
-         loc('../../../../../../System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py')]),
+        [loc('../gen_template.py')]),
                                'open_files': [u'../gen_template.py']},
                                'open_files': [u'../gen_template.py']},
         'saved_notebook_display': None,
         'saved_notebook_display': None,
         'split_percents': {0: 0.23151750972762647},
         'split_percents': {0: 0.23151750972762647},
@@ -480,11 +469,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
                          120,
                          120,
                          1468,
                          1468,
                          909)}]}
                          909)}]}
-guimgr.recent-documents = [loc('../gen_template.py'),
-                           loc('../../../../../../System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/random.py')]
+guimgr.recent-documents = [loc('../gen_template.py')]
 proj.launch-config = {loc('../gen_template.py'): ('project',
 proj.launch-config = {loc('../gen_template.py'): ('project',
-        (u'part4 -t ios -d /Users/Mac/dev/part4/proj.ios  -s /Users/Mac/dev/part4/src',
+        (u'MyGame -t macosx -d d:/dropbox/Demo/proj.macosx  -s d:/dropbox/Demo/src/',
          ''))}
          ''))}
-search.search-history = [u'_children',
-                         u'separator',
-                         u'slash']
+search.search-history = [u'separator',
+                         u'slash',
+                         u'_children']