Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function AddPanel()
  2. {
  3. nDepthOffset++;
  4. var _loc2_ = Panel.Notice.DeathText1.attachMovie("death-text","NoticePanel" + nDepthOffset,this.getNextHighestDepth() + nDepthOffset);
  5. _loc2_._visible = false;
  6. return _loc2_;
  7. }
  8. function SetPanelText(notice, text, isVictim, isKiller)
  9. {
  10. notice._visible = false;
  11. notice._y = 0;
  12. notice.TextPanel.Text.htmlText = text;
  13. notice.PanelAttacker._visible = isKiller;
  14. notice.PanelVictim._visible = isVictim;
  15. notice.IDTextBG._visible = !isKiller;
  16. return notice._height;
  17. }
  18. function RemovePanel(movieClip)
  19. {
  20. Panel.Notice.DeathText1[movieClip._name].removeMovieClip();
  21. }
  22. function UpdateWidth(movieClip)
  23. {
  24. movieClip.PanelAttacker.KillerHighlight._width = movieClip.TextPanel.Text.textWidth + 20;
  25. movieClip.PanelAttacker.KillerHighlight._x = movieClip.TextPanel._x + (movieClip.TextPanel._width - movieClip.PanelAttacker.KillerHighlight._width) + 10;
  26. movieClip.PanelVictim.VictimHighlight._width = movieClip.PanelAttacker.KillerHighlight._width;
  27. movieClip.PanelVictim.VictimHighlight._x = movieClip.PanelAttacker.KillerHighlight._x;
  28. movieClip.IDTextBG._width = movieClip.PanelVictim.VictimHighlight._width + 15;
  29. movieClip.IDTextBG._x = 15;
  30. }
  31. function onLoaded()
  32. {
  33. nScaledHeight = Panel.Notice.DeathText1._height * _global.resizeManager.ScalingFactors[Lib.ResizeManager.SCALE_BIGGEST] * _global.GameInterface.GetConvarNumber("hud_scaling");
  34. nDepthOffset = 0;
  35. gameAPI.SetConfig(nNumberOfNotices * Panel.StatusPanel.Notice._height,nScrollInTime,nFadeOutTime,nNoticeLifetime,strCTColor,strTColor,nLocalPlayerLifetimeMod);
  36. gameAPI.OnReady();
  37. Panel.Notice.DeathText1.PanelAttacker._visible = false;
  38. Panel.Notice.DeathText1.PanelVictim._visible = false;
  39. Panel.Notice.DeathText1.IDTextBG._visible = false;
  40. }
  41. function onUnload(mc)
  42. {
  43. _global.DeathNotificationMovie = null;
  44. _global.resizeManager.RemoveListener(this);
  45. return true;
  46. }
  47. function onResize(rm)
  48. {
  49. rm.ResetPositionByPixel(Panel,Lib.ResizeManager.SCALE_BIGGEST,Lib.ResizeManager.REFERENCE_SAFE_RIGHT,-10,Lib.ResizeManager.ALIGN_LEFT,Lib.ResizeManager.REFERENCE_SAFE_TOP,25,Lib.ResizeManager.ALIGN_TOP);
  50. }
  51. _global.DeathNotificationMovie = this;
  52. var nNumberOfNotices = 7;
  53. var nScrollInTime = 0.01;
  54. var nFadeOutTime = 1;
  55. var nNoticeLifetime = 5;
  56. var strCTColor = "#6f9ce6";
  57. var strTColor = "#eabe54";
  58. var nLocalPlayerLifetimeMod = 1.5;
  59. var nDepthOffset;
  60. _global.resizeManager.AddListener(this);
  61. stop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement