Advertisement
Noneatme

Untitled

Apr 22nd, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.97 KB | None | 0 0
  1. function CG.MessageBox:RenderMessage()
  2.     dxDrawText(self.title, 639, 346, 976, 377, tocolor(0, 0, 0, 255), 0.3, fontManager:GetDTFont(), "center", "center", false, false, true, false, false)
  3.     dxDrawImage(640, 346, 336, 32, "files/images/aero-title.png", 0, 0, 0, tocolor(1, 251, 219, 120), true)
  4.     local width, height;
  5.     if(self.disabled ~= true) then
  6.         width, height = interpolateBetween(336, 0, 0, 336, 204, 0, (getTickCount()-self.startTick)/500, self.easingFunc);
  7.     else
  8.         width, height = interpolateBetween(336, 204, 0, 336, 0, 0, (getTickCount()-self.startTick)/500, self.easingFunc);
  9.    
  10.     end
  11.     dxDrawRectangle(640, 377, width, height, tocolor(0, 0, 0, 200), true)
  12.     if(getTickCount()-self.startTick > 500) then
  13.         if(self.double) then
  14.             dxDrawText(self.message, 642, 378, 974, 529, tocolor(0, 0, 0, 255), 0.3, fontManager:GetDTFont(), "center", "center", false, true, true, false, false)
  15.         end
  16.         dxDrawText(self.message, 640, 376, 974, 529, self.msgcolor, 0.3, fontManager:GetDTFont(), "center", "center", false, true, true, false, false)
  17.    
  18.         local a = 120
  19.         if(self.hover) then
  20.             a = 200;
  21.         end
  22.         dxDrawRectangle(740, 539, 136, 33, tocolor(0, 0, 0, a), true)
  23.         dxDrawText(self.option1, 740, 538, 875, 572, tocolor(255, 255, 255, 255), 0.3, fontManager:GetDTFont(), "center", "center", false, false, true, false, false)
  24.         showCursor(true);
  25.     end
  26. end
  27.  
  28. --- --- --
  29.  
  30.  
  31. _dxDrawImage = dxDrawImage
  32.  
  33. function dxDrawImage(x, y, w, h, ...)
  34.     x = x/aesx*sx
  35.     y = y/aesy*sy
  36.     w = w/aesx*sx
  37.     h = h/aesy*sy
  38.     return _dxDrawImage(x, y, w, h, ...)
  39. end
  40.  
  41. _dxDrawText = dxDrawText
  42.  
  43. function dxDrawText(text, x, y, w, h, color, size, ...)
  44.     x = x/aesx*sx
  45.     y = y/aesy*sy
  46.     w = w/aesx*sx
  47.     h = h/aesy*sy
  48.     size = size/(aesx+aesy)*(sx+sy)
  49.     return _dxDrawText(text, x, y, w, h, color, size, ...)
  50. end
  51.  
  52. _dxDrawRectangle = dxDrawRectangle
  53.  
  54. function dxDrawRectangle(x, y, w, h, ...)
  55.     x = x/aesx*sx
  56.     y = y/aesy*sy
  57.     w = w/aesx*sx
  58.     h = h/aesy*sy
  59.     return _dxDrawRectangle(x, y, w, h, ...)
  60. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement