Howdy, Stranger!

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

[Harlowe] Lost undo/redo buttons

Newbie here (to coding as much as to Twinery).

I added the " tw-sidebar { display: none } " to my stylesheet when starting my project, then decided i wanted to keep the buttons after all.

However, even after removing those lines from the stylesheet, the undo/redo buttons have not reappeared, and I cannot figure out how to reactivate them.

Comments

  • Edit: I am on Twine 2.0, using the desktop software version (not the browser) and my files are saved locally and to Gdrive (if that helps, i guess that means my project files are always up to date, though i've had problems with save/backup too, but that's for another post).
  • edited October 2016
    Hi,

    What story format are you using?
    In Harlowe, the code to hide the undo and redo buttons should looks something like this:

    tw-icon.redo {
        ...
        visibility: hidden;
    }
    
    tw-icon.undo {
         ...
         visibility: hidden;
    }
    

    Can you check if you have it in your CSS?
    And remove the "visibility: hidden;" bit.
  • Hey thanks for answering.

    I'm working in Harlowe 1.2.2.

    There is nothing referencing the tw-icon or tw-sidebar in my stylesheet (if that's what you mean by CSS).

    This is all I have in the stylesheet:

    body {
    background-image: linear-gradient(135deg, DarkBlue, black);
    }

    tw-passage {
    color: white;
    }

    tw-link {
    color:crimson;
    }
    tw-link.hover {
    color:#0099FF;
    }
    tw-link.visited {
    color:#777;
    }
  • I just had a look at the HTML file (exported/published story) in Notepad ++ and searched for "undo" and "redo" and found this:

    var back=$('<tw-icon tabindex=0 class="undo" title="Undo">↶</tw-icon>').click(Engine.goBack),fwd=$('<tw-icon tabindex=0 class="redo" title="Redo">↷</tw-icon>').click(Engine.goForward)

    However there is no undo/redo button in the published story, or when I test it in the twine editor.

    FYI I switched between formats as I was writing the story (first time using the software, testing it out). Are there "relics" if I switched and saved and switched and saved again? May this be why I cannot get the undo/redo buttons to appear?
  • There should't be relics from switching headers. This is rather strange though. Out of curiosity, if you compile a fresh game from a new save, do the buttons appear?
  • edited October 2016
    Hey thanks for answering.

    I created a new project and the buttons are there, so I checked my Story more carefully, and found the buttons at the bottom of the page...right after the background repeats itself.

    Still no idea why they aren't in the default position, though, given there are no instructions to move them in the stylesheet.

    Screenshot: http://imgur.com/OubDr3R

  • This is really quite strange - it looks like you have a displaced sidebar.
    Would it be OK to share your CSS? Or check in it if you can see anything that would cause the container of those two buttons to move?
  • I shared the full contents of my stylesheet (the lines i added in the Twine editor stylesheet section) in my post above, just background, font colour, and link formatting.

    Is that what you mean by the sharing my CSS, or is there a fuller CSS code I can extract from my story (perhaps in the HTML "published" file) to show you?

    Thanks
  • @yannicus: You have added the following custom tw-sidebar element related CSS
    tw-sidebar {
        position: absolute;
        top: 800px;
        color: white;
    }
    
    The top: 800px; is causing the 800 px gap between the top of the page the top of the sidebar, and you don't need the position: absolute; because that is the default position type of the tw-sidebar element. If you want to set the default foreground colour of both the tw-sidebar and the tw-passage elements then you should do that on the html element, which is where Harlowe sets it's default foreground colour.

    I suggest you delete both your tw-sidebar and tw-passage related CSS and replace them with the following html element based CSS
    html {
    	color: white;
    }
    
  • @greyelf You are correct, at one point when fiddling with the Stylesheet editor window in twing in the early stages, I added this CSS element. However I removed this element and, as mentioned, the only CSS code i have in the stylesheet editor is as indicated above.

    This is what I don't understand: I thought the stylesheet editor in twine displayed all CSS modifications I apply to my story, however, I removed those lines from the Twine Stylesheet window. How is it that these CSS elements I deleted are still active? Is there another way to edit the project stylesheet, other than in the Twine software?

    Thanks,

  • Not sure how it worked, but I added the line you suggested (html { color: white; }) and the buttons have returned to their default position.
    Thanks for your help.
  • @yannicus: I based my investigations on the version you have uploaded at philome.la
Sign In or Register to comment.