You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/10.mega/shields/giga-display-shield/tutorials/13.appwizard-guide/content.md
+46-2Lines changed: 46 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,14 +36,58 @@ First go to **File -> New Project** to start your new project. Here we need to
36
36
37
37
![Create project settings]()
38
38
39
-
## Adding elements to the project
39
+
## Setting Up The Project
40
+
First add a **screen** element to your project, this will be the base that contains all the other elements of the project.
41
+
42
+
![Screen highlighted]()
43
+
44
+
To add a background color add the **Box** object and set the color on the right side properties menu.
45
+
46
+
![Box highlighted]()
40
47
41
48
### Button
42
49
43
-
### Slider
50
+
Add a button from the object menu. On the right hand properties menu you can set the color of the button when it is unpressed and pressed.
51
+
52
+
![Adding a button]()
53
+
54
+
In the right hand properties menu you can also add text to the button. Press the **set text** option. This will bring up a window that contains all the text elements in the project. Press **add text**, this will create a new text object with a unique id. Now to set the text that will be displayed press **New language** and enter **En**, we will be using English in this tutorial. Under the new **En** tab you can set the text that will be visible, change the **-** to **Button** and this text will be displayed on the button.
55
+
56
+
[Text objects box]()
57
+
58
+
## Adding Interactions
59
+
60
+
### Textbox
61
+
62
+
Let's add a textbox which will display a value that will increase when the button is pressed.
63
+
64
+
First add a textbox by clicking the **Text** box in the "Add objects" section. Then feel free to set the text color and background color to your desired color in the properties menu. Here the textbox needs to be set to decimal mode, do that by clicking the "Set decimal mode" button and then putting a "0" in the mask box.
65
+
66
+
[Textbox added]()
67
+
68
+
Next a variable is needed to keep track of the value. In the bottom left "Rescoureces" section press the **Open variables window** button. This will open a window where variables can be managed.
69
+
70
+
[Variables window highlighted in App Wizard]()
71
+
72
+
Press **Add variable** and then rename the variable to something relevant so it is easier to keep track of later, here we will name it "ID_BUTTON_VAR".
73
+
74
+
[Image of variable window]()
75
+
76
+
Now we need to add interactions for the button and text. Press the **+** button in the interactions box to add an interaction. Set the variable as the "Emitter", the signal should be "VALUE_CHANGED", job should be "SETVALUE" and the receiver should be the text box which here is "ID_TEXT_00". Now the text will be set to the same value as the variable.
77
+
78
+
To add the buttons interaction, set the emitter as the button, the signal should be "RELEASED", so that the value increses when the button is released. The job should be "ADDVALUE" and the receiver should be the variable, so the value gets added to the variable. In the window that pops up the increment of the value added to the variable, here we set it to "1". You can try out the interaction by pressing the **Start play mode** in the upper right corner of the "Editor" window.
79
+
80
+
### Progress Bar
81
+
82
+
Now lets try adding a progress bar to the previous interaction. Start by pressing the **progbar** button and set the initial value to "0".
0 commit comments