Code: Select all
Type hahmo
Field A
End Type
hahmo.hahmo = New(hahmo)
hahmo\A=10
Repeat
Text 10,10,"A: "+hahmo\A
add_loota(100,100,hahmo\A)
DrawScreen
Forever
Function add_loota(x,y,z)
Color cbred
Box x,y,40,15,0
Color cbwhite
CenterText x+20,y+1, "LESS"
Color cbyellow
If MouseX()>=x And MouseX()<=x+40 And MouseY()>=y And MouseY()<=y+20 Then
Box x+2,y+2,36,13,0
If MouseHit(1) Then
z=z-1
If z<3 Then
z=z+1
EndIf
EndIf
EndIf
End Function