this is some messing about, were I was trying to get the bar to do the same thing that the search bar would do on windows 7, but failed in doing that, and ended up with this, see what you think.
Rem Project: colorbar1
Rem Created: Tuesday, March 01, 2011
Rem ***** Main Source File *****
sync on
sync rate 60
load image "colorbar1.png",1
make object box 1,50,10,1
texture object 1,1
RotationAngle#=.005
RotationMatrix=1
r=make matrix4(RotationMatrix)
rotate ypr matrix4 r,.01,RotationMatrix, RotationAngle#
for i=2 to 7
r=make vector2(i)
next i
ObjectNumber=1
LimbNumber=0
do
control camera using arrowkeys 0, 0.1, 0.2
set cursor 0, 0
print "UV Texture Rotation example"
print "FPS: ", screen fps()
print "Rotation angle: ", RotationAngle#
if inkey$()="+" : inc RotationAngle#, .0005 : rotate z matrix4 RotationMatrix, RotationAngle# : endif
if inkey$()="-" : dec RotationAngle#, .0005 : rotate z matrix4 RotationMatrix, RotationAngle# : endif
rem lock limb and rotate UV values of each face of a cube
LOCK VERTEXDATA FOR LIMB ObjectNumber, Limb
for I=0 to GET VERTEXDATA INDEX COUNT()-1 step 6
V1=GET INDEXDATA(I+0) : V2=GET INDEXDATA(I+1) : V3=GET INDEXDATA(I+2)
V4=GET INDEXDATA(I+3) : V5=GET INDEXDATA(I+4) : V6=GET INDEXDATA(I+5)
U1#=GET VERTEXDATA U(V1) : V1#=GET VERTEXDATA V(V1)
U2#=GET VERTEXDATA U(V2) : V2#=GET VERTEXDATA V(V2)
U3#=GET VERTEXDATA U(V3) : V3#=GET VERTEXDATA V(V3)
U4#=GET VERTEXDATA U(V4) : V4#=GET VERTEXDATA V(V4)
U5#=GET VERTEXDATA U(V5) : V5#=GET VERTEXDATA V(V5)
U6#=GET VERTEXDATA U(V6) : V6#=GET VERTEXDATA V(V6)
U#=(U1#+U2#+U3#+U5#)/4.0
V#=(V1#+V2#+V3#+V5#)/4.0
set vector2 2, U1#-U#, V1#-V# : transform coords vector2 2, 2, 1
set vector2 3, U2#-U#, V2#-V# : transform coords vector2 3, 3, 1
set vector2 4, U3#-U#, V3#-V# : transform coords vector2 4, 4, 1
set vector2 5, U4#-U#, V4#-V# : transform coords vector2 5, 5, 1
set vector2 6, U5#-U#, V5#-V# : transform coords vector2 6, 6, 1
set vector2 7, U6#-U#, V6#-V# : transform coords vector2 7, 7, 1
SET VERTEXDATA UV V1, U#+x vector2(2), V#+y vector2(2)
SET VERTEXDATA UV V2, U#+x vector2(3), V#+y vector2(3)
SET VERTEXDATA UV V3, U#+x vector2(4), V#+y vector2(4)
SET VERTEXDATA UV V4, U#+x vector2(5), V#+y vector2(5)
SET VERTEXDATA UV V5, U#+x vector2(6), V#+y vector2(6)
SET VERTEXDATA UV V6, U#+x vector2(7), V#+y vector2(7)
next I
UNLOCK VERTEXDATA
sync
loop
Dark Physics makes any hot drink go cold.