1. 01 Dec, 2020 1 commit
    • Leon Arnott's avatar
      Fixed, in a somewhat forceful fashion, bugs where (button:) links (plus a lot... · e918daa6aa26
      Leon Arnott authored
      Fixed, in a somewhat forceful fashion, bugs where (button:) links (plus a lot of other block elements) would be forced into inline flow during some transitions, due to <tw-transition-container> being given 'display:inline-block'.
      This COULD cause some issues with some other transitioning elements (not to mention custom story structures), but it seems to be working as intended at present.
       * Fixed the border of (input-box:) elements, such that (border:) can alter it correctly.
       * Made it so that various 3.2.0 commands that should not have changers attached will now correctly error when that happens.
       * Fixed the sizing of "button" links in (dialog:) dialogs.
  2. 22 Nov, 2020 1 commit
    • Leon Arnott's avatar
      Added a (meter:) command macro, used for creating a videogame bar-graph meter... · 7dffab3fe719
      Leon Arnott authored
      Added a (meter:) command macro, used for creating a videogame bar-graph meter that's bound to a numeric variable.
      I'm rather satisfied with this implementation of meters. The only concern right now is that it's the only "interface" macro in the documentation.
      Also fixed a bug with (enchant:) where errors produced by the given lambda wouldn't be reported.
  3. 02 Nov, 2020 2 commits
  4. 30 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added two interface macros, (icon-counter:) and (checkbox:), as well as a changer, (opacity:). · 0defb9d609c6
      Leon Arnott authored
      (icon-counter:) is designed as a built-in solution to putting UI displays in the sidebar, which authors have tended to do over the years. Being a mere display element instead of a clickable icon, it doesn't have the same default opacity as the other icons. (opacity:) had to be added in order to make the default opacity of sidebar icons alterable, if one wanted to bring them all into line with each other.
      (checkbox:) has been a long-time obvious addition to bring in from SugarCube. It also makes me want to add (checkbox-fullscreen:), as a counterpart to the link form of fullscreen activation.
      Also fixed a 2bind-related bug with (input-box:).
  5. 27 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added (str-nth:). Also, the icons produced by the icon command macros can now... · b2aa5e6ccc3b
      Leon Arnott authored
      Added (str-nth:). Also, the icons produced by the icon command macros can now have optional text labels added.
      These optional text labels are a string argument alongside the optional Unicode glyph string. They are differentiated solely by length, which results in a somewhat unusual type signature for these macros, but one which isn't too bothersome.
      The naming of (str-nth:) compared to (nth:) is also something that's a little unfortunate, but I don't think (str-nth:) is quite as useful on the whole as (nth:) is, so I assume it'll be fine given there's not as much chance of confusing the latter for the former.
  6. 15 Oct, 2020 1 commit
    • Leon Arnott's avatar
      Added (icon-undo:), (icon-redo:), (icon-fullscreen:) and (icon-reload:), and... · 7aac8094cf1d
      Leon Arnott authored
      Added (icon-undo:), (icon-redo:), (icon-fullscreen:) and (icon-reload:), and removed the fullscreen icon from the sidebar.
      I decided, as expected, that the fullscreen icon tends to stick out quite a bit when it was constantly visible by default. The addition of these macros permits the author to selectively add the fullscreen icon if they wish, using existing macros.
      Also fixed a bug where (link:) attached to commands would cause a crash, introduced not long ago.
  7. 13 Oct, 2020 1 commit
  8. 08 Sep, 2020 1 commit
    • Leon Arnott's avatar
      Altered the Makefile to inject metadata from the Metadata script into a new... · b93f2715c1af
      Leon Arnott authored
      Altered the Makefile to inject metadata from the Metadata script into a new module, ShortDefs, used by the rest of the CodeMirror mode.
      This replaces the former Makefile injection of macro definitions into TwineMarkup, and allows the Tooltips to access macro definitions, as well as an "abstract" from the opening of each macro's article.
       * Continued working on the Tooltips' underlying display code.
       * Removed the -webkit-transform and -webkit-animation prefixed properties from the generated Harlowe CSS, as well as all flexbox-related prefixes other than -ms-.
  9. 25 Jul, 2020 1 commit
    • Leon Arnott's avatar
      Implemented destructuring patterns that use untyped variables, as well as... · 51d917b059ca
      Leon Arnott authored
      Implemented destructuring patterns that use untyped variables, as well as expanding TypedVars to include any pattern as the 'type' instead of just datatypes.
      This brings destructuring syntax roughly in line with the fluidity of JS destructuring. This was implemented by altering compile() to compile all variables
      in the left-hand-side of a 'to' or 'into' statement into an 'any-type' VarRef.
      Also fixed some bugs in the previous commit, and made the alpha of <tw-error> elements denser.
  10. 10 Jul, 2020 1 commit
  11. 06 Jul, 2020 1 commit
    • Leon Arnott's avatar
      Finally added (input-box:) and, at the spur of a whim, (force-input-box:). · 90e345262bbc
      Leon Arnott authored
      These macros' twisted and gnarled type-signatures irk me (and largely precluded me adding this macro earlier), but I don't know another way around the constraints that they be consistent with both (cycling-link:) and (box:)'s parameter orderings. Also, I was forced to limit the sizing line strings given to this and (box:), where a one-character "X" is the only valid 100%-width string, to avoid ambiguity with the other string that this takes. Regrettable.
      Also fixed a few more minor bugs.
      Closes #130. Closes #132.
  12. 17 Jun, 2020 1 commit
  13. 16 Jun, 2020 1 commit
  14. 04 Jun, 2020 1 commit
  15. 15 May, 2020 1 commit
  16. 06 May, 2020 1 commit
    • Leon Arnott's avatar
      Added (text-size:), a macro that scales the text size of the attached hook. · a958416d748d
      Leon Arnott authored
       * The CodeMirror mode syntax highlighting CSS is now pre-compiled instead of computed at runtime. Moreover, the dark mode colours are 50% brighter.
       * Fixed a bug with (hover-style:) where it couldn't override links' :hover styles.
       * Fixed a bug with consecutive line breaks, which now no longer display as the wrong height during passage transitions.
  17. 15 Mar, 2020 1 commit
  18. 17 Jan, 2020 1 commit
    • Leon Arnott's avatar
      Added macros for a new rudimentary storylet system, (storylet:) and (open-storylets:) · 0751b7212e7c
      Leon Arnott authored
      This was more complex than I'd hoped, requiring me to think up a whole paradigm for executing a small portion of passage code outside of it. As it is, giving this responsibility to Renderer is a bit suspect, but I need it as close to the actual lexing and parsing as possible.
      I don't know if I like the name (open-storylets:), due to "open" being ambiguous as a verb and an adjective, but it's only four letters, so it stays for now.
      Also fixed a few bugs and documentation quirks.
  19. 26 Dec, 2019 1 commit
  20. 05 Sep, 2019 1 commit
    • Leon Arnott's avatar
      Harlowe crash messages (for both user scripts and engine crashes) now use the new HTML dialogs. · 09da3c92aa32
      Leon Arnott authored
      Also fixed a longstanding bug where the CSS code to make consecutive <br>s cumulatively smaller was erroneously being applied to a lot of other <br>s. The CSS has been replaced with special Renderer checks and inline styles for the <br>s.
      Additionally, the colour scene of <tw-dialog>s is now white-on-black regardless of <tw-passage> CSS. Whether or not a more convenient means to change it will be implemented is currently undecided.
  21. 17 Apr, 2019 1 commit
    • Leon Arnott's avatar
      Fixed a bug that caused certain event handlers to not be attached to... · 380b1d041573
      Leon Arnott authored
      Fixed a bug that caused certain event handlers to not be attached to <tw-story>, making (dropdown:) stop working.
      Also, added checks to the (alert:), (prompt:) and (confirm:) macros so that they produce normal TwineErrors if they run on a browser with prompt(), alert() or confirm() removed.
      Also tweaked the CSS for <select> elements somewhat.
      Closes #165. Closes #166.
  22. 03 Sep, 2018 1 commit
    • Leon Arnott's avatar
      Temp variables finally work correctly with changers that defer a hook. · 338f69a306c6
      Leon Arnott authored
      Now, you can reference temp variables inside the hook, such as in (link:"Read")[It reads: _engraving], just as you can with other kinds of changers.
       * Error messages should now explain in slightly more detail what kind of lambda a macro requires ("a 'where' macro", for instance).
       * The "undo" and "redo" buttons' CSS opacity has been reduced, to better fit the default dark theme.
       * Fixed a number of macros that shouldn't have been made into commands, like (prompt:) or (save-game:).
      As a result of that last point, three macros that used to return { earlyExit: 1 }, (save-game:), (goto-url:) and (reload:), no longer do, because Section.runExpression no longer recognises that as a valid return value outside of attachables with TwineScript_Run() (which (goto:) is a part of). I ought to fix this at some later point, though the low traffic of those three makes this a low priority.
  23. 09 Jul, 2018 1 commit
  24. 08 Jul, 2018 1 commit
  25. 25 Jan, 2017 1 commit
  26. 01 Dec, 2016 1 commit
    • Leon Arnott's avatar
      Added the (undo:) macro. · e2f2768af7da
      Leon Arnott authored
      This, along with a forthcoming (redo:) macro (which, in order to be used correctly, would require a (future:) macro, I guess), would allow the current default sidebar to be bootstrapped (constructed anew) from Harlowe code.
      Also changed the CSS of <html> such that its font declaration is now on <tw-story>, and fixed the CSS of <tw-error>s to make them white-on-black alongside the rest. (I may revise the latter some more to make it work when black-on-white is being used.)
  27. 30 Nov, 2016 1 commit
    • Leon Arnott's avatar
      Changed Harlowe 2 to use white-on-black CSS by default. · b7f75aa1c921
      Leon Arnott authored
      I've wanted to do this for a long time. I feel like white-on-black is the superior default for Twine, and was so during Twine 1, for a few reasons - black suggests a greater degree of intimacy, away from the "public" space of the white-on-black web, and invites more personal writing. Instructions for changing it back using (enchant:) are in the update notes. (Yes, I'm aware (enchant:) still needs to be documented.)
  28. 29 Aug, 2016 1 commit
    • Leon Arnott's avatar
      Added hidden hook markup and the macros (hidden:), and (show:). · b132150f7b5c
      Leon Arnott authored
      I spent years feeling rueful about adding this, as I'd felt it directly competes with the (replace:) macros' idiom. Lately, though, I've seen the merit in it, as a way of keeping revealed text inside the flow of the prose it is revealed inside, when said text is vital to the readability of the passage.
      I currently feel like this doesn't provide much way of expressing structure and relationship between hidden hooks and visible ones - no semantic way to convey that they form a list with only a single one visible, for instance, or that one builds upon the last, as with <<becomes>> and <<gains>> in Twine 1. But, future macros providing semantically clearer means of showing hidden hooks ((show-next:), (reveal-next:) or somesuch) can always be added.
  29. 02 Jun, 2016 1 commit
    • Leon Arnott's avatar
      Combined HookSet and PseudoHookSet into one. · b85e4b9e7e43
      Leon Arnott authored
      Now, pseudo-hook selectors passed to HookSet.create() will create a hookset. This also paves the way for concatenating both hooksets and pseudo-hooksets, should pseudo-hooksets ever become observable to user code.
      This also removes HookUtils, moving all of its functions into HookSet's internals.
       * Removed the undocumented "<html>" selector string feature, for now.
       * Reverted tw-story's font-size and line-height being based on rem, and made line-height the same as font-size again.
       * Changed the (reduced) height of consecutive line breaks once more.
  30. 18 Apr, 2016 1 commit
    • Leon Arnott's avatar
      Fixed some small, overlooked bugs. · dbdc0f9c2573
      Leon Arnott authored
       * Fixed the bug where a (goto:) command inside a hook would prevent subsequent commands inside the hook from running, but subsequent commands outside it would still continue.
       * Fixed the bug where (current-time:) wouldn't pad the minutes value with a leading 0 when necessary. A test for this still needs to be written, though.
       * Removed the CSS directives that reduce the font size based on the player's device width.
  31. 30 Nov, 2015 1 commit
    • Leon Arnott's avatar
      Slightly improved the v2.0.0 CSS. · b8cbd202169c
      Leon Arnott authored
      The line height has been increased to 1.2x the font size, and the margin-top of headers has been reduced.
      Also, a bit more documentation has been written.
  32. 07 Nov, 2015 1 commit
  33. 17 Aug, 2015 1 commit
    • Leon Arnott's avatar
      Migrated build tools from Grunt to Make. · 6f8f191a159b
      Leon Arnott authored
      This toolshift should result in better running times for basic tasks, and a somewhat cleaner build script.
      Also, as a consequence, proper jshintrc files have been created in each codebase (the Harlowe source, and the test specs). However, due to the loss of grunt-contrib-jshint, a custom jshint reporter adapted from it must be included to retain its desirable reporting messages.
  34. 01 Jul, 2015 1 commit
    • Leon Arnott's avatar
      Added a rudimentary implementation of HTML element selectors. · 8afef76c224b
      Leon Arnott authored
      Now, enchantment and revision macros like (replace:), when given a string formatted like "<tag>", will select HTML tags in the passage, or the <tw-story> itself if the string is "<tw-story>". This allows such macros to remain scoped to their passages, while still allowing the <tw-story> to be enchanted. This is the basis for page-wide CSS-esque styling.
      As this is a preliminary syntax enhancement, there's no test case for it yet.
       * Reinstated the reverted CSS changes from commit 274.
       * Improved (background:) to now set the enchantment's display to "block" if it probably contains a block element.
  35. 30 May, 2015 1 commit
    • Leon Arnott's avatar
      Fixed a bug where (textstyle:"blur")'s text colour was wrong in Chrome. · 692a6f8dfa60
      Leon Arnott authored
      This was due to the fact that $(this).css('color') doesn't work in that platform if the element wasn't inserted into the DOM yet (or something). This also fixes (textstyle:"blurrier") and (textstyle:"smear").
      Also changed (textstyle:) and (transition:) to produce errors when given incorrect style or transition names.
  36. 27 May, 2015 1 commit
    • Leon Arnott's avatar
      Three more pre-release bugfixes. · 4d9928c93510
      Leon Arnott authored
       * Now, the "0. " marker for the numbered list syntax must have at least one space after the ".". Formerly zero spaces were permitted, causing 0.15 etc. to become a numbered list.
       * Fixed one final IE 11 compatibility bug - built-in functions don't have a "name" property in that platform.
       * Fixed a bug where (display:)ed passages which use the collapsing whitespace syntax wouldn't collapse properly.
  37. 22 May, 2015 1 commit
  38. 15 Mar, 2015 1 commit
    • Leon Arnott's avatar
      A few bugfixes involving enchantments. · 494f80682a3b
      Leon Arnott authored
       * Reinstated the Section.updateEnchantments method, and made it so that it only runs after the "top-level" section has finished rendering.
       * Fixed a bug where enchantment event handlers could potentially fail to load.
       * Fixed a small bug which broke the Jasmine tests in the previous commit.
       * Now, variables and barename properties must have one non-numeral in their name. This means that $100 is no longer regarded as a valid variable name.
       * Debug Mode: now, macros show their full call (which remains a tooltip) and hooks show have their brackets at their start and end.
       * Added some initial Jasmine tests for enchantments.
  39. 13 Mar, 2015 1 commit
    • Leon Arnott's avatar
      Added notification messages to (set:) macros in debug mode. · cac027b0ff5a
      Leon Arnott authored
      These messages state what variable was modified by the (set:), and to which value. This is more informative than examining the <tw-expression>'s title, which only states the raw expression that the value was, rather than its computed value.