ThePix / QuestJS

A major re-write of Quest that is written in JavaScript and will run in the browser.
MIT License
66 stars 13 forks source link

[Add function] Function CreatePaneBox() #31

Closed DakinQuelia closed 3 years ago

DakinQuelia commented 3 years ago

Hello,

I've created a little function to make a pane box :

function createPaneBox(position, title, content) 
{
    $("div.pane-div:nth-child(" + position + ")").before('<div class="pane-div"><h4 class="side-pane-heading">' + title + '</h4><div class="pane-content">' + content + '</div></div>');
}

Example :

createPaneBox(2, "Mon test", "Blabla")

Picture in next post.

Best regards

DakinQuelia commented 3 years ago

03

ThePix commented 3 years ago

Thanks. It had crossed my mind that something like this would be useful. It is in the latest upload.

ThePix commented 3 years ago

Documentation added: https://github.com/ThePix/QuestJS/wiki/Additional-Side-Pane