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: CONTRIBUTING.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,6 @@ Finally, there are set of instructions that will help you to contribute to the p
6
6
7
7
Thanks for your help!
8
8
9
-
## Update Documentation
10
-
11
-
If you see any mistakes in the documentation, you can update it by yourself.
12
-
13
-
You can push changes to the `master` branch directly. In case of small fixes, please also update the relative API `md` files. If there is a lot of changes, I will regenerate them manually.
14
-
15
9
## Issue Reporting
16
10
17
11
If you find any bugs, please report them to the [issue tracker](https://github.com/druid-js/druid/issues).
@@ -26,6 +20,17 @@ You fix should contains only changes, which are related to the issue. Also pleas
26
20
27
21
Thanks <3
28
22
23
+
## Update Documentation
24
+
25
+
If you see any mistakes in the documentation, you can update it by yourself with the following steps:
26
+
27
+
- Fork Druid repository
28
+
- Create a new branch for your changes
29
+
- Make your changes and commit them
30
+
- Push your changes to your fork
31
+
- Create a pull request to the Druid repository `develop` branch
32
+
33
+
29
34
## Add or Update Examples
30
35
31
36
Examples contains a GUI scene, a Druid widget for this GUI. This GUI is included to the `examples.gui` and the information about examples are added in `examples_list.lua` file
@@ -34,4 +39,12 @@ You can add new examples or update existing ones.
34
39
35
40
To add new example, you need to create a new folder in the `examples` directory.
36
41
42
+
On your repo fork:
43
+
44
+
- Create a gui file with the example inside `/example/examples` directory
45
+
- Add the example info to the `examples_list.lua` file.
46
+
- Add this GUI template to the `/example/druid.gui` file
47
+
- GUI should be placed inside relative example parent, e.g. `root -> container_center -> examples -> widgets`
Copy file name to clipboardExpand all lines: api/components/base/button_api.md
+24-9Lines changed: 24 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,25 @@
2
2
3
3
> at /druid/base/button.lua
4
4
5
-
Druid component to make clickable node with various interaction callbacks
6
-
5
+
Basic Druid input component. Handle input on node and provide different callbacks on touch events.
6
+
7
+
### Setup
8
+
Create button with druid: `button = druid:new_button(node_name, callback, [params], [animation_node])`
9
+
Where node_name is name of node from GUI scene. You can use `node_name` as input trigger zone and point another node for animation via `animation_node`
10
+
11
+
### Notes
12
+
- Button callback have next params: (self, params, button_instance)
13
+
--**self** - Druid self context
14
+
--**params** - Additional params, specified on button creating
15
+
--**button_instance** - button itself
16
+
- You can set _params_ on button callback on button creating: `druid:new_button("node_name", callback, params)`.
17
+
- Button have several events like on_click, on_repeated_click, on_long_click, on_hold_click, on_double_click
18
+
- Click event will not trigger if between pressed and released state cursor was outside of node zone
19
+
- Button can have key trigger to use them by key: `button:set_key_trigger`
0 commit comments