Computer Science Canada

Having a loop in the background while other programs are happening. 2 Buttons wanted. Make them bigger

Author:  awesomenesss22 [ Tue Jan 01, 2019 7:37 pm ]
Post subject:  Having a loop in the background while other programs are happening. 2 Buttons wanted. Make them bigger

What is it you are trying to achieve?
I am trying to create a loop that displays "Chick-A-Mania" and changes colour while other things appear on the screen such as the start and exit buttons after. I also need help creating 2 clickable buttons, start and exit, because only one shows up. Make the button bigger


What is the problem you are having?
loop stops or doesn't display the rest of the program after. Can't create 2 clickable buttons and need them to be bigger


Describe what you have tried to solve this problem
Internet; Other posts from this website;

Code:

%GUI Import
import GUI

%Background
setscreen ("graphics:1000;1000")
drawfillbox (0, 0, 1000, 1000, 103)

%Fonts
var font : int
font := Font.New ("Comic Sans MS:50:bold")
var font2 : int
font2 := Font.New ("Arial Black:70:bold")

%Titlescreen
Draw.Text ("Welcome to", 300, 725, font, 7)
delay (1500)


Draw.Text ("Chick-A-Mania!", 150, 625, font2, 41)
delay (500)
Draw.Text ("Chick-A-Mania!", 150, 625, font2, 7)
delay (500)


procedure start
drawfillbox (0, 0, 1000, 1000, 7)
end start
procedure finish
quit
end finish
var button1 : int := GUI.CreateButton (450, 500, 0, "Start", start)
loop
exit when GUI.ProcessEvent
end loop

4.1.1 windows

Author:  Nomalah [ Sat Jan 05, 2019 1:05 pm ]
Post subject:  Re: Having a loop in the background while other programs are happening. 2 Buttons wanted. Make them bigger

Do you want the user at the start to see two buttons?, one to continue the program and one to exit? Or do you want the user to see the Start button, continue into the program and then exit at the end?

Author:  awesomenesss22 [ Sat Jan 05, 2019 10:46 pm ]
Post subject:  Re: Having a loop in the background while other programs are happening. 2 Buttons wanted. Make them bigger

I actually just need the word, "Chick-A-Mania" to flash black and orange over and over again WHILE the user can still click the start or exit button[/u]

Author:  awesomenesss22 [ Sat Jan 05, 2019 10:52 pm ]
Post subject:  Re: Having a loop in the background while other programs are happening. 2 Buttons wanted. Make them bigger

I've also fixed the button problem btw....


: