Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add widget selector/toggler #6

Open
gajop opened this issue Dec 17, 2015 · 7 comments

Comments

@gajop
Copy link
Member

commented Dec 17, 2015

We don't seem to have a widget handler: something to enable/disable widgets.
I think there were with the existing ones as we're using a new widget handler, but it should still be investigated.

@silentwings

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2016

To fix this, simply remove lockluaui.txt from /GameData. Then the selector from base content is accessible using f11, as normal.

The effect of lockluaui.txt should be to load the games own widgetHandler. It shouldn't be present, in this case, because the SkeletonGame does not include it's own widget handler.

I would have expected that including lockluaui.txt without a games own widgetHandler would break all luaui, but it doesn't seem too. So I have no idea what's actually going on with it there. And removing lockluaui.txt seems to break chonsole. Conclusion: I think there is some horrible hack being relied on here, and that hack has the side effect of disabling the widget selector.

@FLOZi

This comment has been minimized.

Copy link

commented Jan 8, 2016

isn't lockluaui.txt required to get Chili to work?

@gajop

This comment has been minimized.

Copy link
Member Author

commented Jan 12, 2016

Whats up with some of these emails (quote below) not appearing in the
Github issue? Different account?

Anyway I always thought lockluaui.txt was needed for Chili. I distinctly
remember it not working without, when I first tried Chili years ago. No
idea what it does exactly.
"It's not.

(but it is related, since that file controls some of the extent to which
the games prefers its own lua files over basecontents).
"

It's not.

(but it is related, since that file controls some of the extent to which
the games prefers its own lua files over basecontents).


Reply to this email directly or view it on GitHub
#6 (comment)
.

@silentwings

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2016

Accidentally posted from my private account, then deleted.

The rest of Chili seems to work fine with lockluaui.txt removed, it looks like only Chonsole breaks. But as said, afaics in this case LuaUI shouldn't work at all with it there (due to game not supplying own luaui entry point) and we're relying on some unknown hacky stuff, probably engine has some hardcoded fallback file/filenames for when user does smth mad like this.

@LebDooder

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2016

const std::string file = (CFileHandler::FileExists("luaui.lua", mode) ? "luaui.lua": "LuaUI/main.lua");

Looks to be the culprit? I guess either way it should be decided whether or not to use custom or engine handler and if it's wanted I could easily strip down BAR's widget menu to add.

@silentwings

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2016

Probably better to use the engine handler in this case.

(Which means not using BARs widget selector- it relies both on customization to the widget handler and on some local fixes for ScrollPanels.)

@gajop

This comment has been minimized.

Copy link
Member Author

commented Apr 15, 2016

Actually I tried this (removing lockluaui.txt) now and it seems almost everything works.
There are some nonsense errors (posted below), but even Chonsole seems to work.

Errors in question:
[f=-000001] [widgets.lua] Error: Failed to load: api_analytics.lua (no GetInfo() call)
[f=-000001] [widgets.lua] Error: Failed to load: blockuserwidgets.lua ([string "LuaUI/Widgets/blockuserwidgets.lua"]:2: attempt to index global 'addon' (a nil value))
[f=-000001] [widgets.lua] Error: Failed to load: layout.lua ([string "LuaUI/Widgets/layout.lua"]:1: attempt to index global 'addon' (a nil value))

All these could be easily fixed I think. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.