Skip to content

Commit

Permalink
Update extension_examples.md add @onready (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
devmark404 authored Aug 9, 2024
1 parent c421483 commit 42ff142
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/extension_system/extension_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Adds a simple Panel as a tab, which will be placed at the same place as the Tool
```
extends Node
onready var extension_api: Node # Variable for keeping reference to the Api
@onready var extension_api: Node # Variable for keeping reference to the Api
# some references to nodes that will be created later
var panel
Expand All @@ -64,7 +64,7 @@ Adds a menu item in Help menu, which displays a message when clicked on it.
```
extends Node
onready var extension_api: Node # Variable for keeping reference to the Api
@onready var extension_api: Node # Variable for keeping reference to the Api
var item_id: int
Expand Down Expand Up @@ -93,7 +93,7 @@ Adds a theme to pixelorama **Preferences > Interface > Themes** (you need to hav
```
extends Node
onready var extension_api: Node # Variable for keeping reference to the Api
@onready var extension_api: Node # Variable for keeping reference to the Api
var theme = load("res://path_to_some_theme.tres") # Replace this with your theme resource
# your theme resource must be a derivative of themes from
Expand All @@ -120,7 +120,7 @@ Sometimes you only need a different font instead of a different theme. This is m
extends Node
# used If your goal is to only use a different font
onready var extension_api: Node # Variable for keeping reference to the Api
@onready var extension_api: Node # Variable for keeping reference to the Api
var font_res = load("res://path_to_some_font.ttf") # Replace this with your font resource
var old_font
Expand Down Expand Up @@ -153,9 +153,9 @@ extends Node
# https://github.com/Orama-Interactive/Pixelorama/blob/master/src/UI/Timeline/AnimationTimeline.gd
# NOTE: some more advanced methods can be accessed from timeline node (un-comment line below to get them)
#onready var timeline = ExtensionsApi.general.get_global().animation_timeline
#@onready var timeline = ExtensionsApi.general.get_global().animation_timeline
onready var extension_api: Node # Variable for keeping reference to the Api
@onready var extension_api: Node # Variable for keeping reference to the Api
var item_id: int
var type: int
Expand Down Expand Up @@ -204,7 +204,7 @@ Adds a basic custom exporter that will export only odd frames.
```
extends Node
onready var extension_api: Node # Variable for keeping reference to the Api
@onready var extension_api: Node # Variable for keeping reference to the Api
var id: int
Expand Down

0 comments on commit 42ff142

Please sign in to comment.