Browse Source

Merge pull request #361 from kynora/keyboard_br

Keyboard Toy
Peter Robinson 9 years ago
parent
commit
9c7cb750d6
31 changed files with 1223 additions and 0 deletions
  1. 5 0
      modules/Keyboard/1/assets/audios/keypress.taml
  2. BIN
      modules/Keyboard/1/assets/audios/keypress.wav
  3. BIN
      modules/Keyboard/1/assets/images/closeBtn.png
  4. 3 0
      modules/Keyboard/1/assets/images/closeBtn.taml
  5. BIN
      modules/Keyboard/1/assets/images/kbbD.png
  6. 3 0
      modules/Keyboard/1/assets/images/kbbD.taml
  7. BIN
      modules/Keyboard/1/assets/images/kbbN.png
  8. 3 0
      modules/Keyboard/1/assets/images/kbbN.taml
  9. BIN
      modules/Keyboard/1/assets/images/keyboardAlpha.png
  10. 3 0
      modules/Keyboard/1/assets/images/keyboardAlpha.taml
  11. BIN
      modules/Keyboard/1/assets/images/keyboardAlphaLower.png
  12. 3 0
      modules/Keyboard/1/assets/images/keyboardAlphaLower.taml
  13. BIN
      modules/Keyboard/1/assets/images/keyboardNumber.png
  14. 3 0
      modules/Keyboard/1/assets/images/keyboardNumber.taml
  15. BIN
      modules/Keyboard/1/assets/images/keyboardSymbol.png
  16. 3 0
      modules/Keyboard/1/assets/images/keyboardSymbol.taml
  17. BIN
      modules/Keyboard/1/assets/images/shiftSymbol1.png
  18. 3 0
      modules/Keyboard/1/assets/images/shiftSymbol1.taml
  19. BIN
      modules/Keyboard/1/assets/images/shiftSymbol2.png
  20. 3 0
      modules/Keyboard/1/assets/images/shiftSymbol2.taml
  21. BIN
      modules/Keyboard/1/assets/images/spaceBar.png
  22. 3 0
      modules/Keyboard/1/assets/images/spaceBar.taml
  23. BIN
      modules/Keyboard/1/assets/images/spaceBarD.png
  24. 3 0
      modules/Keyboard/1/assets/images/spaceBarD.taml
  25. 749 0
      modules/Keyboard/1/gui/keyboardGui.taml
  26. 225 0
      modules/Keyboard/1/main.cs
  27. 11 0
      modules/Keyboard/1/module.taml
  28. 70 0
      modules/KeyboardToy/1/ChangeUsernameDlg.gui.taml
  29. 70 0
      modules/KeyboardToy/1/MainGameDlg.gui.taml
  30. 50 0
      modules/KeyboardToy/1/main.cs
  31. 10 0
      modules/KeyboardToy/1/module.taml

+ 5 - 0
modules/Keyboard/1/assets/audios/keypress.taml

@@ -0,0 +1,5 @@
+<AudioAsset
+    AssetName="keypress"
+    AssetAutoUnload="0"
+    AudioFile="keypress.wav"
+    Looping="0" />

BIN
modules/Keyboard/1/assets/audios/keypress.wav


BIN
modules/Keyboard/1/assets/images/closeBtn.png


+ 3 - 0
modules/Keyboard/1/assets/images/closeBtn.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="closeBtn"
+    ImageFile="closeBtn.png"/>

BIN
modules/Keyboard/1/assets/images/kbbD.png


+ 3 - 0
modules/Keyboard/1/assets/images/kbbD.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="kbbD"
+    ImageFile="kbbD.png"/>

BIN
modules/Keyboard/1/assets/images/kbbN.png


+ 3 - 0
modules/Keyboard/1/assets/images/kbbN.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="kbbN"
+    ImageFile="kbbN.png"/>

BIN
modules/Keyboard/1/assets/images/keyboardAlpha.png


+ 3 - 0
modules/Keyboard/1/assets/images/keyboardAlpha.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="keyboardAlpha"
+    ImageFile="keyboardAlpha.png"/>

BIN
modules/Keyboard/1/assets/images/keyboardAlphaLower.png


+ 3 - 0
modules/Keyboard/1/assets/images/keyboardAlphaLower.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="keyboardAlphaLower"
+    ImageFile="keyboardAlphaLower.png"/>

BIN
modules/Keyboard/1/assets/images/keyboardNumber.png


+ 3 - 0
modules/Keyboard/1/assets/images/keyboardNumber.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="keyboardNumber"
+    ImageFile="keyboardNumber.png"/>

BIN
modules/Keyboard/1/assets/images/keyboardSymbol.png


+ 3 - 0
modules/Keyboard/1/assets/images/keyboardSymbol.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="keyboardSymbol"
+    ImageFile="keyboardSymbol.png"/>

BIN
modules/Keyboard/1/assets/images/shiftSymbol1.png


+ 3 - 0
modules/Keyboard/1/assets/images/shiftSymbol1.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="shiftSymbol1"
+    ImageFile="shiftSymbol1.png"/>

BIN
modules/Keyboard/1/assets/images/shiftSymbol2.png


+ 3 - 0
modules/Keyboard/1/assets/images/shiftSymbol2.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="shiftSymbol2"
+    ImageFile="shiftSymbol2.png"/>

BIN
modules/Keyboard/1/assets/images/spaceBar.png


+ 3 - 0
modules/Keyboard/1/assets/images/spaceBar.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="spaceBar"
+    ImageFile="spaceBar.png"/>

BIN
modules/Keyboard/1/assets/images/spaceBarD.png


+ 3 - 0
modules/Keyboard/1/assets/images/spaceBarD.taml

@@ -0,0 +1,3 @@
+<ImageAsset
+    AssetName="spaceBarD"
+    ImageFile="spaceBarD.png"/>

+ 749 - 0
modules/Keyboard/1/gui/keyboardGui.taml

@@ -0,0 +1,749 @@
+<GuiControl
+   name = "keyboardGui"
+   Profile="GuiDefaultProfile"
+   HorizSizing="relative"
+   VertSizing="relative"
+   Position="0 0"
+   Visible = "1"
+   Active = "1"
+   MinExtent = "20 20"
+   Extent="1024 768">
+   
+   <GuiSpriteCtrl
+      name = "KeyboardSet"
+      HorizSizing = "relative"
+      VertSizing = "relative"
+      canSaveDynamicFields = "0"
+      isContainer = "1"
+      Profile = "GuiDefaultProfile"
+      Position="150 470"
+      Extent="715 293"
+      MinExtent = "8 2"
+      canSave = "1"
+      Visible = "1"
+      Active = "1"
+      Image = "Keyboard:keyboardAlpha">
+      
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(Q,1,"[");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="75 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(W,2,"]");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="146 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(E,3,"{");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="216 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(R,4,"}");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="286 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(T,5,"#");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="358 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(Y,6,"%");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="427 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(U,7,"^");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="496 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(I,8, "*");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="568 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(O, 9, "+");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="638 6"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(P,0,"=");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="46 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(A,"-", "_");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="116 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(S,"\/","\\");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="186 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(D,":","|");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="256 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(F,";","~");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="327 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(G,"(","<");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="397 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(H,")",">");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="466 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(J,"$","€");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="537 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(K,"","£");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="608 78"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(L,"@","¥");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="116 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(Z,".",".");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="186 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(X,",",",");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="256 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(C,"?","?");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="327 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(V,"!","!");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="397 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(B,"","");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="466 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(N,"\"","\"");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="537 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command='Keyboard.KeyPress(M,".",".");'/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="636 150"
+         Extent="66 66"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command="Keyboard.KeyPress(DELETE);"/>
+      <GuiImageButtonCtrl
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="187 225"
+         Extent="344 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:spaceBarD"
+         NormalImage = "Keyboard:spaceBar"
+         HoverImage = "Keyboard:spaceBar"
+         command="Keyboard.KeyPress(SPACE);"/>
+         
+      <GuiImageButtonCtrl
+         name = "toUpperBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 150"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         command = "Keyboard.toUpper();"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"/>
+         
+      <GuiImageButtonCtrl
+         name = "toUpperLockBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 150"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         command = "Keyboard.toUpperLock();"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"/>
+         
+      <GuiImageButtonCtrl
+         name = "toLower_UpperLockBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 150"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         command = "Keyboard.toLower();"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbD"
+         HoverImage = "Keyboard:kbbD"/>
+      <GuiImageButtonCtrl
+         name = "toLowerBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 150"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         command = "Keyboard.toLower();"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"/>
+         
+      <GuiImageButtonCtrl
+         name = "toNumberBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 225"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command = "Keyboard.toNumber();"/>
+         
+      <GuiImageButtonCtrl
+         name = "toLower_NumberBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 225"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command = "Keyboard.tolower();"/>
+         
+      <GuiImageButtonCtrl
+         name = "toSymbolBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 150"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command = "Keyboard.toSymbol();"/>
+      <GuiImageButtonCtrl
+         name = "toNumber_SymbolBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="6 150"
+         Extent="80 60"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         DownImage = "Keyboard:kbbD"
+         NormalImage = "Keyboard:kbbN"
+         HoverImage = "Keyboard:kbbN"
+         command = "Keyboard.toNumber();"/>
+         
+      <GuiImageButtonCtrl
+         name = "keyCloseBtn"
+         HorizSizing = "relative"
+         VertSizing = "relative"
+         canSaveDynamicFields = "0"
+         isContainer = "0"
+         Profile = "GuiKeyboardProfile"
+         Position="656 235"
+         Extent="54 54"
+         MinExtent = "6 6"
+         canSave = "1"
+         Visible = "1"
+         Active = "1"
+         groupNum = "-1"
+         buttonType = "PushButton"
+         useMouseEvents = "1"
+         NormalImage = "Keyboard:closeBtn"
+         DownImage = "Keyboard:closeBtn"
+         HoverImage = "Keyboard:closeBtn"
+         InactiveImage = "Keyboard:closeBtn"
+         command="Keyboard.KeyPress(CLOSE);"/>
+   </GuiSpriteCtrl>
+   
+</GuiControl>

+ 225 - 0
modules/Keyboard/1/main.cs

@@ -0,0 +1,225 @@
+function Keyboard::create(%this)
+{
+   %this.resetState();
+   
+}
+
+function Keyboard::destroy(%this)
+{
+   
+}
+
+function Keyboard::resetState(%this)
+{
+   %this.state = "toLower";
+   %this.dock = "bottom";
+   %this.targetGui ="";
+   %this.textBox = "";
+}
+function Keyboard::push(%this, %targetGui, %textBox, %showClose)
+{
+   Sandbox.add( TamlRead("./gui/keyboardGui.taml") );
+   %textBox.setText("");
+   
+   %this.targetGui = %targetGui;
+   %this.textBox = %textBox;
+   Canvas.pushDialog(%targetGui);
+   // resize to targetGui
+   %targetExtent = %targetGui.Extent;
+   KeyboardGui.resize(0, 0, %targetExtent._0, %targetExtent._1); 
+   %this.targetGui.addGuiControl(KeyboardSet);
+   %textBox.setFirstResponder();
+   
+   if (%showClose)
+      keyCloseBtn.setVisible(true);
+   else
+      keyCloseBtn.setVisible(false);
+   %this.toLower();
+   
+}
+
+function Keyboard::Pop(%this)
+{
+   KeyboardSet.delete();
+   KeyboardGui.delete();
+   Canvas.popDialog(%this.targetGui);
+   %this.resetState();
+}
+
+function Keyboard::toLower(%this)
+{
+   %this.state = "toLower";
+   toLower_NumberBtn.visible = false;
+   toLowerBtn.visible = false;
+   toSymbolBtn.visible = false;
+   toNumber_symbolBtn.visible = false;
+   toLower_UpperLockBtn.visible = false;
+   toUpperLockBtn.visible =false;
+   
+   toUpperBtn.visible = true;
+   toNumberBtn.visible = true;
+   keyboardSet.Image = "Keyboard:keyboardAlphaLower";
+   
+}
+
+function Keyboard::toUpper(%this)
+{
+   %this.state = "toUpper";
+   toUpperBtn.visible = false;
+   toLower_NumberBtn.visible = false;
+   toLowerBtn.visible = false;
+   toSymbolBtn.visible = false;
+   toNumber_symbolBtn.visible = false;
+   toLower_UpperLockBtn.visible = false;
+
+   toUpperLockBtn.visible =true;
+   toNumberBtn.visible = true;
+   keyboardSet.Image = "Keyboard:keyboardAlpha";
+}
+
+function Keyboard::toUpperLock(%this)
+{
+   %this.state = "toUpperLock";
+   toUpperBtn.visible = false;
+   toUpperLockBtn.visible = false;
+   toLowerBtn.visible = false;
+   toLower_NumberBtn.visible = false;
+   toSymbolBtn.visible = false;
+   toNumber_symbolBtn.visible = false;
+   
+   toLower_UpperLockBtn.visible = true;
+   toNumberBtn.visible = true;
+   keyboardSet.Image = "Keyboard:keyboardAlpha";
+}
+
+function Keyboard::toNumber(%this)
+{
+   %this.state = "toNumber";
+   toNumberBtn.visible = false;
+   toLowerBtn.visible = false;
+   toUpperBtn.visible = false;
+   toNumber_symbolBtn.visible = false;
+   toLower_UpperLockBtn.visible = false;
+   toUpperLockBtn.visible =false;
+   
+   toSymbolBtn.visible = true;
+   toLower_NumberBtn.visible = true;
+   keyboardSet.Image = "Keyboard:keyboardNumber";
+}
+
+function Keyboard::toSymbol(%this)
+{
+   %this.state = "toSymbol";
+   toSymbolBtn.visible = false;
+   toUpperBtn.visible = false;
+   toLowerBtn.visible = false;
+   toNumberBtn.visible = false;
+   toLower_UpperLockBtn.visible = false;
+   toUpperLockBtn.visible =false;
+   
+   toNumber_symbolBtn.visible = true;
+   toLower_NumberBtn.visible = true;
+   
+   keyboardSet.Image = "Keyboard:keyboardSymbol";
+}
+
+
+function Keyboard::KeyPress(%this, %letter, %number, %symbol)
+{
+   if (%letter $= "close")
+      %this.schedule(50, "Pop");
+   else if (%letter $= "delete")
+      %this.deleteCommand();
+   else if (%letter $= "space")
+      %this.insertChar(" ");
+   else
+      %this.insertChar(%letter, %number, %symbol);
+}
+
+
+function Keyboard::InsertChar(%this, %letter, %number, %symbol)
+{
+   if (strlen(%this.textBox.getText()) >= %this.textBox.MaxLength)
+      return;
+   if (%letter $= " ")
+   {
+      %this.textBox.setText(%this.textBox.getText() @ " ");
+   }
+   else
+   {
+      if (%this.state $= "toLower")
+         %this.textBox.setText(%this.textBox.getText() @ strlwr(%letter));
+      else if (%this.state $= "toUpper")
+      {
+         %this.textBox.setText(%this.textBox.getText() @ strupr(%letter));
+         %this.toLower();
+      }
+      else if (%this.state $= "toUpperLock")
+      {
+         %this.textBox.setText(%this.textBox.getText() @ strupr(%letter));
+      }
+      else if (%this.state $= "toNumber")
+      {
+         if (%letter $= "B")
+            %number = "'";
+         else if (%letter $= "K")
+            %number = "&";
+         %this.textBox.setText(%this.textBox.getText() @ %number);
+      }
+      else if (%this.state $= "toSymbol")
+      {
+         if (%letter $= "B")
+            %symbol = "'";
+         %this.textBox.setText(%this.textBox.getText() @ %symbol);
+      }
+   }
+}
+
+function Keyboard::DeleteCommand(%this)
+{
+   %len = strlen(%this.textBox.getText());
+   if (%len > 0)
+      %this.textBox.setText(getSubStr(%this.textBox.getText(), 0, %len - 1));
+}
+
+if(!isObject(GuiKeyboardProfile)) new GuiControlProfile (GuiKeyboardProfile)
+{
+    tab = false;
+    canKeyFocus = false;
+    hasBitmapArray = false;
+    mouseOverSelected = false;
+
+    // fill color
+    opaque = false;
+    fillColor = "211 211 211";
+    fillColorHL = "244 244 244";
+    fillColorNA = "244 244 244";
+
+    // border color
+    border = 0;
+    borderColor   = "100 100 100 255";
+    borderColorHL = "128 128 128";
+    borderColorNA = "64 64 64";
+
+    // font
+    fontType = $platformFontType;
+    fontSize = $platformFontSize;
+
+    fontColor = "0 0 0";
+    fontColorHL = "32 100 100";
+    fontColorNA = "0 0 0";
+    fontColorSEL= "10 10 10";
+
+    // used by guiTextControl
+    modal = true;
+    justify = "left";
+    autoSizeWidth = false;
+    autoSizeHeight = false;
+    returnTab = false;
+    numbersOnly = false;
+    cursorColor = "0 0 0 255";
+
+    // sounds
+    soundButtonDown = "Keyboard:keypress";
+    //soundButtonOver = "Sandbox:mouseOver";
+};

+ 11 - 0
modules/Keyboard/1/module.taml

@@ -0,0 +1,11 @@
+<ModuleDefinition
+	ModuleId="Keyboard"
+	VersionId="1"
+	ScriptFile="main.cs"
+	CreateFunction="create"
+	DestroyFunction="destroy">
+    <DeclaredAssets
+         Path="assets"
+         Extension="taml"
+         Recurse="true"/>
+</ModuleDefinition>

+ 70 - 0
modules/KeyboardToy/1/ChangeUsernameDlg.gui.taml

@@ -0,0 +1,70 @@
+<GuiSpriteCtrl
+    Name="ChangeUserNameDlg"
+    Profile="GuiToolboxProfile"
+    HorizSizing="width"
+    VertSizing="height"
+    Position="0 0"
+    Extent="1024 768"
+    MinExtent="8 8"
+    Visible="1"
+	HelpTag="0"
+	Image="@asset=Sandbox:blueGradient">
+
+    <GuiConsoleEditCtrl
+      Name="ChangeUsernameEntry"
+		Profile="GuiConsoleTextEditProfile"
+		HorizSizing="width"
+		VertSizing="top"
+		Position="400 150"
+		Extent="250 40"
+		minExtent="8 8"
+		Visible="1"
+		AltCommand="Keyboard.pop();UserNameTxt.setText(ChangeUsernameEntry.getText());"
+		HelpTag="0"
+		MaxLength="255"
+		HistorySize="40"
+		password="0"
+		TabComplete="0"
+		SinkAllKeyEvents="1"
+		UseSiblingScroller="1"
+	/>
+
+	<GuiButtonCtrl
+		Profile="BlueButtonProfile"
+		Text="Cancel"
+		ButtonType="PushButton"
+		command="Keyboard.pop();"
+		canSaveDynamicFields="0"
+		isContainer="0"
+		HorizSizing="relative"
+		VertSizing="relative"
+		Position="400 200"
+		Extent="100 40"
+		MinExtent="8 2"
+		canSave="1"
+		Visible="1"
+		Active="1"
+		hovertime="1000"
+		groupNum="-1"
+		useMouseEvents="1" />
+		
+	<GuiButtonCtrl
+		Profile="BlueButtonProfile"
+		Text="OK"
+		ButtonType="PushButton"
+		command="Keyboard.pop();UserNameTxt.setText(ChangeUsernameEntry.getText());"
+		canSaveDynamicFields="0"
+		isContainer="0"
+		HorizSizing="relative"
+		VertSizing="relative"
+		Position="500 200"
+		Extent="100 40"
+		MinExtent="8 2"
+		canSave="1"
+		Visible="1"
+		Active="1"
+		hovertime="1000"
+		groupNum="-1"
+		useMouseEvents="1" />
+		
+</GuiSpriteCtrl>

+ 70 - 0
modules/KeyboardToy/1/MainGameDlg.gui.taml

@@ -0,0 +1,70 @@
+<GuiSpriteCtrl
+    Name="MainGameDlg"
+    Profile="GuiToolboxProfile"
+    HorizSizing="width"
+    VertSizing="height"
+    Position="0 0"
+    Extent="1024 768"
+    MinExtent="8 8"
+    Visible="1"
+	HelpTag="0"
+	Image="@asset=Sandbox:blueGradient">
+	
+   <GuiTextCtrl
+      Name = "UserNameTxt"
+      text="NONAME"
+      canSaveDynamicFields="0"
+      isContainer="0"
+      Profile="GuiTextProfile"
+      HorizSizing="relative"
+      VertSizing="relative"
+      Position="430 120"
+      Extent="128 15"
+      MinExtent="8 2"
+      canSave="1"
+      Visible="1"
+      Active="0"
+      hovertime="1000"
+      toolTipProfile="GuiToolTipProfile"
+      maxLength="255"
+      truncate="0" />
+      
+	<GuiButtonCtrl
+		Profile="BlueButtonProfile"
+		Text="Change username"
+		ButtonType="PushButton"
+		command="Keyboard.push(ChangeUsernameDlg, ChangeUsernameEntry);"
+		canSaveDynamicFields="0"
+		isContainer="0"
+		HorizSizing="relative"
+		VertSizing="relative"
+		Position="400 150"
+		Extent="150 40"
+		MinExtent="8 2"
+		canSave="1"
+		Visible="1"
+		Active="1"
+		hovertime="1000"
+		groupNum="-1"
+		useMouseEvents="1" />
+		
+	<GuiButtonCtrl
+		Profile="BlueButtonProfile"
+		Text="Exit"
+		ButtonType="PushButton"
+		command="Canvas.popDialog(MainGameDlg);"
+		canSaveDynamicFields="0"
+		isContainer="0"
+		HorizSizing="relative"
+		VertSizing="relative"
+		Position="400 200"
+		Extent="150 40"
+		MinExtent="8 2"
+		canSave="1"
+		Visible="1"
+		Active="1"
+		hovertime="1000"
+		groupNum="-1"
+		useMouseEvents="1" />
+		
+</GuiSpriteCtrl>

+ 50 - 0
modules/KeyboardToy/1/main.cs

@@ -0,0 +1,50 @@
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to
+// deal in the Software without restriction, including without limitation the
+// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+// sell copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+// IN THE SOFTWARE.
+//-----------------------------------------------------------------------------
+
+function KeyboardToy::create( %this )
+{  
+    Sandbox.add( TamlRead("./MainGameDlg.gui.taml") );
+    Sandbox.add( TamlRead("./ChangeUsernameDlg.gui.taml") );
+    // Reset the toy.
+    KeyboardToy.reset();
+}
+
+
+//-----------------------------------------------------------------------------
+
+function KeyboardToy::destroy( %this )
+{
+   MainGameDlg.delete();
+   ChangeUsernameDlg.delete();
+}
+
+//-----------------------------------------------------------------------------
+
+function KeyboardToy::reset( %this )
+{
+    // Clear the scene.
+    SandboxScene.clear();
+    
+   Canvas.pushDialog(MainGameDlg);
+       
+}
+//-----------------------------------------------------------------------------

+ 10 - 0
modules/KeyboardToy/1/module.taml

@@ -0,0 +1,10 @@
+<ModuleDefinition
+	ModuleId="KeyboardToy"
+	VersionId="1"
+	Description="Display virtual keyboard."
+	Dependencies="Keyboard=1"
+	Type="toy"
+	ToyCategoryIndex="7"
+	ScriptFile="main.cs"
+	CreateFunction="create"
+	DestroyFunction="destroy"/>