Skip to content

Commit 6e0729c

Browse files
authored
Merge pull request #11 from vonagam/fix-types-meta-tooled-icon
Fix set_script_tooled and set_script_icon typescript declarations
2 parents ec69d88 + 33aefc3 commit 6e0729c

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Label.Align.ALIGN_LEFT | godot.Label.Align.ALIGN_LEFT
9999
- `godot.register_signal(cls, signal_name)` to register signals
100100
- `godot.register_property(cls, name, default_value)` to define and export properties
101101
- `godot.register_class(cls, name)` to register named class manually
102-
- `godot.set_script_tooled(tooled)` to set `tooled` of the class
103-
- `godot.set_script_icon(path)` to set icon of the class
102+
- `godot.set_script_tooled(cls, tooled)` to set `tooled` of the class
103+
- `godot.set_script_icon(cls, path)` to set icon of the class
104104
- `godot.get_type(val)` Returns the internal type of the given `Variant` object, using the `godot.TYPE_*`
105105
- `requestAnimationFrame(callback)` to add a callback function to be called every frame
106106
- `cancelAnimationFrame(request_id)` to cancel an frame request previously scheduled

misc/godot.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,15 @@ declare module godot {
163163
* The meta data of an script
164164
* @param target The script class
165165
* @param tool is tooled of this class
166+
*/
167+
function set_script_tooled(target: GodotClass, tool: boolean);
168+
169+
/**
170+
* The meta data of an script
171+
* @param target The script class
166172
* @param icon The icon of the class
167173
*/
168-
function set_script_meta(target: GodotClass, tool: boolean, icon?: string);
174+
function set_script_icon(target: GodotClass, icon: string);
169175

170176
/**
171177
* Returns the internal type of the given `Variant` object, using the `godot.TYPE_*`

0 commit comments

Comments
 (0)