Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to remove toggle button from UIBar (Sugarcube 2)

Ahoy,

I'm just wondering if there's an easy way to remove the stow/unstow toggle button from the side UIbar? My game handles the stowing and unstowing of the bar, and I just need a way to prevent the player from moving it on their own.

I'm using Twine 1.4.2 and Sugarcube 2.17.0

Comments

  • You could simply hide it via CSS, however, it's probably best to remove it altogether if you're not going to use it—that will keep a handler from being bound to it.

    Place the following in a script section: (Twine 1: script-tagged passage; Twine 2: Story JavaScript)
    $('#ui-bar-toggle').remove();
    
  • Thanks a bunch for that. I had been trying to remove it through CSS, but was getting weird side effects. This was the exact type of solution I was after :)
Sign In or Register to comment.