comparison Libs/DF/slider.lua @ 58:0682d738499b v8.0.1.058

- 8.0.1 Update.
author Tercio
date Fri, 20 Jul 2018 19:04:12 -0300
parents 7c0f819a85c6
children
comparison
equal deleted inserted replaced
57:b1c62eed8999 58:0682d738499b
336 336
337 ------------------------------------------------------------------------------------------------------------ 337 ------------------------------------------------------------------------------------------------------------
338 --> scripts 338 --> scripts
339 339
340 local OnEnter = function (slider) 340 local OnEnter = function (slider)
341
342 if (_rawget (slider.MyObject, "lockdown")) then 341 if (_rawget (slider.MyObject, "lockdown")) then
343 return 342 return
344 end 343 end
345 344
346 DetailsFrameworkSliderButtons1:ShowMe (slider) 345 DetailsFrameworkSliderButtons1:ShowMe (slider)
360 if (slider.MyObject.have_tooltip and slider.MyObject.have_tooltip ~= "Right Click to Type the Value") then 359 if (slider.MyObject.have_tooltip and slider.MyObject.have_tooltip ~= "Right Click to Type the Value") then
361 GameCooltip2:Preset (2) 360 GameCooltip2:Preset (2)
362 GameCooltip2:AddLine (slider.MyObject.have_tooltip) 361 GameCooltip2:AddLine (slider.MyObject.have_tooltip)
363 GameCooltip2:ShowCooltip (slider, "tooltip") 362 GameCooltip2:ShowCooltip (slider, "tooltip")
364 else 363 else
365 GameCooltip2:Preset (1) 364 GameCooltip2:Preset (2)
366 GameCooltip2:AddLine ("Right Click to Type the Value") 365 GameCooltip2:AddLine ("Right Click to Type the Value", "", 1, "", "", 10)
367 GameCooltip2:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 16, 16, 0.015625, 0.15671875, 0.640625, 0.798828125) 366 GameCooltip2:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 16, 16, 0.015625, 0.15671875, 0.640625, 0.798828125)
368 GameCooltip2:ShowCooltip (slider, "tooltip") 367 GameCooltip2:ShowCooltip (slider, "tooltip")
369 end 368 end
370 end 369 end
371 370
394 end 393 end
395 394
396 395
397 local f = CreateFrame ("frame", "DetailsFrameworkSliderButtons1", UIParent) 396 local f = CreateFrame ("frame", "DetailsFrameworkSliderButtons1", UIParent)
398 f:Hide() 397 f:Hide()
399 --f:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], tile = true, tileSize = 5})
400 f:SetHeight (18) 398 f:SetHeight (18)
401 399
402 local t = 0 400 local t = 0
403 f.is_going_hide = false 401 f.is_going_hide = false
404 local going_hide = function (self, elapsed) 402 local going_hide = function (self, elapsed)
411 end 409 end
412 410
413 function f:ShowMe (host) 411 function f:ShowMe (host)
414 f:SetPoint ("bottomleft", host, "topleft", -3, -5) 412 f:SetPoint ("bottomleft", host, "topleft", -3, -5)
415 f:SetPoint ("bottomright", host, "topright", 3, -5) 413 f:SetPoint ("bottomright", host, "topright", 3, -5)
416 f:SetFrameStrata (host:GetFrameStrata()) 414 --f:SetFrameStrata (host:GetFrameStrata())
417 f:SetFrameLevel (host:GetFrameLevel()) 415 f:SetFrameStrata ("FULLSCREEN")
416 f:SetFrameLevel (host:GetFrameLevel() + 1000)
418 f:Show() 417 f:Show()
419 if (f.is_going_hide) then 418 if (f.is_going_hide) then
420 f:SetScript ("OnUpdate", nil) 419 f:SetScript ("OnUpdate", nil)
421 f.is_going_hide = false 420 f.is_going_hide = false
422 end 421 end
1144 SliderObject.slider:SetValue (defaultv) 1143 SliderObject.slider:SetValue (defaultv)
1145 SliderObject.ivalue = defaultv 1144 SliderObject.ivalue = defaultv
1146 1145
1147 SliderObject.slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8}) 1146 SliderObject.slider:SetBackdrop ({edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", edgeSize = 8})
1148 SliderObject.slider:SetBackdropColor (0.9, 0.7, 0.7, 1.0) 1147 SliderObject.slider:SetBackdropColor (0.9, 0.7, 0.7, 1.0)
1149 --SliderObject.slider:SetBackdropColor (0, 0, 0, 1)
1150 1148
1151 SliderObject.thumb = SliderObject.slider:CreateTexture (nil, "artwork") 1149 SliderObject.thumb = SliderObject.slider:CreateTexture (nil, "artwork")
1152 SliderObject.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob") 1150 SliderObject.thumb:SetTexture ("Interface\\Buttons\\UI-ScrollBar-Knob")
1153 SliderObject.thumb:SetSize (30+(h*0.2), h*1.2) 1151 SliderObject.thumb:SetSize (30+(h*0.2), h*1.2)
1154 SliderObject.thumb:SetAlpha (0.7) 1152 SliderObject.thumb:SetAlpha (0.7)