diff --git a/css/style.css b/css/style.css index a97fdd1..8086a5f 100644 --- a/css/style.css +++ b/css/style.css @@ -162,6 +162,15 @@ input:checked.sectionToggle + div { display: none; } +.danger { + background: #ff6000 !important; +} + +.danger:before { + content: '!!'; + background: #ff6000; +} + body { margin: 40px auto; max-width: 1300px; diff --git a/js/dllpatcher.js b/js/dllpatcher.js index b4183e6..853165f 100644 --- a/js/dllpatcher.js +++ b/js/dllpatcher.js @@ -67,6 +67,7 @@ class StandardPatch { this.name = options.name; this.patches = options.patches; this.tooltip = options.tooltip; + this.danger = options.danger; } createUI(parent) { @@ -79,6 +80,9 @@ class StandardPatch { if(this.tooltip) { patch.appendChild(createElementClass('div', 'tooltip', this.tooltip)); } + if(this.danger) { + patch.appendChild(createElementClass('div', 'danger tooltip', this.danger)); + } parent.appendChild(patch); } @@ -137,6 +141,7 @@ class DynamicPatch { this.name = options.name; this.patches = options.patches; this.tooltip = options.tooltip; + this.danger = options.danger; this.mode = options.mode; this.target = options.target; } @@ -151,6 +156,9 @@ class DynamicPatch { if(this.tooltip) { this.ui.appendChild(createElementClass('div', 'tooltip', this.tooltip)); } + if(this.danger) { + this.ui.appendChild(createElementClass('div', 'danger tooltip', this.danger)); + } parent.appendChild(this.ui); } @@ -401,6 +409,7 @@ class UnionPatch { this.offset = options.offset; this.patches = options.patches; this.tooltip = options.tooltip; + this.danger = options.danger; } createUI(parent) { @@ -412,6 +421,9 @@ class UnionPatch { if(this.tooltip) { container.appendChild(createElementClass('div', 'tooltip', this.tooltip)); } + if(this.danger) { + container.appendChild(createElementClass('div', 'danger tooltip', this.danger)); + } container.appendChild(document.createElement('span')); for(var i = 0; i < this.patches.length; i++) { @@ -428,6 +440,9 @@ class UnionPatch { if(patch.tooltip) { patchDiv.appendChild(createElementClass('div', 'tooltip', patch.tooltip)); } + if(patch.danger) { + patchDiv.appendChild(createElementClass('div', 'danger tooltip', patch.danger)); + } container.appendChild(patchDiv); } parent.appendChild(container); @@ -475,6 +490,7 @@ class NumberPatch { constructor(options) { this.name = options.name; this.tooltip = options.tooltip; + this.danger = options.danger; this.offset = options.offset; this.size = options.size; @@ -503,6 +519,9 @@ class NumberPatch { if (this.tooltip) { patch.appendChild(createElementClass('div', 'tooltip', this.tooltip)); } + if (this.danger) { + patch.appendChild(createElementClass('div', 'danger tooltip', this.danger)); + } parent.appendChild(patch); }