diff options
Diffstat (limited to 'demos/misc')
-rw-r--r-- | demos/misc/instancing/engine.cfg | 1 | ||||
-rw-r--r-- | demos/misc/instancing/icon.png | bin | 0 -> 2185 bytes | |||
-rw-r--r-- | demos/misc/regex/regex.gd | 18 | ||||
-rw-r--r-- | demos/misc/regex/regex.scn | bin | 1772 -> 1793 bytes | |||
-rw-r--r-- | demos/misc/tween/engine.cfg | 2 | ||||
-rw-r--r-- | demos/misc/window_management/engine.cfg | 2 |
6 files changed, 13 insertions, 10 deletions
diff --git a/demos/misc/instancing/engine.cfg b/demos/misc/instancing/engine.cfg index 52a28a3fce..76b0c97721 100644 --- a/demos/misc/instancing/engine.cfg +++ b/demos/misc/instancing/engine.cfg @@ -2,6 +2,7 @@ name="Scene Instancing Demo" main_scene="res://container.scn" +icon="res://icon.png" [physics_2d] diff --git a/demos/misc/instancing/icon.png b/demos/misc/instancing/icon.png Binary files differnew file mode 100644 index 0000000000..7a6de677c5 --- /dev/null +++ b/demos/misc/instancing/icon.png diff --git a/demos/misc/regex/regex.gd b/demos/misc/regex/regex.gd index e648c18093..409b4cab05 100644 --- a/demos/misc/regex/regex.gd +++ b/demos/misc/regex/regex.gd @@ -2,21 +2,23 @@ extends VBoxContainer var regex = RegEx.new() -func update_expression(): - regex.compile(get_node("Expression").get_text()) +func update_expression(text): + regex.compile(text) update_text() func update_text(): var text = get_node("Text").get_text() - regex.find(text) var list = get_node("List") for child in list.get_children(): child.queue_free() - for res in regex.get_captures(): - var label = Label.new() - label.set_text(res) - list.add_child(label) + if regex.is_valid(): + regex.find(text) + for res in regex.get_captures(): + var label = Label.new() + label.set_text(res) + list.add_child(label) func _ready(): get_node("Text").set_text("They asked me \"What's going on \\\"in the manor\\\"?\"") - update_expression() + update_expression(get_node("Expression").get_text()) + diff --git a/demos/misc/regex/regex.scn b/demos/misc/regex/regex.scn Binary files differindex 2b62d6b82a..1f46521d0d 100644 --- a/demos/misc/regex/regex.scn +++ b/demos/misc/regex/regex.scn diff --git a/demos/misc/tween/engine.cfg b/demos/misc/tween/engine.cfg index f97e540dbd..3d3d639964 100644 --- a/demos/misc/tween/engine.cfg +++ b/demos/misc/tween/engine.cfg @@ -2,7 +2,7 @@ name="Tween Demo" main_scene="res://main.xml" -icon="icon.png" +icon="res://icon.png" target_fps=60 [display] diff --git a/demos/misc/window_management/engine.cfg b/demos/misc/window_management/engine.cfg index 0a34231673..911d3fd4a1 100644 --- a/demos/misc/window_management/engine.cfg +++ b/demos/misc/window_management/engine.cfg @@ -2,7 +2,7 @@ name="Window Management" main_scene="res://window_management.scn" -icon="icon.png" +icon="res://icon.png" [display] |