This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Style | |
x:Key="ButtonFocusVisual"> | |
<Setter | |
Property="Control.Template"> | |
<Setter.Value> | |
<ControlTemplate> | |
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2" /> | |
</ControlTemplate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: StoryTitle | |
SugarCube i18n example | |
:: Language Switching [script] | |
;(function () { | |
/*********************************************************** | |
Set up a `i18n` object on SugarCube's `setup` object. | |
***********************************************************/ | |
setup.i18n = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Story JavaScript [script] | |
postdisplay['scroll-box'] = function (taskName) { | |
setTimeout(function () { | |
$('.scroll-box').each(function () { | |
var $this = $(this); | |
$this.scrollTop($this.prop('scrollHeight') - $this.height()); | |
}); | |
}, Engine.minDomActionDelay); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Move the UI bar to the right side. | |
*/ | |
#story { | |
margin-left: 2.5em; | |
margin-right: 20em; | |
transition: none; | |
transition: margin-right 200ms ease-in; | |
} | |
#ui-bar.stowed ~ #story { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: StoryTitle | |
SugarCube i18n example | |
:: Language Switching [script] | |
;(function () { | |
/*********************************************************** | |
Set up a `i18n` object on SugarCube's `setup` object. | |
***********************************************************/ | |
setup.i18n = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! t8n-typewriter module for SugarCube v2 */ | |
!function(){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),Furl=function(){function Furl(current,append){if(_classCallCheck(this,Furl),Object.defineProperties(this,{node:{value:current},childNodes:{value:[]},value:{writable:!0,value:""},append:{writable:!0,value:!!append},abortTyping:{writable:!0,value:!1}}),this.node.nodeValue&&(this.value=this.node.nodeValue,this.node.n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''''''''''''''''' | |
'basic attributes' | |
'''''''''''''''''' | |
'setup for the basic attributes & (optionally) Tech Level | |
CurrentY = CurrentTop | |
StatLeft = CurrentLeft | |
StatRight = StatLeft + SubColWidth | |
'print the basic attributes | |
PrimaryStats_RenderItem "ST", StatLeft, StatRight, StatHeight, True, True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! <<textboxplus>> macro for SugarCube v2 */ | |
!function(){"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj};if("undefined"==typeof version||void 0===version.title||"SugarCube"!==version.title||void 0===version.major||version.major<2||void 0===version.minor||version.minor<22)throw new Error("<<textboxplus>> macro requires SugarCube 2.22.0 or greater, aborting load");Macro.add("textboxplus",{isAsync:!0,tags:null,handler:function(){var _this=this;if(this.args.length<2){var errors=[];return this.args.length<1&&errors.push("variable name"),this.args.length<2&&errors.push("default value"),this.error("no "+errors.join(" or ")+" specified")}if("string"!=typeof this.args[0])return this.error("variable name argument is not a string");var varName=this.args[0].trim();if("$"!==varName[0]&&"_"!==varName[0])return this.error('variable n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Macro.add('scene', { | |
tags : null, | |
handler : function () { | |
/* Argument sanity checking. */ | |
// Extend our execution context with the `_scene` object so our | |
// descendants may share state, by looking up our context. | |
Object.defineProperty(this, '_scene', { | |
value : /* Whatever you need to share, probably an object. */ | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Functions to covert binary text to Unicode. | |
setup.latin1FromBinary(inputString) | |
Param: `inputString` - Binary string to convert (1-byte per char). | |
Returns: The converted Unicode string. | |
setup.unicodeFromBinary(inputString) → Unicode string. | |
Param: `inputString` - Binary string to convert (2-bytes per char). | |
Returns: The converted Unicode string. |
OlderNewer