obble / modui_classic

modui: for wow classic
45 stars 20 forks source link

UI Colour & Saved Variable issues #25

Closed russell-dunn closed 4 years ago

russell-dunn commented 4 years ago

I realise this is a work in progress, and for that I thank you. I get an entirely blank window when selecting ModUI Elements, and have no minimap icon.

Should I be expecting these? Or is it simply not ready yet? Thanks!

Starcheck commented 4 years ago

Hey,

the last fix regarding Beta Bugs was better but I still get some major errors. This is how it looks like.

WoWScrnShot_082919_152046

Last time you said I should run a command and let you know whats wrong. It gives me 27 LUA errors that I copy pasted for you:

https://pastebin.com/0AKTDzH1

thanks again!

obble commented 4 years ago

exciting bugs! looks like its an issue with saved variables not being saved correctly. with your client closed can you delete your WTF folder and restart the game? I realise this is a pain with the current queue Armageddon :(

let me know if the issues persist after this.

Starcheck commented 4 years ago

Thanks @obble

Indeed deleting the 2 savedVAriable files regarding modUi in WTF was solving all my issues! Im looking forward for your updated on adding new elements!

Amating work ty!

russell-dunn commented 4 years ago

What command do I need to run to get a dump of the LUA errors?

russell-dunn commented 4 years ago

Sadly deleting the WTF folder did not work for me, it's still not working.

Andoido1 commented 4 years ago

shring your UI scale

obble commented 4 years ago

/console scriptErrors 1 enables LUA errors in-game.

Can you try the following?

Close your client.

Navigate to: WTF/Account/string of numbers relating to account profile/your server name/your character name/SavedVariables/modui_classic.lua

Open this file up in a text editor and overwrite the text in it with the following:

https://gist.github.com/obble/b1e0309e65950f5f73d43032c77a0e00

(copy and paste the code in)

Then do the same with the modui_classic.lua.bak file in the same directory.

Reopen your client and let me know if that does anything for you?

obble commented 4 years ago

oh no i think i just found the problem, and its a stupid one

edit: there was a typo in the theme code which has now been fixed in the latest version. Can people with issues let me know if this fixes the problem?

Xaero252 commented 4 years ago

I did not relog to test - though it should not be needed; but the issue persists. The colors are being loaded from the savedvariables properly as the sliders reflect the correct position, just the theming itself doesn't seem to take

Xaero252 commented 4 years ago

Ah, I see you have some dependencies required. After installing the dependencies it seems to work now.

for the curious you need: LibClassicMobHealth-1.0 and LibClassicCasterino

Xaero252 commented 4 years ago

If those are intended to be required dependencies they should be added to the TOC imo

obble commented 4 years ago

thats weird, they're included as embeds in modui: https://github.com/obble/modui_classic/tree/master/libraries

do you not have these in your downloaded version?

Xaero252 commented 4 years ago

Actually just noticed that myself. I enabled lua errors and got errors about LibClassicMobHealth-1.0 and LibClassicCasterino, so I installed them and the errors are gone and it works. The libraries are in my downloaded copy... I grabbed the latest off git, actually I should also note that I had to grab the BagSort as well.

obble commented 4 years ago

Are you using other addons? If so, can you tell me if it works when toggling those off (including the independent versions of the libraries) and just leaving modui on quickly? Wondering if its an issue where something else is loading LibStub or CallbackHandler and that breaks my loading of libraries somehow.

obble commented 4 years ago

ive pushed an update that switches to loading the libraries in an XML file (the same way Tukui does).

i also deleted the .toc file that supported people forgetting to rename the directory from modui_classic-master to modui_classic on the offchance thats messing something up.

Xaero252 commented 4 years ago

I am - I just toggled everything off except modui; without updating to your latest commit - and everything works, which implies a conflict on my setup. I'll update this with what the conflict is when I find it

EDIT: I re-enabled each addon one at a time and the errors did not return. I even subsequently deleted the libraries from the AddOns folder and it still doesn't give me any errors. Interestingly, while colors do apply properly on Login for me now, on a /reload they do not. There is a difference in which event fires when using /reload vs initial login - but I cannot recall what it is. I know for login you get the PlayerEnteringWorld event, but I'm not sure you do for reload

Updating to current master now, as well.

obble commented 4 years ago

PLAYER_LOGIN fires once on reload and/or login, PLAYER_ENTERING_WORLD fires multiple times and then again on zone changes or anything with a load window, so i usually bind stuff to the former so that frames and stuff arent created multiple times initially.

skinning is bound to the ADDON_LOADED and VARIABLES_LOADED events to account for blizzard's own addons (ie the auction frame) that load after PLAYER_LOGIN fires and also to ensure we have our saved colours in that SVar table on hand. Its necessary that it loops through multiple times to catch new frames being created and colour everything uniformly.

i noticed a bug with the colours being updated incorrectly between buttons and textures when switching between the two colour wheels, and honestly after 20 minutes of grappling with the logic for it i'm going to admit defeat and just use the single theme colour for both - one less option to worry about in the menu. this might be related to your issue - an update has been pushed for this now too, sigh.

sorry to anyone who wanted their buttons in pink but their bar in grey.

Xaero252 commented 4 years ago

Eventually I'll poke at the logic, too. It's been a while since I did any addon coding so I'm a bit rusty with lua and wow bindings - but another set of eyes is never a bad thing. I actually have a fork of your UI for BC, privately. A bug I fixed there is present here, but I'll just create a pull request when I get around to it (it's really nitpicky anyways)

obble commented 4 years ago

cool, nitpicky is good!

obble commented 4 years ago

Closing this for now seeing as reports have dwindled on it happening