12345678910111213141516171819202122232425262728293031323334353637 |
- [gd_scene load_steps=3 format=1]
- [ext_resource path="res://data/images/background/arcticskies1.png" type="Texture" id=1]
- [sub_resource type="GDScript" id=1]
- script/source = "extends Control\n\nvar tapped=false\nvar intersects = false\n\nvar r = Rect2( Vector2(), get_size() )\n\nfunc _draw():\n\n if (tapped):\n draw_rect(r, Color(1,0,0) )\n else:\n draw_rect(r, Color(0,0,1) )\n\n if (intersects):\n draw_rect(r, Color(0, 1, 0))\n\nfunc _input_event(ev):\n\n if (ev.type==InputEvent.MOUSE_BUTTON and ev.pressed):\n tapped=true\n update()\n if (r.has_point(ev.pos)):\n intersects=true\n update()"
- [node name="Control" type="Control"]
- focus/ignore_mouse = false
- focus/stop_mouse = true
- size_flags/horizontal = 2
- size_flags/vertical = 2
- margin/left = 77.0
- margin/top = 40.0
- margin/right = 954.0
- margin/bottom = 414.0
- script/script = SubResource( 1 )
- [node name="CanvasLayer" type="CanvasLayer" parent="."]
- layer = 1
- offset = Vector2( 0, 0 )
- rotation = 0.0
- scale = Vector2( 1, 1 )
- [node name="Sprite" type="Sprite" parent="CanvasLayer"]
- transform/pos = Vector2( 0, 2153.9 )
- transform/scale = Vector2( 100, -30.8785 )
- texture = ExtResource( 1 )
- region = true
- region_rect = Rect2( 0, 0, 100, 100 )
|