Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.16 KB | None | 0 0
  1. class com.rockstargames.gtav.pauseMenu.pauseComponents.MP_PLAYER_CARD extends com.rockstargames.gtav.pauseMenu.pauseComponents.PauseMenuComponentBase
  2. {
  3. var DESC_TYPE_TXT = 0;
  4. var DESC_TYPE_SC = 1;
  5. var DESC_TYPE_INV_SENT = 2;
  6. function MP_PLAYER_CARD()
  7. {
  8. super();
  9. _global.gfxExtensions = true;
  10. }
  11. function DISPLAY_VIEW()
  12. {
  13. }
  14. function INITIALISE(mc, collapse)
  15. {
  16. if(mc != undefined)
  17. {
  18. super.INITIALISE(mc);
  19. }
  20. else
  21. {
  22. this.CONTENT = this;
  23. }
  24. this.menuList = [];
  25. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.headerBGMC,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_PAUSE_BG);
  26. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.item0TF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  27. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.item1TF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  28. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.item2TF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  29. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.vehiclePanelMC.titleTF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  30. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.vehiclePanelMC.vehicleMC1,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  31. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.vehiclePanelMC.vehicleMC2,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  32. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.vehiclePanelMC.vehicleMC3,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  33. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.vehiclePanelMC.vehicleMC4,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  34. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.vehiclePanelMC.bgMC,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_PAUSE_BG);
  35. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.crewInfoMC.crewNameTF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  36. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.crewInfoMC.rankNameTF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  37. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.crewInfoMC.membersIconMC,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  38. com.rockstargames.ui.utils.Colour.ApplyHudColourToTF(this.CONTENT.crewInfoMC.membersTF,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_WHITE);
  39. if(collapse)
  40. {
  41. this.statID = "playerComparisonItem";
  42. }
  43. else
  44. {
  45. this.statID = "statItem";
  46. com.rockstargames.ui.utils.Localisation.setTextWithTranslation(this.CONTENT.vehiclePanelMC.titleTF,"VEH_ACCESS",com.rockstargames.ui.game.GameInterface.GENERIC_TYPE,false);
  47. }
  48. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.descMC.bgMC,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_PAUSE_BG);
  49. this.CONTENT.descMC._visible = false;
  50. this.CONTENT.rankNumTF.textAutoSize = "shrink";
  51. this.CONTENT.crewInfoMC.crewNameTF.textAutoSize = "shrink";
  52. this.CONTENT.crewInfoMC.rankNameTF.textAutoSize = "shrink";
  53. this.CONTENT.crewInfoMC.crewRankTF.textAutoSize = "shrink";
  54. this.CONTENT.crewInfoMC._visible = false;
  55. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.crewInfoMC.bgMC,com.rockstargames.ui.utils.HudColour.HUD_COLOUR_PAUSE_BG);
  56. }
  57. function SET_TITLE(title)
  58. {
  59. this.CONTENT.titleTF.text = title;
  60. this.playerColourEnum = arguments[2];
  61. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.titleBGMC,this.playerColourEnum);
  62. if(arguments[1] == "" || arguments[1] == undefined)
  63. {
  64. this.CONTENT.crewInfoMC._visible = false;
  65. this.CONTENT.crewTagMC._visible = false;
  66. }
  67. else
  68. {
  69. this.CONTENT.crewTagMC.UNPACK_CREW_TAG(arguments[5]);
  70. this.CONTENT.crewTagMC._x = this.CONTENT.titleTF._x + this.CONTENT.titleTF.textWidth + 10;
  71. this.CONTENT.crewTagMC._visible = true;
  72. this.CONTENT.crewInfoMC.crewTagMC.UNPACK_CREW_TAG(arguments[5]);
  73. var _loc5_ = arguments[6];
  74. var _loc3_ = arguments[7];
  75. if(_loc5_ && _loc3_)
  76. {
  77. this.CONTENT.crewInfoMC.crewNameTF.text = arguments[1];
  78. this.CONTENT.crewInfoMC.rankNameTF.text = arguments[4];
  79. this.CONTENT.crewInfoMC.crewRankTF.text = arguments[8] == undefined?"":arguments[8];
  80. if(!this.crewEmblemMC)
  81. {
  82. this.crewEmblemMC = this.CONTENT.crewInfoMC.attachMovie("GenericImageLoader","playerCardCrewEmblemMC",this.CONTENT.crewInfoMC.getNextHighestDepth(),{_x:10,_y:9});
  83. }
  84. if(this.crewEmblemMC.isLoaded)
  85. {
  86. this.crewEmblemMC.removeTxdRef();
  87. }
  88. this.crewEmblemMC.init("PAUSE_MENU_SP_CONTENT",_loc5_,_loc3_,61,61);
  89. var _loc7_ = 3;
  90. var _loc4_ = String(this.crewEmblemMC).split(".");
  91. var _loc8_ = _loc4_.slice(_loc4_.length - _loc7_).join(".");
  92. this.crewEmblemMC.addTxdRef(_loc8_);
  93. if(arguments[9] != undefined)
  94. {
  95. com.rockstargames.ui.utils.Colour.Colourise(this.CONTENT.crewInfoMC.rankBGMC,arguments[9],arguments[10],arguments[11],100);
  96. this.CONTENT.crewInfoMC._visible = true;
  97. }
  98. this.CONTENT.crewInfoMC.membersTF.text = !arguments[12]?"":arguments[12];
  99. this.CONTENT.crewInfoMC.membersIconMC._x = 267 - this.CONTENT.crewInfoMC.membersTF.textWidth;
  100. }
  101. }
  102. var _loc6_ = com.rockstargames.gtav.constants.MPIconLabels.lookUp(arguments[3])[1];
  103. this.CONTENT.rankEmblemMC.gotoAndStop(_loc6_);
  104. this.CONTENT.titleValTF.text = !arguments[13]?"":arguments[13];
  105. if(this.CONTENT.crewInfoMC._visible)
  106. {
  107. this.CONTENT.descMC._visible = false;
  108. }
  109. }
  110. function SET_DATA_SLOT(_viewIndex, _slotIndex)
  111. {
  112. if(_viewIndex == 0)
  113. {
  114. this.CONTENT.vehiclePanelMC.vehicleMC1._alpha = !arguments[5]?30:100;
  115. this.CONTENT.vehiclePanelMC.vehicleMC2._alpha = !arguments[6]?30:100;
  116. this.CONTENT.vehiclePanelMC.vehicleMC3._alpha = !arguments[7]?30:100;
  117. this.CONTENT.vehiclePanelMC.vehicleMC4._alpha = !arguments[8]?30:100;
  118. var _loc11_ = arguments[9];
  119. this.CONTENT.rankNumTF.text = _loc11_;
  120. com.rockstargames.ui.utils.Colour.ApplyHudColour(this.CONTENT.rankEmblemMC,this.playerColourEnum);
  121. var _loc9_ = arguments.length;
  122. var _loc3_ = 10;
  123. var _loc4_ = 0;
  124. while(_loc3_ < _loc9_)
  125. {
  126. var _loc5_ = this.CONTENT["item" + _loc4_ + "TF"];
  127. _loc5_.text = arguments[_loc3_] == undefined?"":arguments[_loc3_];
  128. var _loc6_ = arguments[_loc3_ + 1];
  129. var _loc7_ = this.CONTENT["icon" + _loc4_ + "MC"];
  130. _loc7_.gotoAndStop(com.rockstargames.gtav.constants.MPIconLabels.lookUp(_loc6_)[1]);
  131. if(_loc6_ != com.rockstargames.gtav.constants.MPIconLabels.EMPTY[0])
  132. {
  133. _loc5_._x = 82;
  134. com.rockstargames.ui.utils.Colour.ApplyHudColour(_loc7_,arguments[_loc3_ + 2]);
  135. }
  136. _loc3_ = _loc3_ + 3;
  137. _loc4_ = _loc4_ + 1;
  138. }
  139. }
  140. else
  141. {
  142. var _loc10_ = _viewIndex - 1;
  143. var _loc8_ = undefined;
  144. if(!this.menuList[_loc10_])
  145. {
  146. _loc8_ = (com.rockstargames.gtav.pauseMenu.pauseMenuItems.multiplayer.PauseMPMenuPlayerCardItem)this.CONTENT.attachMovie(this.statID,this.statID + _loc10_ + "MC",_loc10_);
  147. _loc8_._y = this.CONTENT.headerBGMC._y + this.CONTENT.headerBGMC._height + 2 + _loc10_ * Math.round(_loc8_._height);
  148. this.menuList[_loc10_] = _loc8_;
  149. }
  150. else
  151. {
  152. _loc8_ = this.menuList[_loc10_];
  153. }
  154. _loc8_._visible = true;
  155. _loc8_.setColour(this.playerColourEnum);
  156. _loc8_.init(arguments);
  157. this.CONTENT.vehiclePanelMC._y = _loc8_._y + Math.round(_loc8_._height);
  158. this.CONTENT.crewInfoMC._y = this.CONTENT.vehiclePanelMC._y + this.CONTENT.vehiclePanelMC._height + 2;
  159. this.CONTENT.descMC._y = this.CONTENT.crewInfoMC._y;
  160. }
  161. }
  162. function SET_DESCRIPTION(descStr, descType, crewTagStr)
  163. {
  164. if(descStr != "")
  165. {
  166. if(this.btnLayer)
  167. {
  168. this.btnLayer.removeMovieClip();
  169. }
  170. this.btnLayer = this.CONTENT.descMC.createEmptyMovieClip("btnLayer",1000);
  171. var _loc3_ = new com.rockstargames.ui.utils.Text();
  172. _loc3_.setTextWithIcons(descStr,this.btnLayer,this.CONTENT.descMC.descTF,0,13,4,false);
  173. this.CONTENT.descMC.crewUpIconMC._visible = descType == this.DESC_TYPE_SC;
  174. this.CONTENT.descMC.crewTagMC._visible = descType == this.DESC_TYPE_INV_SENT;
  175. if(descType == this.DESC_TYPE_TXT)
  176. {
  177. this.CONTENT.descMC.descTF._x = 5;
  178. this.CONTENT.descMC.descTF._width = 278;
  179. }
  180. else
  181. {
  182. this.CONTENT.descMC.descTF._x = 54;
  183. this.CONTENT.descMC.descTF._width = 225;
  184. if(descType == this.DESC_TYPE_INV_SENT)
  185. {
  186. this.CONTENT.descMC.crewTagMC.UNPACK_CREW_TAG(crewTagStr);
  187. }
  188. }
  189. this.CONTENT.descMC.bgMC._height = Math.min(this.CONTENT.descMC.descTF._y + this.CONTENT.descMC.descTF.textHeight + 10,79);
  190. this.CONTENT.descMC._visible = !this.CONTENT.crewInfoMC._visible;
  191. }
  192. else
  193. {
  194. this.CONTENT.descMC._visible = false;
  195. }
  196. }
  197. function SET_DATA_SLOT_EMPTY()
  198. {
  199. var _loc2_ = 0;
  200. while(_loc2_ < this.menuList.length)
  201. {
  202. (MovieClip)this.menuList[_loc2_].removeMovieClip();
  203. this.menuList[_loc2_] = null;
  204. _loc2_ = _loc2_ + 1;
  205. }
  206. if(this.CONTENT.descMC)
  207. {
  208. this.CONTENT.descMC._visible = false;
  209. }
  210. this.CONTENT.crewInfoMC._visible = false;
  211. }
  212. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement