This is what i got by now.
Code:
#include <GDIPlus.au3>
#include <Misc.au3>
AutoItSetOption("MouseCoordMode",2)
Global const $width = 600
Global const $height = 300
$GUI = GUICreate("", $width, $height)
GUISetState()
_GDIPlus_Startup()
$hGraphic = _GDIPlus_GraphicsCreateFromHWND($GUI)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic)
$hBackBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
#Region BOX - named box but its a rectangle lol :v
Global $BoxData[0][3];x,y,data[] -data is string to draw info
Global Const $BoxW = $width ;fill gui width
Global Const $BoxH = $height / 3 ;3 box visible at same time
Global $boxBrush = _GDIPlus_BrushCreateSolid(0xFFFFFFFF) ;box color
$hBrush = _GDIPlus_BrushCreateSolid(0xFF00007F) ;string color
$hFormat = _GDIPlus_StringFormatCreate()
_GDIPlus_StringFormatSetAlign($hFormat, 1) ;center string
$hFamily = _GDIPlus_FontFamilyCreate("Showcard Gothic")
$hFont = _GDIPlus_FontCreate($hFamily, 16, 2)
Func newBox($Xo, $Yo) ;add element to box array
ReDim $BoxData[UBound($BoxData) + 1][3]
$BoxData[UBound($BoxData) - 1][0] = $Xo
$BoxData[UBound($BoxData) - 1][1] = $Yo
EndFunc ;==>newBox
Func setBoxData($data, $index)
$BoxData[$index][2] = $data
EndFunc ;==>setBoxData
Func getBoxY($index)
Return $BoxData[$index][1]
EndFunc ;==>getBoxY
Func getBoxData($index)
Return $BoxData[$index][2]
EndFunc ;==>getBoxData
Func drawText($x, $y, $string) ;draw string in rect
$tLayout = _GDIPlus_RectFCreate($x, $y, $BoxW, 0)
$aInfo = _GDIPlus_GraphicsMeasureString($hBackBuffer, $string, $hFont, $tLayout, $hFormat)
_GDIPlus_GraphicsDrawStringEx($hBackBuffer, $string, $hFont, $aInfo[0], $hFormat, $hBrush)
EndFunc ;==>drawText
Func boxRender($index)
Local $data, $x, $y
$x = 0 ;always 0...
$y = getBoxY($index)
If ($y + $BoxH >= 0 And $y <= $height) Then ;render visible ones
$data = getBoxData($index)
_GDIPlus_GraphicsFillRect($hBackBuffer, $x, $y, $BoxW, $BoxH, $boxBrush) ;draw white box
drawText($x, $y + $BoxH / 4, $data[0]) ;title
EndIf
EndFunc ;==>boxRender
Func boxUpdate($index, $delta)
If ($BoxData[UBound($BoxData) - 1][1] + $delta > 203) And ($BoxData[UBound($BoxData) - 1][1] + $delta < ($BoxH + 1) * (UBound($BoxData) - 1)) Then ;region limits
$BoxData[$index][1] += $delta ;update pos
EndIf
EndFunc ;==>boxUpdate
Func applyAcc($delta)
// ???
EndFunc
#EndRegion BOX
Func create($n)
Local $strings[2]
For $i = 0 To $n - 1
$strings[0] = "Box Nš " & $i + 1
newBox(0, ($BoxH + 1) * $i) ;1 pixel away from each other
setBoxData($strings, $i)
Next
EndFunc ;==>create
Func render()
_GDIPlus_GraphicsClear($hBackBuffer, 0xFF000000)
For $i = 0 To UBound($BoxData) - 1
boxRender($i)
Next
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $width, $height)
EndFunc ;==>render
Func update()
$delta = 0
If _IsPressed("01") Then
$pos = MouseGetPos()
$yo = $pos[1]
$xo = $pos[0]
While _IsPressed("01")
Sleep(25)
$pos = MouseGetPos()
$y = $pos[1]
$x = $xo
$delta = $y - $yo
;ToolTip($delta,0,0)
For $i = 0 To UBound($BoxData) - 1
boxUpdate($i, $delta)
Next
render();show boxes while updating y pos
WEnd
EndIf
EndFunc ;==>update
create(56);56 boxes
While Sleep(20)
If GUIGetMsg() = -3 Then ExitLoop
update()
render()
WEnd
;clean up
_GDIPlus_FontDispose($hFont)
_GDIPlus_FontFamilyDispose($hFamily)
_GDIPlus_StringFormatDispose($hFormat)
_GDIPlus_BrushDispose($hBrush)
_GDIPlus_BrushDispose($boxBrush)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hBackBuffer)
_GDIPlus_Shutdown()






