Start Button
Author |
Message |
xSavage
|
Posted: Fri Dec 18, 2015 9:31 am Post subject: Start Button |
|
|
What is it you are trying to achieve?
I'm trying to make a start button that looks as if it's being pushed down.
What is the problem you are having?
My problem is that when the for loop starts a black line is left at the top, not to mention to button if flashing as its being pushed down.
Describe what you have tried to solve this problem
So to fix the black line I think its there because I put the "colored" code first inside the loop instead of the white one, but when I tried switching them it got messed up. I'm not sure how to fix the flashing.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
Turing: |
var font1 := Font.New ("Comicsans:11:bold,italic")
var font2 := Font.New ("Comicsans:40:bold,italic")
%First start button
for i : 1.. 100
drawfilloval (maxx div 2, ((maxy div 2)- 50)+i, 150, 100, brightred)
drawoval (maxx div 2, ((maxy div 2)- 50)+i, 150, 100, black)
end for
Font.Draw ("START", (maxx div 2)- 90, (maxy div 2)+ 30, font2, red)
delay (3000)
%Loop for lowering the button
for k : 1.. 50
for i : 1.. 100
drawfilloval (maxx div 2, ((maxy div 2)+ 50)-k, 150, 100, brightred)%colored
drawoval (maxx div 2, ((maxy div 2)+ 50)-k, 150, 100, black)%colored
drawfilloval (maxx div 2, ((maxy div 2)+ 50)-k, 150, 100, white)%white
drawoval (maxx div 2, ((maxy div 2)+ 50)-k, 150, 100, white) %white
Font.Draw ("START", (maxx div 2)- 90, ((maxy div 2)+ 30)-k, font2, red)
end for
end for
%Colors the button at the end
drawfilloval (maxx div 2, maxy div 2, 150, 100, brightred)
drawoval (maxx div 2, maxy div 2, 150, 100, black)
Font.Draw ("START", (maxx div 2)- 90, (maxy div 2)- 20, font2, red)
|
Please specify what version of Turing you are using
4.1.1 |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|