Skip to content

Instantly share code, notes, and snippets.

tmedwards

Block or report user

Report or block tmedwards

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tmedwards
tmedwards / snippet-phoenix-with-qn-qp.gcs
Created May 1, 2019
Code snippet to add QN/QP to the core attribute section of the Phoenix character sheet for GCA4.
View snippet-phoenix-with-qn-qp.gcs
''''''''''''''''''
'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
@tmedwards
tmedwards / t8n-typewriter-module-for-sugarcube-v2.js
Created Aug 9, 2018
t8n-typewriter module for SugarCube v2
View t8n-typewriter-module-for-sugarcube-v2.js
/*! 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
@tmedwards
tmedwards / sc-i18n-example-2.twee
Last active Jul 26, 2018
SugarCube v2 basic internationalization (i18n) example using a switching method (in Twee notation)
View sc-i18n-example-2.twee
:: StoryTitle
SugarCube i18n example
:: Language Switching [script]
;(function () {
/***********************************************************
Set up a `i18n` object on SugarCube's `setup` object.
***********************************************************/
setup.i18n = {
@tmedwards
tmedwards / move-ui-bar-right.css
Last active Jan 24, 2018
Move the SugarCube v2 UI bar to the right side.
View move-ui-bar-right.css
/*
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 {
@tmedwards
tmedwards / scroll-to-element-bottom.twee
Created Jan 2, 2018
Scrolls element(s), which are set to scroll, to the their bottoms.
View scroll-to-element-bottom.twee
:: 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);
};
@tmedwards
tmedwards / sc-i18n-example.twee
Last active Jul 26, 2018
SugarCube v2 basic internationalization (i18n) example using the Settings menu (in Twee notation)
View sc-i18n-example.twee
:: StoryTitle
SugarCube i18n example
:: Language Switching [script]
;(function () {
/***********************************************************
Set up a `i18n` object on SugarCube's `setup` object.
***********************************************************/
setup.i18n = {
@tmedwards
tmedwards / gist:885afc1a71fd0cace9d2
Last active Aug 29, 2015 — forked from alimbada/gist:3083937
Metro Style for WPF Button
View gist:885afc1a71fd0cace9d2
<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>
You can’t perform that action at this time.