naja das Funktioniert doch genauso nur eben statt Größer muss der absand von r Außerer Kreis - r innerer Kreis kleiner sein.
hier mal ein kleines bsp.
Spoiler anzeigen
#Include <GDIPlus.au3>
#include <GUIScrollBars.au3>
#include <ScrollBarConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstants.au3>
#include <GUIConstantsEx.au3>
#include <StructureConstants.au3>
#include <MyHover.au3> ;MyHover include
#include <Array.au3>
#include<String.au3>
#Include <Date.au3>
HotKeySet("{UP}","UP")
HotKeySet("{DOWN}","DOWN")
HotKeySet("{LEFT}","LEFT")
HotKeySet("{RIGHT}","RIGHT")
Opt("GUIOnEventMode",1)
[/autoit] [autoit][/autoit] [autoit]Global $hGraphics, $hBitmap, $hBuffer, $hBGBrush, $hKRBrush, $hBGKRBrush
[/autoit] [autoit][/autoit] [autoit]Global $iXPos = 0, $iYPos = 0, $KgID
[/autoit] [autoit][/autoit] [autoit]Global $GUIWidth = 300
Global $GUIHeight = 300
Global $aKrPos[4] = ["100","200","50","50"]
Global $MxKrPos = $aKrPos[0] + $aKrPos[2]/2
Global $MyKrPos = $aKrPos[1] + $aKrPos[3]/2
Global Const $rKr = $aKrPos[2]/2
Global $aBgKrPos[4] = ["0","0",$GUIWidth,$GUIHeight]
Global Const $MxBgKrPos = $aBgKrPos[0] + $aBgKrPos[2]/2
Global Const $MyBgKrPos = $aBgKrPos[1] + $aBgKrPos[3]/2
Global Const $rBgKr = $aBgKrPos[2]/2
$GUI = GUICreate("Test",$GUIWidth,$GUIHeight)
Global $hGUI = WinGetHandle($GUI)
GUISetOnEvent(-3,"_exit")
GUISetState()
Draw()
While 1
Sleep(100)
schnittpunkt()
WEnd
Func UP()
$iYPos -= 1
EndFunc
Func DOWN()
$iYPos += 1
EndFunc
Func LEFT()
$iXPos -= 1
EndFunc
Func RIGHT()
$iXPos += 1
EndFunc
Func Draw()
_GDIPlus_Startup()
$hGraphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($GUIWidth, $GUIHeight, $hGraphics)
$hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
$hBGBrush = _GDIPlus_BrushCreateSolid("0x" & Hex(255, 2) & Hex(150, 2) & Hex(150, 2) & Hex(150, 2))
$hBGKRBrush = _GDIPlus_BrushCreateSolid("0x" & Hex(255, 2) & Hex(250, 2) & Hex(250, 2) & Hex(250, 2))
$hKRBrush = _GDIPlus_BrushCreateSolid("0x" & Hex(255, 2) & Hex(50, 2) & Hex(50, 2) & Hex(50, 2))
_GDIPlus_GraphicsfillRect($hBuffer, 0, 0, $GUIWidth, $GUIHeight, $hBGBrush);=>Backround
_GDIPlus_GraphicsFillEllipse($hBuffer, $aBgKrPos[0], $aBgKrPos[1], $aBgKrPos[2], $aBgKrPos[3], $hBGKRBrush)
_GDIPlus_GraphicsFillEllipse($hBuffer, $aKrPos[0], $aKrPos[1], $aKrPos[2], $aKrPos[3], $hKRBrush)
[/autoit] [autoit][/autoit] [autoit]$Standar_damit_ich_2_hab = GUI_Register_Hover($hGUI, 0, 0, 1, 1,"hover", "leave",1,1)
$KgID = GUI_Register_Hover($hGUI, $aKrPos[0], $aKrPos[1], $aKrPos[2], $aKrPos[3],"hover", "leave",1,1)
_GDIPlus_GraphicsDrawImageRect($hGraphics,$hBitmap,0,0,$GUIWidth, $GUIHeight)
AdlibRegister("Redraw",10)
EndFunc
Func schnittpunkt()
If $rBgKr - $rKr < sqrt(($MxBgKrPos-$MxKrPos)^2+($MyBgKrPos-$MyKrPos)^2) Then MsgBox(0,"","")
EndFunc
Func Redraw()
GUI_Register_Set_Pos($KgID, $aKrPos[0] + $iXPos, $aKrPos[1] + $iYPos, $aKrPos[2], $aKrPos[3], 0)
_GDIPlus_GraphicsClear($hBuffer, 0xFF000000)
_GDIPlus_GraphicsfillRect($hBuffer, 0, 0, $GUIWidth, $GUIHeight, $hBGBrush);=>Backround
_GDIPlus_GraphicsFillEllipse($hBuffer, 0, 0, $GUIWidth, $GUIHeight, $hBGKRBrush)
_GDIPlus_GraphicsFillEllipse($hBuffer, $aKrPos[0] + $iXPos, $aKrPos[1] + $iYPos, $aKrPos[2], $aKrPos[3], $hKRBrush)
_GDIPlus_GraphicsDrawImageRect($hGraphics,$hBitmap,0,0,$GUIWidth, $GUIHeight)
$MxKrPos = ($aKrPos[0] + $iXPos) + $aKrPos[2]/2
$MyKrPos = ($aKrPos[1] + $iYPos) + $aKrPos[3]/2
EndFunc
Func _exit()
Exit
EndFunc