Browse Source

ネスト

main
Miteruzo 1 year ago
parent
commit
07dac78ea9
1 changed files with 23 additions and 15 deletions
  1. +23
    -15
      main.hsp

+ 23
- 15
main.hsp View File

@@ -58,26 +58,30 @@
buf = ""
GetWindowText hWindow, VarPtr (buf), 256

If (IsWindowVisible (hWindow) != False) And (StrLen (buf) != 0) {
hWindows.windowCnt = hWindow
GetWindowRect hWindow, VarPtr (windowRects.0.windowCnt)
If IsWindowVisible (hWindow) {
If StrLen (buf) != 0 {
hWindows.windowCnt = hWindow
GetWindowRect hWindow, VarPtr (windowRects.0.windowCnt)

windowCnt++
windowCnt++
}
}

hWindowBefore = hWindow
Loop

If GetKey2 (KEY_MOUSE_L) {
If moving {
nizikaX = LimitF (mouseX - offsetX, -NIZIKA_LEFT, gInfo_dispX - NIZIKA_RIGHT)
nizikaY = LimitF (mouseY - offsetY, Null, gInfo_dispY - NIZIKA_BASE)
}
Else {
moving = True
If gInfo_act = SCREEN_MAIN {
If moving {
nizikaX = LimitF (mouseX - offsetX, -NIZIKA_LEFT, gInfo_dispX - NIZIKA_RIGHT)
nizikaY = LimitF (mouseY - offsetY, Null, gInfo_dispY - NIZIKA_BASE)
}
Else {
moving = True

offsetX = Double (mouseX - nizikaX)
offsetY = Double (mouseY - nizikaY)
offsetX = Double (mouseX - nizikaX)
offsetY = Double (mouseY - nizikaY)
}
}
}
Else: If moving {
@@ -97,9 +101,13 @@
base = gInfo_dispY

Repeat windowCnt
If (windowRects.0.cnt <= nizikaX + (NIZIKA_WIDTH - NIZIKA_LEFT)) And (nizikaX + NIZIKA_LEFT < windowRects.2.cnt) {
If (nizikaY + NIZIKA_BASE <= windowRects.1.cnt) And (windowRects.1.cnt < base) {
base = windowRects.1.cnt
If windowRects.LEFT.cnt <= nizikaX + (NIZIKA_WIDTH - NIZIKA_LEFT) {
If nizikaX + NIZIKA_LEFT < windowRects.RIGHT.cnt {
If nizikaY + NIZIKA_BASE <= windowRects.TOP.cnt {
If windowRects.TOP.cnt < base {
base = windowRects.TOP.cnt
}
}
}
}
Loop


Loading…
Cancel
Save