diff --git a/icon/selection-area_2.svg b/icon/selection-area_2.svg new file mode 100644 index 0000000..e516f8d --- /dev/null +++ b/icon/selection-area_2.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index 5efd63b..831f930 100644 --- a/index.html +++ b/index.html @@ -588,6 +588,18 @@ height: 30px; background-repeat: no-repeat; } + .svgButton { + font-family: Arial, Verdana; + + background-color: #777; + background-size: 30px; + width: 30px; + height: 30px; + background-repeat: no-repeat; + } + .selectionAreaButton { + background-image: url(./icon/selection-area_2.svg); + } .interrogateButton { font-family: Arial, Verdana; background-image: url(./icon/writing-icon.svg); @@ -699,6 +711,19 @@ color: white; } */ + @@ -2047,8 +2072,7 @@ > + +
+ + + + + + + + + + + + +
+ + + diff --git a/index.js b/index.js index 3778421..a6b2cd6 100644 --- a/index.js +++ b/index.js @@ -2761,9 +2761,8 @@ document.querySelector('#mModelsMenu').addEventListener('change', (evt) => { sdapi.requestSwapModel(g_model_title) }) //REFACTOR: move to events.js -document - .getElementById('btnLayerToSelection') - .addEventListener('click', async () => { +document.querySelectorAll('.btnLayerToSelection').forEach((el) => { + el.addEventListener('click', async () => { try { const isSelectionAreaValid = await psapi.checkIfSelectionAreaIsActive() @@ -2777,6 +2776,8 @@ document console.warn(e) } }) +}) + //REFACTOR: move to events.js document .getElementById('btnSetInitImageViewer') diff --git a/manifest.json b/manifest.json index 1a3db05..4f60a31 100644 --- a/manifest.json +++ b/manifest.json @@ -36,7 +36,7 @@ "entrypoints": [ { "type": "panel", - "id": "vanilla", + "id": "main_panel", "label": { "default": "Auto-Photoshop-SD", "en-US": "Auto-Photoshop-SD", @@ -85,6 +85,110 @@ ] } ] + }, + { + "type": "panel", + "id": "second_panel", + "label": { + "default": "Second Auto-Photoshop-SD", + "en-US": "Second Auto-Photoshop-SD", + "es-ES": "Second Auto-Photoshop-SD" + }, + "minimumSize": { + "width": 100, + "height": 100 + }, + "maximumSize": { + "width": 1200, + "height": 10000 + }, + "preferredDockedSize": { + "width": 150, + "height": 800 + }, + "preferredFloatingSize": { + "width": 300, + "height": 800 + }, + "commands": [ + { + "id": "show_alert", + "label": { + "default": "Show Alert", + "en-US": "Show Alert (US)", + "es-ES": "Show Alert (ES)" + } + } + ], + "icons": [ + { + "width": 23, + "height": 23, + "path": "icon/panel.png", + "scale": [ + 1, + 2 + ], + "theme": [ + "all" + ], + "species": [ + "chrome" + ] + } + ] + }, + { + "type": "panel", + "id": "toolbar", + "label": { + "default": "toolbar Auto-Photoshop-SD", + "en-US": "toolbar Auto-Photoshop-SD", + "es-ES": "toolbar Auto-Photoshop-SD" + }, + "minimumSize": { + "width": 30, + "height": 100 + }, + "maximumSize": { + "width": 1200, + "height": 10000 + }, + "preferredDockedSize": { + "width": 30, + "height": 800 + }, + "preferredFloatingSize": { + "width": 30, + "height": 800 + }, + "commands": [ + { + "id": "show_alert", + "label": { + "default": "Show Alert", + "en-US": "Show Alert (US)", + "es-ES": "Show Alert (ES)" + } + } + ], + "icons": [ + { + "width": 23, + "height": 23, + "path": "icon/panel.png", + "scale": [ + 1, + 2 + ], + "theme": [ + "all" + ], + "species": [ + "chrome" + ] + } + ] } ], "icons": [