Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- ; #Warn ; Enable warnings to assist with detecting common errors.
- SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
- SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
- #Include,<hellbents_gdip>
- SetBatchLines,-1
- #MaxHotkeysPerInterval,10000000000
- popUp:=Layered_Window_SetUp(4,0,0,A_ScreenWidth,A_ScreenHeight,1,"Alwaysontop")
- surfaceArray:=[]
- surface1:=new SurfaceClass
- map:=surface1.makemap(200,200,"B9DF4B","One")
- r:=100
- surface1.set(map,550,350,r,0)
- surfaceArray.Insert(surface1)
- surface2:=new SurfaceClass
- map:=surface2.makemap(200,200,"4BDFD6","Two")
- surface2.set(map,550,350,r,90)
- surfaceArray.Insert(surface2)
- surface3:=new SurfaceClass
- map:=surface3.makemap(200,200,"DF4BCB","Three")
- surface3.set(map,550,350,r,180)
- surfaceArray.Insert(surface3)
- surface4:=new SurfaceClass
- map:=surface4.makemap(200,200,"F31555","Four")
- surface4.set(map,550,350,r,270)
- surfaceArray.Insert(surface4)
- SetTimer,mainloop,10
- return
- mainloop:
- gosub check1
- gosub check2
- gosub setpos
- Gdip_GraphicsClear(popUp.g)
- for i,value in surfaceArray {
- if(value.whetherDraw())
- value.draw(popup.g)
- }
- UpdateLayeredWindow(popUp.hwnd, popUp.hdc, popUp.x, popUp.y, popUp.w, popUp.h)
- return
- check1:
- if(getkeystate("1")){
- for i,value in surfaceArray
- value.angle-=5 - 360
- }
- return
- check2:
- if(getkeystate("2")){
- for i,value in surfaceArray
- value.angle+=5
- }
- return
- setpos:
- MouseGetPos,x,y
- for i,value in surfaceArray
- value.x3:=x, value.y3:=y
- return
- class SurfaceClass {
- set(map,x3,y3,R,angle){
- this.map:=map
- gdip_GetImageDimensions(map, w, h)
- this.w:=w, this.h:=h
- this.x3:=x3, this.y3:=y3, this.angle:=angle, this.r:=R
- }
- draw(g){
- x1:=this.x3 - this.w/2
- this.angle:=mod(this.angle,360)
- h:=this.h*cosG(this.angle)
- y1:=this.y3 - this.r*sinG(this.angle) - h/2
- Gdip_DrawImage(g,this.map,x1,y1,this.w,h)
- }
- makemap(w,h,colour,word){
- map:=Gdip_CreateBitmap(w, h)
- g:=Gdip_GraphicsFromImage(map)
- fill_boxX(g,colour,0,0,w,h)
- Gdip_TextToGraphics(g, word,"x0 y0 s65 cff440F1E ", "Segoe Print")
- return map
- }
- whetherDraw(){
- this.angle:=mod(this.angle,360)
- if( (this.angle >=0 && this.angle <= 90) or (this.angle > 270 && this.angle <=359 ))
- return true
- return false
- }
- }
- x::
- Layered_Window_ShutDown(popUp)
- ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement