Skip to content

Commit

Permalink
Merge pull request #370 from ffbeso/WindowAlpha
Browse files Browse the repository at this point in the history
ありがとうございます。

Added WindowAlpha add-on
  • Loading branch information
tablacus authored Feb 21, 2024
2 parents 6f2403a + ca8af82 commit 1e56dd5
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions windowalpha/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<TablacusExplorer>
<General>
<Version>1.00</Version>
<MinVersion>2022.2.5</MinVersion>
<pubDate>Tue Feb 13 2024 00:00:00 GMT</pubDate>
<Options>Common:0:0</Options>
<Level>2</Level>
<Creator>Sho Nitta</Creator>
<URL>https://tablacus.github.io/TablacusExplorerAddons/</URL>
<License>MIT License</License>
</General>
<en>
<Name>Window Alpha</Name>
<Description>Window Alpha Setting</Description>
</en>
<ja>
<Name>ウィンドウ透過</Name>
</ja>
</TablacusExplorer>
9 changes: 9 additions & 0 deletions windowalpha/options.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<br>
<table style="width: 100%">
<tr>
<td style="white-space: nowrap;"><label>@mspaint.exe,-23202[Transparent]</label></td>
<td style="text-align: center; width: 100%" id="rangeValue"></td>
<td style="white-space: nowrap"><label>@mspaint.exe,-23201[Opaque]</label></td>
</tr>
</table>
<input type="range" name="Alpha" min="1" max="255" style="width: 100%" oninput="document.getElementById('rangeValue').textContent = this.value;">
12 changes: 12 additions & 0 deletions windowalpha/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const Addon_Id = "windowalpha";
const item = GetAddonElement(Addon_Id);

if (window.Addon == 1) {
AddEvent("Arrange", async function (Ctrl, rc) {
SetWindowAlpha(ui_.hwnd, item.getAttribute("Alpha") || 230);
ui_.Show = 2;
});
} else {
SetTabContents(0, "", await ReadTextFile("addons\\" + Addon_Id + "\\options.html"));
document.getElementById('rangeValue').textContent = item.getAttribute("Alpha");
}

0 comments on commit 1e56dd5

Please sign in to comment.