精品导航

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 《伦敦空姐美版2023》'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".
《伦敦空姐美版2023》's buttons are the so-called input devices because they send an electrical impulse to 《伦敦空姐美版2023》's computer when triggered. 《伦敦空姐美版2023》's display is an example of an output device because 《伦敦空姐美版2023》 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 《伦敦空姐美版2023》's display by clicking on different buttons, and this is how to do so: 
Since we want to write something on 《伦敦空姐美版2023》'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.

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