Skip to content

Add widget selector/toggler #6

Open

Description

@gajop

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.

Activity

  1. silentwings commented on Jan 7, 2016

    @silentwings
    Contributor

    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.

  2. FLOZi commented on Jan 8, 2016

    @FLOZi

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

  3. gajop commented on Jan 12, 2016

    @gajop
    MemberAuthor

    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)
    .

  4. silentwings commented on Jan 12, 2016

    @silentwings
    Contributor

    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.

  5. LebDooder commented on Mar 26, 2016

    @LebDooder
    Contributor

    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.

  6. silentwings commented on Mar 26, 2016

    @silentwings
    Contributor

    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.)

  7. gajop commented on Apr 15, 2016

    @gajop
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions