Gui layer.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. private var textAreaString = "ANIMATIONS";
  2. private var Xpos = 30;
  3. private var Ypos = 50;
  4. private var Ypomak = 20;
  5. private var Xsirina = 130;
  6. private var Ysirina = 30;
  7. private var GUIvisible = 1;
  8. private var bla = 0;
  9. private var GUIstat = "Hide GUI";
  10. var rotateTex : Texture2D;
  11. var heightTex : Texture2D;
  12. var zoomTex : Texture2D;
  13. function OnGUI () {
  14. Ypos = 50;
  15. if (GUIvisible > 0){
  16. //textAreaString = GUI.TextArea (Rect (18, 25, 150, 300), textAreaString);
  17. GUI.Box (Rect (18,25,150,300), textAreaString);
  18. GUI.Label (Rect (Xpos, Ypos, Xsirina, Ysirina), "0 - Backwalk");
  19. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "1 - Walk");
  20. Ypos = Ypos + Ypomak;
  21. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "2 - Left sidewalk ");
  22. Ypos = Ypos + Ypomak;
  23. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "3 - Right sidewalk");
  24. Ypos = Ypos + Ypomak;
  25. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "4 - Sneak ");
  26. Ypos = Ypos + Ypomak;
  27. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "5 - Run ");
  28. Ypos = Ypos + Ypomak;
  29. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "6 - Jump ");
  30. Ypos = Ypos + Ypomak;
  31. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "7 - Ho Ho Ho ");
  32. Ypos = Ypos + Ypomak;
  33. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "8 - Give ");
  34. Ypos = Ypos + Ypomak;
  35. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "9 - Use ");
  36. Ypos = Ypos + Ypomak;
  37. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "I - Idle ");
  38. Ypos = Ypos + Ypomak;
  39. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "S - Stand still ");
  40. Ypos = Ypos + Ypomak;
  41. GUI.Label (Rect (Xpos, Ypos + Ypomak, Xsirina, Ysirina), "T - T pose ");
  42. GUI.Label (Rect (Screen.width - 120,20,100,100), rotateTex);
  43. GUI.Label (Rect (Screen.width - 120,140,100,100), heightTex);
  44. GUI.Label (Rect (Screen.width - 120,260,100,100), zoomTex);
  45. }
  46. if (GUI.Button (Rect (20,Screen.height - 50,80,30), GUIstat)) {
  47. if (GUIvisible == 0) {
  48. GUIvisible = 1;
  49. GUIstat = "Hide GUI"; }
  50. else {
  51. GUIvisible = 0;
  52. GUIstat = "Show GUI";
  53. }
  54. }
  55. }