Mercurial > wow > hansgar_and_franzok_assist
comparison Libs/DF/textentry.lua @ 29:5da06cb420d4
- framework update.
| author | Tercioo |
|---|---|
| date | Sat, 02 Jan 2016 13:33:05 -0200 |
| parents | dbd417f413a8 |
| children | 7944c081e5b4 |
comparison
equal
deleted
inserted
replaced
| 28:7523376ecaa3 | 29:5da06cb420d4 |
|---|---|
| 179 self.label:ClearAllPoints() | 179 self.label:ClearAllPoints() |
| 180 self.editbox:ClearAllPoints() | 180 self.editbox:ClearAllPoints() |
| 181 self.editbox:SetPoint (MyAnchor, SnapTo, HisAnchor, x, y) | 181 self.editbox:SetPoint (MyAnchor, SnapTo, HisAnchor, x, y) |
| 182 end | 182 end |
| 183 | 183 |
| 184 end | |
| 185 | |
| 186 function TextEntryMetaFunctions:SetText (text) | |
| 187 self.editbox:SetText (text) | |
| 188 end | |
| 189 function TextEntryMetaFunctions:GetText() | |
| 190 return self.editbox:GetText() | |
| 184 end | 191 end |
| 185 | 192 |
| 186 --> frame levels | 193 --> frame levels |
| 187 function TextEntryMetaFunctions:GetFrameLevel() | 194 function TextEntryMetaFunctions:GetFrameLevel() |
| 188 return self.editbox:GetFrameLevel() | 195 return self.editbox:GetFrameLevel() |
| 468 | 475 |
| 469 ------------------------------------------------------------------------------------------------------------ | 476 ------------------------------------------------------------------------------------------------------------ |
| 470 | 477 |
| 471 function TextEntryMetaFunctions:SetTemplate (template) | 478 function TextEntryMetaFunctions:SetTemplate (template) |
| 472 if (template.width) then | 479 if (template.width) then |
| 473 self:SetWidth (template.width) | 480 self.editbox:SetWidth (template.width) |
| 474 end | 481 end |
| 475 if (template.height) then | 482 if (template.height) then |
| 476 self:SetHeight (template.height) | 483 self.editbox:SetHeight (template.height) |
| 477 end | 484 end |
| 478 | 485 |
| 479 if (template.backdrop) then | 486 if (template.backdrop) then |
| 480 self:SetBackdrop (template.backdrop) | 487 self.editbox:SetBackdrop (template.backdrop) |
| 481 end | 488 end |
| 482 if (template.backdropcolor) then | 489 if (template.backdropcolor) then |
| 483 local r, g, b, a = DF:ParseColors (template.backdropcolor) | 490 local r, g, b, a = DF:ParseColors (template.backdropcolor) |
| 484 self:SetBackdropColor (r, g, b, a) | 491 self.editbox:SetBackdropColor (r, g, b, a) |
| 485 self.onleave_backdrop = {r, g, b, a} | 492 self.onleave_backdrop = {r, g, b, a} |
| 486 end | 493 end |
| 487 if (template.backdropbordercolor) then | 494 if (template.backdropbordercolor) then |
| 488 local r, g, b, a = DF:ParseColors (template.backdropbordercolor) | 495 local r, g, b, a = DF:ParseColors (template.backdropbordercolor) |
| 489 self:SetBackdropBorderColor (r, g, b, a) | 496 self.editbox:SetBackdropBorderColor (r, g, b, a) |
| 490 self.editbox.current_bordercolor[1] = r | 497 self.editbox.current_bordercolor[1] = r |
| 491 self.editbox.current_bordercolor[2] = g | 498 self.editbox.current_bordercolor[2] = g |
| 492 self.editbox.current_bordercolor[3] = b | 499 self.editbox.current_bordercolor[3] = b |
| 493 self.editbox.current_bordercolor[4] = a | 500 self.editbox.current_bordercolor[4] = a |
| 494 self.onleave_backdrop_border_color = {r, g, b, a} | 501 self.onleave_backdrop_border_color = {r, g, b, a} |
| 507 if (not name) then | 514 if (not name) then |
| 508 name = "DetailsFrameworkTextEntryNumber" .. DF.TextEntryCounter | 515 name = "DetailsFrameworkTextEntryNumber" .. DF.TextEntryCounter |
| 509 DF.TextEntryCounter = DF.TextEntryCounter + 1 | 516 DF.TextEntryCounter = DF.TextEntryCounter + 1 |
| 510 | 517 |
| 511 elseif (not parent) then | 518 elseif (not parent) then |
| 512 return nil | 519 return error ("Details! FrameWork: parent not found.", 2) |
| 513 end | 520 end |
| 514 | 521 |
| 515 if (not container) then | 522 if (not container) then |
| 516 container = parent | 523 container = parent |
| 517 end | 524 end |
| 518 | 525 |
| 519 if (name:find ("$parent")) then | 526 if (name:find ("$parent")) then |
| 520 name = name:gsub ("$parent", parent:GetName()) | 527 local parentName = DF.GetParentName (parent) |
| 528 name = name:gsub ("$parent", parentName) | |
| 521 end | 529 end |
| 522 | 530 |
| 523 local TextEntryObject = {type = "textentry", dframework = true} | 531 local TextEntryObject = {type = "textentry", dframework = true} |
| 524 | 532 |
| 525 if (member) then | 533 if (member) then |
| 665 end | 673 end |
| 666 | 674 |
| 667 function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent) | 675 function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent) |
| 668 | 676 |
| 669 if (name:find ("$parent")) then | 677 if (name:find ("$parent")) then |
| 670 name = name:gsub ("$parent", parent:GetName()) | 678 local parentName = DF.GetParentName (parent) |
| 679 name = name:gsub ("$parent", parentName) | |
| 671 end | 680 end |
| 672 | 681 |
| 673 local borderframe = CreateFrame ("Frame", name, parent) | 682 local borderframe = CreateFrame ("Frame", name, parent) |
| 674 borderframe:SetSize (w, h) | 683 borderframe:SetSize (w, h) |
| 675 | 684 |
