- 01 Dec, 2020 1 commit
-
-
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. Also: * 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.
-
- 30 Nov, 2020 1 commit
-
-
Leon Arnott authored
Added a debugging command, (mock-visits:), which lets you re-create a game state where certain passages have been visited a certain number of times. Also tweaked the Colours panel of The Harlowe Toolbar such that an (enchant:?page) call can now be optionally generated from that panel.
-
- 29 Nov, 2020 1 commit
-
-
Leon Arnott authored
Added (stripes:), a variant of (gradient:) which creates a striped background (for use with (background:)) when given a given stripe width, angle, and colours. As of now, the adjusted "stops" data value on (stripes:)'s gradients may seem ugly, but it leaves the possibility open for someday adding (repeating-gradient:), which would use the same {pixels,colour} names. Also fixed a long-standing bug where, due to a precedence conflict, writing something like `$a's stops's (1)` would cause a Javascript error.
-
- 25 Nov, 2020 1 commit
-
-
Leon Arnott authored
Added (button:), a styling changer for links, as well as added an optional "unavailable" text string argument to (link-storylet:). Having a drop-in styling option for links that makes them more closely resemble other contemporary IF engines' links has been something I've gradually accepted as desirable. That being said, getting this working with every kind of "link" in this engine has forced me to use a CSS class name (a namespace I'm loathe to use unnecessarily). I feel a bit more positive about (link-storylet:) now that the optional argument and the aformentioned changer are available. Also fixed a bug where (align:) would override (box:)'s width with its max-width.
-
- 22 Nov, 2020 1 commit
-
-
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.
-
- 15 Nov, 2020 1 commit
-
-
Leon Arnott authored
(click:), (mouseover:), and (mouseout:) now also take an optional changer or lambda with which to style their targets. Since these target multiple hooks/strings at once, they make also take a 'via' lambda similar to (enchant:), and unlike (link:).
-
- 14 Nov, 2020 1 commit
-
-
Leon Arnott authored
Added (link-storylet:). Also, link changers now accept an optional changer as their second argument, which is used to style the link and not the hook. After normalising the behaviour of the (link:) family of changers and other changers combined with them, I'd been stressing out about how to make (link:) links alterable with changers. This solution, the most direct one available, is a little uncomfortable to me because of how much further it differs from the command links' behaviour (as in, (link-goto:)). However, since those already have significant syntactic differences due to being commands rather than changers, I wonder if this divergence of usage might also assist in understanding how unalike they are. I don't feel very optimistic about (link-storylet:)'s behaviour when no storylet matches the given condition - just printing nothing - and might rework its arguments to make it easier to control what exactly it prints in any situation.
-
- 08 Nov, 2020 1 commit
-
-
Leon Arnott authored
Added column headers to the Debug Mode table panels, and added "Urgency" and "Exclusivity" columns to the Storylet panel. Also: * Altered the pseudo-element CSS for (click:), (mouseover:) and (mouseout:) to work correctly with the (box:) macro. * Markup that's inside the verbatim markup will no longer be syntax-highlighted as if it was outside it. * Fixed a few documentation mistakes.
-
- 04 Nov, 2020 1 commit
-
-
Leon Arnott authored
Added (urgency:) and (exclusivity:) metadata macros, which affect the (open-storylets:) array's contents when they are used in an open storylet. I plan to add a command macro or two to provide slightly easier consumption of the storylet array than just (open-storylets:), and an increase in accessibility will mean convenience macros like these will be helpful.
-
- 02 Nov, 2020 1 commit
-
-
Leon Arnott authored
I wanted to include a few very simple expressions alongside the typical data types, and these leveraged existing code nicely. Also: * Added a (checkbox:) input interface to the Input panel of The Harlowe Toolbar, which requires that a variable be bound to it. * Fixed some bugs elsewhere in the Toolbar. * Changed the styling for (text-style:"emboss") slightly, to more properly differentiate it from "shadow".
-
- 30 Oct, 2020 1 commit
-
-
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:).
-
- 27 Oct, 2020 1 commit
-
-
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.
-
- 26 Oct, 2020 1 commit
-
-
Leon Arnott authored
Adding some extra string and number utilities has been on my mind for awhile, but I've been less inclined to them until now due to the dry nature of implementing them. More will come soon, I believe.
-
- 24 Oct, 2020 1 commit
-
-
Leon Arnott authored
The big problem with this was that it involved the ability to create and remove any number of subrows (array elements) in which data could be placed, and how this interacted with the existing panel row infrastructure. That and styling, of course. But, I seem to have it in a usable spot at present. Also, now, (hook:) works correctly when given to (enchant:)
-
- 19 Oct, 2020 1 commit
-
-
Leon Arnott authored
Formerly, it wouldn't read the mouse coordinates correctly. Also added (bg:) as an alias for (background:), and added a few extra lines of documentation for plain variable markup.
-
- 17 Oct, 2020 1 commit
-
-
Leon Arnott authored
Fixed a bug where closing an (alert:), (confirm:) or (prompt:) dialog box when there was an (event:) hook in the passage would cause a crash. Closes #198.
-
- 16 Oct, 2020 1 commit
-
-
Leon Arnott authored
Added (trimmed:), a macro that removes instances of the given string pattern from the start and end of the given string (defaulting to whitespace if no pattern was given). Also fixed a bug in the previous commit.
-
- 15 Oct, 2020 1 commit
-
-
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.
-
- 11 Oct, 2020 1 commit
-
-
Leon Arnott authored
Added (link-style:), (line-style:) and (char-style:) as shorthands for using (enchant-in:) with ?Link, ?page's lines, and ?page's chars. I'd lately begun to feel that it was pretty silly that such useful functionality for line and char styling was locked behind such awkwardly esoteric devices as these hook data names. More relevantly, the arrival of (enchant-in:) resulted in some messy idioms resulting from it (You can't say "this hook's lines", for instance, and instead must specify the equivalent of "the page's lines which are in this hook") and those dearly needed some alternative. Also: * Fixed a bug where a "lines" enchantment would often cause text nodes within lines, such as the text of a (link:) link, to be transplanted out of any elements containing them. * Fixed a bug in the syntax highlighter (introduced a few commits ago) where whitespace at the start of a line would be incorrectly highlighted as an error even if it was inside a macro call.
-
- 28 Sep, 2020 1 commit
-
-
Leon Arnott authored
Added (link-fullscreen:), a macro to create a fullscreen mode toggle link, and a fullscreen sidebar button. I've done some thinking about fullscreen functionality lately, and I've decided that there isn't THAT much reason to give the author a good degree of control over the fullscreen state. Not only is it true that most browsers nowadays only allow fullscreen mode to be entered in rather specific circumstances, but, from a UX perspective, fullscreen mode should just be a user display option, and not a necessary narrative device that must be enabled to experience the story, and which can be enabled and disabled arbitrarily - which is how it is in most all desktop games. So, I've given up plans to add fullscreen utilities more precise that these. I don't feel very comfortable about the fullscreen button, and am likely to change it or make it optional/conditionally appendable (by the addition of explicit "icon" command macros that replicate sidebar buttons). Also made the syntax highlighter tooltips only appear after 90 milliseconds, so as to keep from cluttering the view as you type. Closes #35.
-
- 26 Sep, 2020 2 commits
-
-
Leon Arnott authored
The bulleted list, numbered list and heading markup has been fixed to permit multi-line markup (such as multi-line hooks) within it. Closes #106. Closes #141. Closes #153.
-
Leon Arnott authored
I decided that having the "hook" output be the default case is more in keeping with custom macros being proposed as a more useful alternative to (display:), and that creating a lot of data macros is a more advanced case, suited to people programming more sophisticated micro-engines in Harlowe. Also did some tweaks to the tooltips and The Harlowe Toolbar.
-
- 23 Sep, 2020 1 commit
-
-
Leon Arnott authored
The reason I'd been reticent to add (split:) for so long is that I needed to see exactly what string patterns would resemble before committing to this macro's type signature. Probably overprudent in retrospect, given how straightforward it ultimately is, but nevertheless, that is how it went. That being said, I also wonder if I should a "via" lambda to (joined:)'s signature as an alternative first parameter. Also: * Fixed a bug where (click:) and its ilk would cause a crash when given to (enchant:), similar to (link:) formerly. * Corrected some large factual errors in (folded:)'s documentation, as well as added some clarification. Closes #15.
-
- 21 Sep, 2020 1 commit
-
-
Leon Arnott authored
For a long time, the interaction between (link:) and other changers combined with it has been terribly inconsistent, with some changers applying to just the link, others to just the revealed hook, and most of them applying to both. I've decided after much heart-rending that I need to change this to a single hard-and-fast rule: changers combined with (link:) will only apply to the revealed hook, NOT the link. This is to allow (t8n:), (box:), (live:) and other hook-specific changers to interact with (link:) as expected, and also to make (link:) links more consistent with (click:) links. Sadly, of course, this means that (hover-style:), whose example usage involved combining it with (link:), has now had to have its intended uses rewritten. Also, the current means of applying changers to just the link is now limited to just (enchant:) and (enchant-in:), both of which are somewhat cumbersome. Possibly an (enchant-link:) or (enchant-link-in:) macro may need to be added to make this easier. Also fixed a bug where (for:) couldn't be attached to commands.
-
- 13 Sep, 2020 2 commits
-
-
Leon Arnott authored
Transferred all of the de-structuring functionality of (set:) and (put:) into a new (unpack:) macro, and renamed de-structuring to "unpacking", on the basis that it's simply too complicated a concept to have to saddle onto the basic (set:) macro and its documentation. I feel pretty satisfied with this - not just in the transferral of functionality, but also in the "unpack" name, which was what I'd been shopping for to make this concept more digestible to Harlowe end-users. Also fixed a couple of tests, and bugs in the previous commits.
-
Leon Arnott authored
Added (enchant-in:), a changer variation of (enchant:) which limits the enchantment to just the attached hook. I don't like this as the only source of restricted-effect enchantments/changes/revisions, mainly because it seems to illuminate that the hook selection syntax (?hook + ?hook, ?hook's 1st, etc.) needs to be extended to have the same flexibility as CSS selectors, at least. However, that will have to be left unconsidered for now, due to the weight of more pressing issues. I also am tempted to rename this to (enchant-here:), simply because the "in" doesn't have very smooth readability along with the arguments. But, "here" might not really suggest that it's a changer instead of a command, and the incompleteness of "in" does help with that... Also: * Fixed (source:)'s interaction with (text-colour:). * Added the "fade" (transition:), as an alias for "dissolve". * Added "New" badges to macros new to 3.2.0 in the documentation. * Worked on a few more tooltips for the syntax highlighter.
-
- 05 Sep, 2020 1 commit
-
-
Leon Arnott authored
A lot of work still needs to be done, mainly involving extracting the necessary definition text summaries from harloweDocs at compile time, as well as adding a lot of logic to decide which description certain tokens, like macros, should have in the tooltip. Also: * Renamed the 'newline' data name to 'linebreak', for consistency with how the rest of Harlowe's documentation describes newlines. * Added 'fade-up', 'fade-down', 'fade-left' and 'fade-right' transitions, which combine dissolves and slight shifts. You may notice an inconsistency between the word 'fade' and the 'dissolve' transition. I'm still musing on that one.
-
- 29 Aug, 2020 1 commit
-
-
Leon Arnott authored
This was added for consistency with hook markup, which offers a similar syntactic feature. I've also added a collapsing whitespace panel to The Harlowe Toolbar that uses this for code generation (though I wonder if it could be expanded a little to support (collapse:).)
-
- 28 Aug, 2020 1 commit
-
-
Leon Arnott authored
This was actually added so that The Harlowe Toolbar would have a slightly easier time generating correct code for "click the page to undo the turn". Also monkeyed with the syntax highlighter so that colour literals have a stripe of their colour beneath them (represented with a gradient background). Also fixed another bug in the previous commit's fix (for harlowedocs).
-
- 27 Aug, 2020 1 commit
-
-
Leon Arnott authored
Not too sure I'm entirely confident on the names, but I don't expect better ones to come to me easily. Also fixed some bugs in the previous commits.
-
- 24 Aug, 2020 2 commits
-
-
Leon Arnott authored
I've finally changed the behaviour of temp variables in hooks, removing the "shadowing" that attempting to change an outer hook's variable would cause. This, of course, comes with a number of concerns – the compatibility guarantee for external code pasted into a passage is no longer present, for instance - but I felt, after MUCH fretting, that it was necessary to finally make this behaviour lean into intuitions instead of away from them.
-
Leon Arnott authored
This meant adding yet another jQuery data() value to <tw-hook> elements, but there's really no other way around it.
-
- 19 Aug, 2020 1 commit
-
-
Leon Arnott authored
Added (append-with:), (prepend-with:) and (replace-with:) changers, counterparts to (append:), (prepend:) and (replace:). Also added a colour selector element to the borders pane of The Harlowe Toolbar.
-
- 17 Aug, 2020 1 commit
-
-
Leon Arnott authored
Added (p-ins:) a case-insensitive version of (p:) that converts all subpatterns given to it to case-insensitivity. This took no small amount of ardour to work out the implementation details, but is stable now. Also added the datatype "anycase", which is a more sensible case-insensitive version of uppercase and lowercase.
-
- 06 Aug, 2020 1 commit
-
-
Leon Arnott authored
This should complete the implemented functionality of spread datatypes.
-
- 05 Aug, 2020 1 commit
-
-
Leon Arnott authored
This replaces "spread typedvars" with a more general concept. The most bothersome part of this - array destructuring compatibility - has yet to be implemented, however. In order to make this work, the specificity of ... needed to be changed. Hopefully, as it's an otherwise limited operator, this won't have any deleterious effects. Also added (datatype:) and (datapattern:).
-
- 03 Aug, 2020 1 commit
-
-
Leon Arnott authored
-
- 31 Jul, 2020 1 commit
-
-
Leon Arnott authored
This took a lot of sweat (in both the labour and terror senses) and required some small compromises (such as forbidding captures in optional positions), but it seems to be functional and, importantly, reasonably consistent with (a:) patterns now. Also added the "digit" datatype.
-
- 28 Jul, 2020 1 commit
-
-
Leon Arnott authored
This has been a long time coming, but I've finally gotten the data model of this environment worked out to add these now. Here are just the first few macros, though enough additional ones to support the feature set of JS RegExps are on the way. Closes #30.
-
- 25 Jul, 2020 1 commit
-
-
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.
-