add: debug msg in alpha

This commit is contained in:
ShuheiKubota 2019-11-18 13:45:12 +09:00
parent d0b7427efd
commit 0d68f33cd6

View file

@ -1,6 +1,10 @@
package main package main
import "errors" import (
"errors"
"github.com/shu-go/rog"
)
type alphaCmd struct { type alphaCmd struct {
} }
@ -11,6 +15,9 @@ func (c alphaCmd) Run(args []string, g globalCmd) error {
} }
alpha := toInt(args[0], 255) alpha := toInt(args[0], 255)
if g.Debug {
rog.Printf("alpha = %v -> %v", args[0], alpha)
}
style, _, _ := getWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE) style, _, _ := getWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE)
setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style|WS_EX_LAYERED) setWindowLong.Call(uintptr(g.targetHandle), GWL_EXSTYLE, style|WS_EX_LAYERED)