Mercurial > wow > hansgar_and_franzok_assist
comparison Libs/DF/button.lua @ 29:5da06cb420d4
- framework update.
| author | Tercioo |
|---|---|
| date | Sat, 02 Jan 2016 13:33:05 -0200 |
| parents | 7523376ecaa3 |
| children | 7944c081e5b4 |
comparison
equal
deleted
inserted
replaced
| 28:7523376ecaa3 | 29:5da06cb420d4 |
|---|---|
| 383 return self.button:SetFrameLevel (framelevel) | 383 return self.button:SetFrameLevel (framelevel) |
| 384 end | 384 end |
| 385 end | 385 end |
| 386 | 386 |
| 387 -- icon | 387 -- icon |
| 388 function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance, leftpadding) | 388 function ButtonMetaFunctions:SetIcon (texture, width, height, layout, texcoord, overlay, textdistance, leftpadding, textheight) |
| 389 if (not self.icon) then | 389 if (not self.icon) then |
| 390 self.icon = self:CreateTexture (nil, "artwork") | 390 self.icon = self:CreateTexture (nil, "artwork") |
| 391 self.icon:SetSize (self.height*0.8, self.height*0.8) | 391 self.icon:SetSize (self.height*0.8, self.height*0.8) |
| 392 self.icon:SetPoint ("left", self.widget, "left", 4 + (leftpadding or 0), 0) | 392 self.icon:SetPoint ("left", self.widget, "left", 4 + (leftpadding or 0), 0) |
| 393 self.icon.leftpadding = leftpadding or 0 | 393 self.icon.leftpadding = leftpadding or 0 |
| 394 self.widget.text:ClearAllPoints() | 394 self.widget.text:ClearAllPoints() |
| 395 self.widget.text:SetPoint ("left", self.icon, "right", textdistance or 2, 0) | 395 self.widget.text:SetPoint ("left", self.icon, "right", textdistance or 2, 0 + (textheight or 0)) |
| 396 end | 396 end |
| 397 | 397 |
| 398 self.icon:SetTexture (texture) | 398 self.icon:SetTexture (texture) |
| 399 self.icon:SetSize (width or self.height*0.8, height or self.height*0.8) | 399 self.icon:SetSize (width or self.height*0.8, height or self.height*0.8) |
| 400 self.icon:SetDrawLayer (layout or "artwork") | 400 self.icon:SetDrawLayer (layout or "artwork") |
| 930 if (not name) then | 930 if (not name) then |
| 931 name = "DetailsFrameworkButtonNumber" .. DF.ButtonCounter | 931 name = "DetailsFrameworkButtonNumber" .. DF.ButtonCounter |
| 932 DF.ButtonCounter = DF.ButtonCounter + 1 | 932 DF.ButtonCounter = DF.ButtonCounter + 1 |
| 933 | 933 |
| 934 elseif (not parent) then | 934 elseif (not parent) then |
| 935 return nil | 935 return error ("Details! FrameWork: parent not found.", 2) |
| 936 end | 936 end |
| 937 if (not container) then | 937 if (not container) then |
| 938 container = parent | 938 container = parent |
| 939 end | 939 end |
| 940 | 940 |
