By continuing to use the site, you agree to the use of cookies. You can find out more by following this link. I Accept
navi icon
Hint: new features are available. You can upload and download your drafts to your dropbox account.
2014-07-05 01:24:37 Recently I've done some work on the draftercraft tool.
I hope you do not have problems with the ssl certificate.
Please accept it, if so and send me some feedback.

The menu in the editor has a new more clear structure.

Currently I'm working on the extension mechanics and
a game. Not the help - but I would like to get feedback on the help
anyway. Help for the help so to say.

I've finished the build option, not really but somehow.
If you have chosen the 'editor source' option now it is delivering
a complete HTML file with the required elements inside the body.
Hint: if you want to add a button, add it to the 'editorBar'
if you want to add a button group, create a span with an id
something like 'myButtonGroup', add the buttons to the span,
add the span to the 'editorBar'.

Here are the code snippets:

//createElement is a  short hand for document.createElement
var child = createElement('button');
//the button needs a label
//so is createTextNode a short hand for
//if you are not sure the short hand might work or not you
//always should use document.createTextNode etc.
child.appendChild(createTextNode('my button'));
//if you create an element,
//be smart and give it an unique id
child.setAttribute('id', 'myButton');
//at least we want to do something
child.setAttribute('onclick', 'myFunction();');
//do not forget to append the new child to the document

Snippet two:

//creating the first child
var child = createElement('span');
child.setAttribute('id', 'myButtonGroup');
//adding two buttons
var child2 = createElement('button');
child.appendChild(createTextNode('my button one'));
child.setAttribute('id', 'myButtonOne');
child.setAttribute('onclick', 'myFunction();');
//you need to add the second child to the first before
//you can reuse the second one
child2 = createElement('button');
child.appendChild(createTextNode('my button two'));
child.setAttribute('id', 'myButtonTwo');
child.setAttribute('onclick', 'notMyFunction();');

Share the article: 

comments powered by Disqus
Even more brains 2 exit

Even more brains 2 exit

A little sell-fishy note about quests. Part four of sketches in code.

GDC 2015 Adventures In Text

GDC 2015 Adventures In Text

Some more rough notes