Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; --- Settings ---
- W := 80 ; Width of the LOCK button
- H := 30 ; Height
- LineW := 2 ; Black divider line
- CloseW := 25 ; Width of the X button
- TotalW := W + LineW + CloseW
- Gui, 1:+AlwaysOnTop -Caption +ToolWindow +Border
- ; 1. Main Toggle Zone (Left)
- Gui, 1:Color, Green
- Gui, 1:Font, s14 Bold cWhite, Arial
- Gui, 1:Add, Text, x0 y0 w%W% h%H% Center 0x200 gToggleTouch vStatusText, LOCK
- ; 2. Black Divider Line
- Gui, 1:Add, Progress, x%W% y0 w%LineW% h%H% cBlack, 100
- ; 3. Close Zone (Right)
- Gui, 1:Add, Text, % "x" W + LineW " y0 w" CloseW " h" H " Center 0x200 Background666666 gGuiClose", X
- Gui, 1:Show, x5 y5 w%TotalW% h%H%, TouchToggle
- return
- ToggleTouch:
- toggled := !toggled
- if (toggled) {
- ; --- SHIELD 1: Everything to the right of the buttons ---
- Gui, 2:+AlwaysOnTop -Caption +ToolWindow +LastFound
- WinSet, Transparent, 1
- Gui, 2:Color, Black
- ; Starts at the end of the buttons, covers the rest of the width
- Gui, 2:Show, % "x" TotalW + 107 " y0 w" A_ScreenWidth " h" A_ScreenHeight, ShieldRight
- ; --- SHIELD 2: Everything below the buttons ---
- Gui, 3:+AlwaysOnTop -Caption +ToolWindow +LastFound
- WinSet, Transparent, 1
- Gui, 3:Color, Black
- ; Starts below the buttons, covers the full screen height remaining
- Gui, 3:Show, % "x0 y" H + 107 " w" TotalW + 5 " h" A_ScreenHeight, ShieldBottom
- Gui, 1:Color, Red
- GuiControl, 1:, StatusText, UNLOCK
- } else {
- Gui, 2:Destroy
- Gui, 3:Destroy
- Gui, 1:Color, Green
- GuiControl, 1:, StatusText, LOCK
- }
- return
- f1::
- GuiClose:
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment