Mercurial > wow > hansgar_and_franzok_assist
diff Libs/DF/button.lua @ 28:7523376ecaa3
- framework update.
| author | Tercioo |
|---|---|
| date | Fri, 18 Dec 2015 15:15:50 -0200 |
| parents | dbd417f413a8 |
| children | 5da06cb420d4 |
line wrap: on
line diff
--- a/Libs/DF/button.lua Fri Nov 20 10:36:43 2015 -0200 +++ b/Libs/DF/button.lua Fri Dec 18 15:15:50 2015 -0200 @@ -854,7 +854,10 @@ local x, y = GetCursorPosition() x = _math_floor (x) y = _math_floor (y) - if ((button.mouse_down+0.4 > GetTime() and (x == button.x and y == button.y)) or (x == button.x and y == button.y)) then + if ( + (x == button.x and y == button.y) or + (button.mouse_down+0.5 > GetTime() and button:IsMouseOver()) + ) then if (buttontype == "LeftButton") then button.MyObject.func (button, buttontype, button.MyObject.param1, button.MyObject.param2) else @@ -936,7 +939,8 @@ end if (name:find ("$parent")) then - name = name:gsub ("$parent", parent:GetName()) + local parentName = DF.GetParentName (parent) + name = name:gsub ("$parent", parentName) end local ButtonObject = {type = "button", dframework = true}
