;########################################################### ;# (sinnlose) UDF um mit Controls zu zeichnen # ;# by campweb # ;########################################################### ;########################################################### ; Funktion zum Zeichnen mit Buttons ; $Farbe = Vordefinierte Farben oder Codes ; $x1, $y1, $x2, $y2 Sind die Koordinaten der Zeichenfläche Func Pen_RoundSquare($Farbe, $x1 = 0, $y1 = 625, $x2 = 0, $y2 = 443) While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf If MouseGetPos(0) > $x1 and MouseGetPos(0) < $y1 and MouseGetPos(1) > $x2 and MouseGetPos(1) < $y2 Then GUICtrlCreateButton("", MouseGetPos(0), MouseGetPos(1), 14, 14) GUICtrlSetBkColor(-1, $Farbe) Else MouseGetPos(1) EndIf WEnd EndFunc ;########################################################### ;########################################################### ; Funktion zum Zeichnen mit Checkboxen die Erste ; $Farbe = Vordefinierte Farben oder Codes ; $x1, $y1, $x2, $y2 Sind die Koordinaten der Zeichenfläche ; $Checked = gehackt oder nicht? Func Pen_DeepSquare($Farbe, $Checked = 1, $x1 = 0, $y1 = 625, $x2 = 0, $y2 = 443) While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf If MouseGetPos(0) > $x1 and MouseGetPos(0) < $y1 and MouseGetPos(1) > $x2 and MouseGetPos(1) < $y2 Then GUICtrlCreateCheckbox("", MouseGetPos(0), MouseGetPos(1), 14, 14) GUICtrlSetBkColor(-1, $Farbe) If $Checked = 1 Then GUICtrlSetState(-1, $GUI_CHECKED) EndIf Else MouseGetPos(1) EndIf WEnd EndFunc ;########################################################### ;########################################################### ; Funktion zum Zeichnen mit Radio´s ; $Farbe = Vordefinierte Farben oder Codes ; $x1, $y1, $x2, $y2 Sind die Koordinaten der Zeichenfläche Func Pen_Ellipse($Farbe, $x1 = 0, $y1 = 625, $x2 = 0, $y2 = 443); Farbiges Rechteck mit weißem Kreis :D While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf If MouseGetPos(0) > $x1 and MouseGetPos(0) < $y1 and MouseGetPos(1) > $x2 and MouseGetPos(1) < $y2 Then GUICtrlCreateRadio("", MouseGetPos(0), MouseGetPos(1), 14, 14) GUICtrlSetBkColor(-1, $Farbe) Else MouseGetPos(1) EndIf WEnd EndFunc ;########################################################### ;########################################################### ; Funktion zum Zeichnen mit Edit´s :D ; $Farbe = Vordefinierte Farben oder Codes ; $x1, $y1, $x2, $y2 Sind die Koordinaten der Zeichenfläche Func Pen_Square($Farbe, $x1 = 0, $y1 = 625, $x2 = 0, $y2 = 443); Quadrat ohne Umrandung While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf If MouseGetPos(0) > $x1 and MouseGetPos(0) < $y1 and MouseGetPos(1) > $x2 and MouseGetPos(1) < $y2 Then GUICtrlCreateEdit("", MouseGetPos(0), MouseGetPos(1), 14, 14) GUICtrlSetBkColor(-1, $Farbe) Else MouseGetPos(1) EndIf WEnd EndFunc ;########################################################### ;########################################################### ; Funktion zum Zeichnen mit ListView´s (Der da oben weiß warum! :D) ; $Farbe = Vordefinierte Farben oder Codes ; $x1, $y1, $x2, $y2 Sind die Koordinaten der Zeichenfläche Func Pen_BorderSquare($Farbe, $x1 = 0, $y1 = 625, $x2 = 0, $y2 = 443); Quadrat mit Umrandung While 1 If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit EndIf If MouseGetPos(0) > $x1 and MouseGetPos(0) < $y1 and MouseGetPos(1) > $x2 and MouseGetPos(1) < $y2 Then GUICtrlCreatelistView("", MouseGetPos(0), MouseGetPos(1), 14, 14) GUICtrlSetBkColor(-1, $Farbe) Else MouseGetPos(1) EndIf WEnd EndFunc ;###########################################################