slider variable saving and using
Lua Code:
how would i save the slider value after changing it (so its that value everytime i run wow) and how would i find the value of the slider such as "slider.Value" etc. |
1. The getglobal function was deprecated years ago and should never be used by anyone for any reason. Use _G[value] instead of getglobal(value).
2. You use the GetValue method on your slider to get the current value: Code:
local value = slider:GetValue() Code:
## SavedVariables: MyAddonSetting Code:
MyAddon.panel:RegisterEvent("PLAYER_LOGIN") Code:
## SavedVariables: MyAddonSliderValue Code:
slider:SetScript("OnValueChanged", function(self) Code:
## SavedVariables: MyAddonSettings Code:
MyAddon.panel:RegisterEvent("PLAYER_LOGIN") Code:
MyAddon.panel.refresh = function() |
Perfect thank you! =D
|
All times are GMT -6. The time now is 03:31 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI