- 28 Aug, 2022 3 commits
-
-
Leon Arnott authored
Implemented a more robust fix for the "(replace:) call targeting the hook containing it" compatibility bug. Closes #268.
-
Leon Arnott authored
-
Leon Arnott authored
-
- 25 Aug, 2022 1 commit
-
-
Leon Arnott authored
Fixed a bug which prevented you from naming a variable $start, $end, $any, $some, or $all (or naming a temp variable any of those words). Closes #274. Also added a pre-minified version of the define.js script.
-
- 22 Aug, 2022 1 commit
-
-
Leon Arnott authored
Fixed a bug where, whenever a hook was shown or inserted into the passage at the same time as a dialog box (such as those created by (dialog:)) appeared, then existing enchantments wouldn't apply to that hook. I believe this quick fix shouldn't have any perf issues, insofar as it potentially loosens a restriction on how many times updateEnchantments() will run... Closes #273.
-
- 18 Aug, 2022 1 commit
-
-
Leon Arnott authored
Harlowe now uses an absolutely barebones module-loading function which only supports the subset of AMD that Harlowe and both of its dependencies use. This was because RequireJS doesn't support ES11 (with optional chaining operators) and also because I wanted more control over how Harlowe was built, to possibly speed up compiling a smidge. It isn't actually any faster now, but the chaining operators are still available now. Also fixed enchantments created using (enchant:) with a "via" lambda being displayed as (undefined:) in the Debug Mode Enchantments panel.
-
- 12 Aug, 2022 1 commit
-
-
Leon Arnott authored
-
- 04 Aug, 2022 1 commit
-
-
Leon Arnott authored
* Now, <input> elements in (prompt:) dialogs have been given the CSS style border:solid white to make them more visually consistent with (input:) elements. * Now, Harlowe will attempt to auto-focus (input:) and (input-box:) elements when they are added to the passage, allowing the player to type into them immediately. If multiple (input:) or (input-box:) elements are present, the first (highest) one will be auto-focused. Note that any further (input:) elements added to the passage (via (after:) or some other means) will be auto-focused even if the player is currently typing into an existing element.
-
- 26 Jul, 2022 1 commit
-
-
Leon Arnott authored
Closes #269.
-
- 15 Jul, 2022 1 commit
-
-
Leon Arnott authored
Fixed a bug where a (replace:) call targeting the hook containing it (including special hook names like ?passage) would cause all subsequent macros and expressions to be ignored (similar to what would happen if a (go-to:) was used). Note: since the aforementioned behaviour is arguably more intuitive than the 3.2 behaviour, it is possible that this fix will be intentionally reverted in 4.0. As of right now, it is considered a 3.2 compatibility bug. Closes #268. Also bumped the version number.
-
- 14 Jul, 2022 2 commits
-
-
Leon Arnott authored
Fixed a crash caused by completely empty 'header', 'footer', 'startup', 'debug-header', 'debug-footer' and 'debug-startup' passages. Closes #266. Also updated the 'past versions' section of the documentation.
-
Leon Arnott authored
-
- 11 Jul, 2022 1 commit
-
-
Leon Arnott authored
Now, for toolbar dialogs that include preview panes and sliders, dragging the slider updates the pane instantly, rather than only when the slider stops moving. Also updated the documentation of the Toolbar.
-
- 09 Jul, 2022 1 commit
-
-
Leon Arnott authored
The two simplest syntax buttons (Heading and Horizontal Line) have been moved to the List Item submenu. Also, Columns is now a submenu under Alignment. To make it slightly easier to notice that the Alignment button has changed, its icon has been altered (from align-right to align-center). Also fixed a bug where using variables containing datatypes or data patterns with the -type syntax (such as $pattern-type $name) wouldn't work at all.
-
- 07 Jul, 2022 1 commit
-
-
Leon Arnott authored
Also changed the version number to 3.3.1.
-
- 06 Jul, 2022 3 commits
-
-
Leon Arnott authored
Now, line breaks in raw HTML <svg> elements are no longer converted into erroneous <br> elements (similar to the existing exception for <table> elements). Closes #260.
-
Leon Arnott authored
Now, each time the Toolbar's tooltip setting is changed, that setting is used for subsequent opened editor windows. Closes #261.
-
Leon Arnott authored
* Fixed a bug where the CSS for the "dissolve" transition (used for default passage transitions, among other things) wasn't compiled correctly. * Fixed a bug where Debug Mode's "Turns" dropdown menu wouldn't automatically update to match the current passage. Closes #262.
-
- 05 Jul, 2022 2 commits
-
-
Leon Arnott authored
-
Leon Arnott authored
-
- 23 Jun, 2022 1 commit
-
-
Leon Arnott authored
-
- 17 Jun, 2022 1 commit
-
-
Leon Arnott authored
* Fixed a long-standing bug where enchanting ?Page with (background:) would, if the current passage was taller than the browser window, cause the background to only cover the length of the browser window. * Fixed a bug where enchanting ?Page with (background:) using (gradient:) or (stripes:) would, upon leaving the passage with that enchantment, cause the page background to become transparent (i.e. whatever the browser's default is) instead of the default black (unless the story stylesheet changed it). Closes #237. Closes #259.
-
- 15 Jun, 2022 1 commit
-
-
Leon Arnott authored
* Fixed the Find panel's "Only in" functionality. * The Find panel now populates itself with the current text selection when opened. * Added keyboard shortcut hints to various toolbar labels. * Moved the toolbar's "wizards" buttons into a separate "Macro" dropdown in 2.4. * Added Ctrl+G and Ctrl+H keyboard shortcuts for the Find dialog. One small problem is that these only work when the CodeMirror panel has focus, though... * Applied a fix to the colouring of dropdowns in panels. * Added a "past versions" section to the documentation.
-
- 11 Jun, 2022 1 commit
-
-
Leon Arnott authored
Also, (visited:) and "turns" now invalidate a pure value (for saving purposes).
-
- 10 Jun, 2022 1 commit
-
-
Leon Arnott authored
Strings that match the name of an existing passage are now coloured differently and have an additional thin underline. Additionally, strings that match an existing passage tag now have a dotted underline. Also, data structure values more than 4 levels deep no longer get separate rows in Debug Mode's Variables panel.
-
- 09 Jun, 2022 1 commit
-
-
Leon Arnott authored
* Fixed a bug where Debug Mode's variables panel listings of data structures' contents would have the wrong names ("$A's 1st" becoming just "1st") after changing passages. * Fixed a bug where the truncated names of data structures (used in Debug Mode and error messages) sometimes missing the "X other items" text. Also tweaked the Input panel of the Harlowe Toolbar to fit certain things on one line in 2.4.
-
- 08 Jun, 2022 2 commits
-
-
Leon Arnott authored
Also tweaked some tests relating to the previous commit.
-
Leon Arnott authored
Now, (t8n-delay:) uses animation-play-state to force animations to not run at all until the delay expires, rather than using just animation-delay by itself. This mostly works, but there still isn't a strong guarantee that the animation animates at the required duration, meaning that they can judder at the very end of the animation. In addition, the expediting of child animations in unwrapped parent elements has been slightly improved (they now expedite at the rate at which THEY have been animating, not the parent), but still isn't perfect. A full rewrite of the animation system - NOT using CSS-based animation - in 4.0 is really what's called for... Also: * Fixed (again) Debug Replay frames being created where the right-side code is the same as the left-side code. * Fixed a bug where "pos" used in lambdas given to (char-style:) would, for each character, be a number relative to the entire passage, not the attached hook. * Fixed an error message in comparisonOp() involving determiners. * Fixed a few more documentation lines. Closes #247.
-
- 07 Jun, 2022 1 commit
-
-
Leon Arnott authored
I decided this provided the most consistency for macros which create block-level elements. Resizing them is a highly desirable operation, so it might as well be built-in to the call. Also: * Removed the 'placeholder' string, as it was making the type signature too complicated and it seemed too niche a feature. * The sizing strings for (input-box:) and (force-input-box:) are now optional, given that they can already be disambiguated (more or less) from the default text string.
-
- 06 Jun, 2022 1 commit
-
-
Leon Arnott authored
Added (input:) and (force-input:), variations of (input-box:) and (force-input-box:) which produce single-line <input> elements instead of <textarea> elements. I was a little skeptical of making these separate from (input-box:), but the way that <input> interacts with newlines by itself makes it distinct enough to merit separate names, I think. Even a 1-row (input-box:) is ultimately quite different. I don't quite like how it ended up that (input:) has nothing much to do with (output:), but that seems to be the corner I've been pushed in ever since adding (input-box:). Giving (input:) a name like (input-line:) doesn't seem additionally necessary or informative, either. Closes #202.
-
- 04 Jun, 2022 1 commit
-
-
Leon Arnott authored
* (icon-counter:) no longer uses the pointing hand cursor when the mouse hovers over it. * (meter:) now produces an error if given a bound variable using 2bind instead of bind (for consistency with (dialog:)). * (checkbox:), (input-box:) and (force-input-box:) now set the bound variable as soon as the element appears in the passage (For consistency with (cycling-link:)). * <input type=checkbox> now has vertical-align:middle.
-
- 03 Jun, 2022 1 commit
-
-
Leon Arnott authored
I was contemplating having these be datatypes named "start" and "end", before realising those would conflict with the "start" and "end" data names. Also fixed a bug where commands saved in variables could become mutated by being used in passage text with changers attached to them.
-
- 02 Jun, 2022 1 commit
-
-
Leon Arnott authored
This follows from the previous commit's work. I had to somewhat awkwardly special-case custom commands in State, but it seems to be a fairly minimal kludge. Also: * Fixed a bug where erroneous VarRefs from (set:) macro calls inside evaluated strings were being created. * Fixed a bug where metadata macros wouldn't work at all if their macro names weren't entirely in lowercase. Closes #258. * Made the (loadgame:) tests slightly more robust.
-
- 25 May, 2022 1 commit
-
-
Leon Arnott authored
Custom commands can now be serialised with (source:) and (v6m-source:), and are represented correctly in debug replays. This representation is not guaranteed to be accurate throughout the story, for obvious reasons which are now laid out in the (source:) macro's article. This also contains some refactoring needed to allow custom commands to be saved in save files, thus allowing every Harlowe value to be serialisable. More work on this will be in the next commit.
-
- 20 May, 2022 1 commit
-
-
Leon Arnott authored
Worked out a new compromise for (line-style:) and line selection that can handle multi-line hooks more intuitively. The big problem I'd been wrestling with is getting (line-style:) to "make sense" when wrapping a line that A) begins a hook halfway through, and B) where said hook spans multiple lines. Since it's not possible to jQuery wrap only the text nodes in the first half of the hook along with the text nodes in the same line outside of the hook without displacing some of the text nodes, I'd been forced to think of various solutions. In the end, I decided to compromise like so: the halves of a multi-line hook are now always treated as (and wrapped as) a separate line from the rest of the line. Even though that makes (text-indent:) not work quite right, other changers like (text-colour:) work correctly with this. It's not ideal, but I can't afford to keep fretting over this. Also: * Fixed up more documentation lines. * 2.4 toolbar buttons now have more descriptive labels that TwineJS should use as tooltips. * Added an alternative error message for unmatched text tokens appearing in macro calls, in cases where it seems like a position name (like '1st') that was incorrectly used. * Code inside HTML comments is no longer syntax-highlighted.
-
- 12 May, 2022 1 commit
-
-
Leon Arnott authored
Also decided to use the new aliases of (datanames:), (datavalues:) and (dataentries:) as their main names, to be fully consistent with (dm-altered:).
-
- 11 May, 2022 1 commit
-
-
Leon Arnott authored
Added (dm-altered:), a macro which serves as a combination of (altered:) and (dataentries:) while also returning an altered datamap. Closes #97. I still want to add a (dm-from-entries:) macro which lets (dataentries:)'s array be turned back into a datamap, but I have to decide I like that name first... Also: * (datanames:), (datavalues:) and (dataentries:) now have the aliases (dm-names:), (dm-values:) and (dm-entries:), to better convey that these operate exclusively on datamaps. * (altered:) now accepts a lambda with a 'where' clause in addition to a 'via' clause. If the 'where' clause produces false, the value for that loop is not altered. * Improved lambda frames of debug replays further, adding separate "where result" and "via result" columns and fixing some bugs.
-
- 10 May, 2022 1 commit
-
-
Leon Arnott authored
Each loop's variables and results are presented in a table as a special replay frame, and the sub-Replay of those loops can be inspected further. This all came together pretty well, fortunately for everyone.
-
- 08 May, 2022 1 commit
-
-
Leon Arnott authored
Now, instead of simply wrapping all of the text nodes in a line with a <tw-pseudo-hook>, which excluded <tw-expression>s that weren't rendered yet, it now wraps every element in a line, except where that element contains a <br> (whereupon only some of its contents are wrapped). Note that enchanting lines still has ongoing issues involving inline elements that contain <br>s, which I want to fix backwards-incompatibly in 4.0. Closes #249.
-
- 07 May, 2022 1 commit
-
-
Leon Arnott authored
This wasn't added previously because I was still thinking about how it would actually read, how it would be described in the documentation, and whether it would make sense alongside (p-not:) and so forth. I've convinced myself now that it's fine, though. After this, the only patterns really missing are (p-start:) and (p-end:), which weren't needed until the arrival of (str-replaced:). Also added some tests for the previous commit's changes. Closes #254.
-