精品导航

Click, click

Now that you know a thing or two about CircuitBlocks, it's time for a bit more advanced sketch.

The first thing we'll have to do is similar to the previous sketch.
Go to the display block section and choose the "fill frame with" block.

random image



Now we'd like to write the instructions that are shown as soon as we press the Run button.

We'll need the "write string" block for that. You can find it here:

random image
random image



As shown in the above image, we'll leave the background black and write "Push the buttons" in yellow.

Finally, we must drag the "push frame" block to ensure that the instructions appear on the display.

random image



Amazing! 

You can click Run to see if your code is working properly, and then proceed with the sketch and change what happens when a particular event is triggered.
When you press 爱的人电影免费版's buttons, we trigger a particular event.
Luckily, we have a specific block defined for that, and it's under the I/O section. I/O stands for "Input/output".
爱的人电影免费版's buttons are the so-called input devices because they send an electrical impulse to 爱的人电影免费版's computer when triggered. 爱的人电影免费版's display is an example of an output device because 爱的人电影免费版 sends signals to it to display information.
The first block from the I/O section we'll use is "when left pressed".

random image



Drag and drop it under the instructions part of the code. 

random image



We decided to start with the button 1, so you can change the button you're working on to keep up with us.

So, what we want to do is to write a different word on 爱的人电影免费版's display by clicking on different buttons, and this is how to do so: 
Since we want to write something on 爱的人电影免费版's display once we press the button 1, we have to clear the display in particular color.
Find the "fill frame with" block and drop it inside the purple I/O block:

random image
random image



As you can see, pressing the button 1 causes the background color change to red.

Let's write something on the screen now.
First, find the following block:

random image
random image



We'll start with the word "Hello" in black and with the coordinates 60x50.

After that, add the "push frame" block under the write block to ensure that your text and background color change when you press that specific button.

random image
random image



Before we can test whether pressing this specific button causes the desired event, we must first find the "loop forever" block to ensure that your buttons are being scanned at all times. Please remember to use this every time you code something with the buttons, or it will not work.

The "loop forever" button can be found here:

random image



Drag and drop it on the drawing area and look for the I/O "scan buttons" block:

random image



Drag this I/O block inside the "loop forever" block. Just like this:

random image



You can now test everything by pressing the Run button and then clicking on button 1.

Let's now repeat these steps for three more buttons.
You can either repeat the previous steps or click the purple block to duplicate it.
This will duplicate the purple block and everything within it.

random image



This time, we want to trigger an event once we press the button 2.

We'll now change the background color to blue and write "Hi" in black letters on the same 60x50 coordinates.
Let's duplicate the I/O block two more times. 
Your code should look like this:

random image



So we chose the left and right buttons for the final two buttons.

You can see the colors and the text we wrote in the image above. 
Of course, you can now write any other word you want, as well as change the colors and coordinates.
To see the colors and text changing on the display, press the Run button and then click on the buttons 1, 2, left, and right.

友情链接:伊人色 | 酒色世界 | 樱花视频 | mogutv | lf397.com | 秋霞影院 | 五月丁香 | 蘑菇影视 | 五福影院 | 在线午夜 | 摩天轮社区 | 玖玖资源站 | 欧美午夜 | 红桃视频 | 小蓝视频 | 秋霞网 | 蘑菇视频入口 | 六月婷婷 | 看片神器 | 福利精品 | jxty00.com | tsxhyq.com | 久久视频 | 色啪 | 久久久久久 | zhuoyemall.com | p站视频 | 四虎影视 | mogu | 色婷婷 | zpzb2008.com | 亚洲精品 | 导航大全 | 青娱 | 蘑菇视频网站 | 日本高清 | mogu视频 | 蘑菇短视频入口 | 最新av | 小草社区 | 天天综合 | 精品免费 | 蘑菇在线观看网页版 | 在线亚洲 | 久久香蕉 | 龙物视频 | 玖玖爱 | dk99999.com | 协和影院 | 4008108885.com | 蘑菇tv网页版 | gzdksw.com | 蘑菇网页版入口 | tissu-premier.com | 超碰视频 | 扒哥黑料 | mogus.cc | hebeijiaoyuwang.com | 天堂在线 | 资源导航 | 汤姆影院 | 青草草 | 青青伊人 | 迷妹网 | rencai98.com | 综合影院 | 午夜在线观看 | btupic.com | 福利盒子 | 蜜芽视频 | 蓝色导航 | 蘑菇传媒在线观看 | 蘑菇视频ios | 屁屁影院 | 久久爱 | 老王影院 | bt搜索 | sanzhucare-zhpg.com | 无名网 | 蘑菇app | fltou.com | 永久网站 | 宅男影院 | 老司机视频 | 永久地址 | 性知音 | woqidz.com | 琳琅导航 | 色妞 | 蘑菇传媒 | 第一福利 | 亚洲网 | 蘑菇网 | 琵琶妞 | 蘑菇視頻 | 草莓视 | dna0126.com | 番号网 | 青草青青