Howdy, Stranger!

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

SugarCube releases

1356710

Comments

  • tritwo1 wrote:
    I want to resize the header that has the title and author and whatnot. How do I do that?


    Resize how?  Do you mean the font size?  Or do you want to make the bar itself wider or something?


    tritwo1 wrote:
    Or how do I make the text in the passages scrollable?


    Which passages?  Are we still talking about the title area or something else?
  • TheMadExile wrote:

    tritwo1 wrote:
    I want to resize the header that has the title and author and whatnot. How do I do that?


    Resize how?  Do you mean the font size?  Or do you want to make the bar itself wider or something?


    tritwo1 wrote:
    Or how do I make the text in the passages scrollable?


    Which passages?  Are we still talking about the title area or something else?


    Basically I'm testing it on my phone and finding that the Title, Author and Saves/Restart are taking up a lot of screen-space. And I can't scroll the text to read what's being cut-off at the bottom. So how do I either make those things at the top I mentioned smaller, or make the text scrollable so I can read it all?
  • tritwo1 wrote:
    Basically I'm testing it on my phone and finding that the Title, Author and Saves/Restart are taking up a lot of screen-space. And I can't scroll the text to read what's being cut-off at the bottom. So how do I either make those things at the top I mentioned smaller, or make the text scrollable so I can read it all?


    Do you know the width of your viewport/screen?  Is the ui-bar on the left-side or the top of the view (normally, it's on the left side, for narrow viewports it switches to the top)?  And what is being cut-off, the contents of the bar or the main passage text?  Since the main passage text should always be scrollable, I'm guessing the bar?

    I'm just trying to get a mental map of what's going on, because it sounds like you're seeing something that you shouldn't be.  Screenshot?
  • The ui-bar is relatively positioned at that point.  It and the main passage container should scroll up just as a normal HTML page would at that point (since that's essentially how they're both configured then).  That view looks a mite narrow for an iPhone 5 (at least, if the scaling is working; is that zoomed in?), but that shouldn't make a difference, regardless.  I'm going to need to look into the scrolling issue, because I can't think of a reason that would be happening.

    Beyond that, you can halve the dead space between the title group and footer with this style: (put it in a stylesheet tagged passage)

    @media screen and (max-width: 800px) {
    #ui-bar footer {
    margin-top: 1.5em;
    }
    }
    That will gain you back some space for the main passage container when in that configuration.
  • TheMadExile wrote:

    The ui-bar is relatively positioned at that point.  It and the main passage container should scroll up just as a normal HTML page would at that point (since that's essentially how they're both configured then).  That view looks a mite narrow for an iPhone 5 (at least, if the scaling is working; is that zoomed in?), but that shouldn't make a difference, regardless.  I'm going to need to look into the scrolling issue, because I can't think of a reason that would be happening.

    Beyond that, you can halve the dead space between the title group and footer with this style: (put it in a stylesheet tagged passage)

    @media screen and (max-width: 800px) {
    #ui-bar footer {
    margin-top: 1.5em;
    }
    }
    That will gain you back some space for the main passage container when in that configuration.


    It's not zoomed in. It's just Titanium's simulator of the phone (but the problem is the same when testing on an actual phone I've tried).
    One detail I've noticed that might hint at the source of the problem: the time and battery power are still displayed at the very top of the phone, kinda going over the "Saves" button. So maybe it's running behind that and I can't click anything because of that?? I have no idea if that makes sense nor how to fix that if that's the case.

    I tried adding that stylesheet passage and it added one more line of text to the screen at the bottom (when i made the number 0.5, just to squeeze as much as i can out of it). Thanks! Maybe I can make the title and author font size smaller too to help, if you can easily help me with that. Basically anything I can do to get more room would be great if the scrolling issue can't be fixed.
  • Ahhhh I'm so sorry for the trouble. It works like a charm. I had found this script on the internet as part of a tutorial on turning twine games into web-based apps and looking at it closely what it was doing was turning off the touch-input. I have no idea why anyone would want to turn that off maybe someone was just trolling me :c

    in any case, I'm sorry to have taken your time and SugarCube rocks
  • tritwo1 wrote:
    I had found this script on the internet as part of a tutorial on turning twine games into web-based apps...

    Is this the article you were using?
  • greyelf wrote:

    tritwo1 wrote:
    I had found this script on the internet as part of a tutorial on turning twine games into web-based apps...

    Is this the article you were using?



    I was using that and someone else's code. This one, GritFish's, is good, and he'll help you out if you reach out to him, which I did and he's awesome. The other code that was bad was from this tutorial saying make a script passage with it and then when you visit the story on a webpage, you can click on an iOS share button and pin it to the home menu as an app (that basically just loads the webpage). If anyone finds that tutorial, I recommend not using it.
  • Glad that's been worked out.  Let me know if you run into any other issues.
  • Published a new release (v1.0.4):
    • Fixed an issue with the seedable PRNG wrapper (bug introduced in v1.0.2).
    • Added the capability to automatically load autosaves at startup, which is configured via the config.saves.autoload property.
    • Additional style tweaks.
    • Other improvements.
  • Thanks so much for implementing the auto-autosave loading capability. I hope that people many people use it and that not-fiddling-with-saves becomes a widespread Twine feature (or at least Twine+SugarCube) feature!

    Quick question: My WIP has lots of custom CSS work--35,000 characters or thereabouts--and I don't really want to upgrade from v0.9.9 to a bunch of CSS debugging. Is most of the style work confined to the hardcoded CSS in the sugarcube header file? In other words, can I avoid such trouble by patching the file manually (i.e., copying the v0.9.9 CSS style block(s) and pasting them over the 1.0.4 block(s)?
  • A lot of the styles are the same between v0.9.9 and v1.x, so it may not be as bad as you fear.  Many of the changes were additions and the separation of the old monolithic style into groups.  The biggest changes to the styles themselves were to: Regardless, there would be issues going either way (making your CSS v1.x-compatible or trying to back-port the v0.9.9 CSS to v1.x).  Off-hand, I can't say which would be more of a hassle.  I'd test your CSS with an unaltered v1.x first, before trying the other way.  I am, also, here to help.
  • OK, I'm giving the straight upgrade a shot. It seems that the major problems are: my custom font declarations get stomped on, and the initialization bar at startup is off-center. Shouldn't be too hard to clean up. I'll let you know if I run into anything I can't figure out.
  • Published a new release (v1.0.5):
    • Added the ability to build user library code into the compiled HTML via the file userlib.js, which must exist within SugarCube's directory under targets.
    • Added helper methods to UISystem for each built-in menu, which populate and open the menus in one easy call.
    • Major internal refactoring of several subsystems.
    • Additional style tweaks.
    • Other improvements.
  • Published a new release (v1.0.9): From v1.0.61.0.8:
    • Extended the autoload functionality.  See config.saves.autoload for details.
    • Replaced the display string properties in the config object with a new strings object.  See the upgrade instructions page for details.
    • Addressed a minor rendering bug on the loading screen in Chrome on some platforms.
    • Clarified SugarCube's licensing terms (Simplified BSD License).
  • Interesting. Does the introduction of the predisplay and postdisplay tasks mean that the corresponding special passages will eventually be phased out, or are they just for added flexibility?
  • Added flexibility.  I have no intention of removing the PassageReady and PassageDone special passages.

    [EDIT]: If I ever did decide to retire those specific special passages, it would likely be in favor of making them tag-based rather than specially titled passages, so you could have multiples of each.  Something like that.  I have no such plans at the moment, however.
  • Published a new release (v1.0.10):
    • Added a new config property config.altPassageDescription, which allows authors to specify alternate passage descriptions; used by the Saves and Rewind menus.
    • Added additional ARIA landmark roles to various core elements.
    • Changed <History>.isEmpty from a getter to a method, <History>.isEmpty().  This is a breaking change.
    • Some internal refactoring.  This shouldn't affect authors, however, note is being made of it, just in case.
    • Other improvements.
    • Updated jQuery.
    Also, as a reminder, the handling of the StoryMenu special passage will be changing in the near future.  If you're using it to hold non-menu content, it is strongly suggested that you move said content to another location (e.g. to the StoryCaption special passage).
  • Published a new release (v1.0.11):
      @text@@ and table cell markup.[*]Modified how line feeds are handled by the nobr tag and <<nobr>> macro.  Preceding and trailing line feeds are now completely removed and contiguous line feeds are compressed into a single space.[*]Added the <Array>.count() & <String>.count() extension methods, which return how many times the needle was found in the haystack.[*]Removed the body ID from the <body> tag.  This likely affects very few projects.[*]Some internal refactoring.  This shouldn't affect authors, however, if you do notice a regression, let me know.[*]Other improvements.[*]Initial Twine 2.x support (installation URL TBD).
    Also, as a reminder, the handling of the StoryMenu special passage will be changing in the near future.  If you're using it to hold non-menu content, it is strongly suggested that you move said content to another location (e.g. to the StoryCaption special passage).
  • TheMadExile wrote:

    Initial Twine 2.x support (installation URL TBD).


    Twine 2.x installation URL: http://www.motoslave.net/sugarcube/twine2/format.js
  • What method did you use to get around the lack of StoryInit, StorySettings, StoryMenu, etc.... in Twine 2?
  • greyelf wrote:

    What method did you use to get around the lack of StoryInit, StorySettings, StoryMenu, etc.... in Twine 2?


    I didn't.  Aside from decorating their icons in the story map, most pre-Twine 2 special passages aren't related to or dependent on the editor/compiler at all (e.g. Twee vs. Twine 1).  The sole exceptions are StorySettings (Twine 1 only) and StoryIncludes (all pre-Twine 2 compilers).  StorySettings isn't used by SugarCube, as its config object existed long before StorySettings did.  StoryIncludes isn't used by story formats at all, it's solely for the compilers.

    So, a few exceptions aside, special passages are used by the story format and the editor/compiler used is irrelevant.  This is also the reason why SugarCube has more special passages than the Twine 1 vanilla story formats do.

    That said, the current version of SugarCube for Twine 2, which will likely see some additional development, does make some concessions to Twine 2.  Notably:
    [list type=decimal]
    It does not process stylesheet or script tagged passages, in favor of the "Story Stylesheet" and "Story JavaScript" mechanisms from Twine 2 (which are really just special passages in their own way).  The former is not going to change ("Give me a stylesheet, Vasili. One stylesheet only, please.").  The latter I'm of two minds about, so I might be convinced to allow script tagged passages in addition to the "Story JavaScript".
    It does not automatically treat the Start passage as special.  Currently, only if the author fails to mark a passage as the starting passage (via the rocket ship icon) does SugarCube treat an existing Start passage as the starting passage, otherwise it's treated as a normal passage.  I'm not actually sure how Harlowe or Snowman for Twine 2 handle the failover state, I'm guessing they simply pick the first passage (pid === 1).  I might have SugarCube do that too in case of double failover (i.e. no chosen starting passage and no Start passage).
    As noted above, StoryIncludes simply doesn't work, because Twine 2 doesn't support it.  Not actually SugarCube related, but still something to keep in mind for authors familiar with SugarCube from pre-Twine 2.

    Beyond that, SugarCube works pretty much the same in Twine 2 as it does in Twine 1 (or Twee, or TweeGo).
  • Announcing SugarCube v1.0.12 ( Documentation and Twine 1.4+ downloads: http://www.motoslave.net/sugarcube/ | Twine 2.x install URL: http://www.motoslave.net/sugarcube/twine2/format.js )

    Changelog highlights:
    • Changed the handling of the StoryMenu special passage.  Rather than simply being dumped into a single element in the core menu, it is now fully processed into its own menu, which is a sibling of the core menu.
    • Changed the previous() function to behave like its vanilla counterpart when called without an argument (behavior with an argument is unchanged).
    • Fixed an issue with the built-in seedable pseudo-random number generator when using custom seeds without extra entropy.
    • Added support for arrow separators (-> & <-) in the core section of wiki links and images (Twine 2 extension, though it works in Twine 1 as well).
  • How to install SugarCube on Twine 2 ? I copied SugarCube into storyformats folder but it not appear on Twine 2 story format window. I searched and found nothing.
  • In the Twine 2 sidebar there is a Formats link, click on it, then click on the tab Add a New Format, finally paste the URL given here into the appropriate spot and click the +Add button.
  • Thank you very much.
  • Announcing SugarCube v1.0.13 ( http://www.motoslave.net/sugarcube/ )( Twine 2.x: http://www.motoslave.net/sugarcube/twine2/format.js )

    Changelog highlights:
    • Fixed a last minute issue which broke the new arrow separators.
    • Other improvements.
  • Announcing SugarCube v1.0.14 ( http://www.motoslave.net/sugarcube/ )( Twine 2.x: Just get v2.0.2+, it's a built-in option now. )

    Changelog highlights:
    • Fixed an issue with the wiki link and image markup when using loose quotes within raw text.
    • Fixed an issue with the <<replace>> macro where it did nothing when used empty, rather than emptying its targets.
    • Changed the handling of the custom style markup (@@@@).  It may now produce either an inline (<span>) or block (<div>) level element.
    • Other improvements.
  • Announcing SugarCube v1.0.15 ( Twine 1.x: http://www.motoslave.net/sugarcube/ )( Twine 2.x: It's a built-in option from v2.0.2+. )

    Changelog highlights:
    • Fixed an issue with macro argument parsing which would cause it to fail on quoted strings if the string contained an escape for any character other than the quote.
    • Added the <<textarea>> and <<goto>> macros.
    • Updated the heading markup formatter to be choosier about what constitutes a heading.
    • Changed the startup requirements so that the story title is no longer optional.
    • Other improvements.
    Additionally:
    • Finally sync'd the <<replacelink>> macro set with v1.1.5 of the Combined Replace Macro Set and reuploaded it.
    • Updated the Bleached style.
Sign In or Register to comment.