mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-05 07:20:07 +01:00
WM demo: Add missing CubeMesh (prev. TestInstance)
This commit is contained in:
@@ -53,7 +53,7 @@ func _fixed_process(delta):
|
||||
$Label_Screen1_Resolution.hide()
|
||||
$Label_Screen1_Position.hide()
|
||||
$Label_Screen1_DPI.hide()
|
||||
|
||||
|
||||
$Button_Fullscreen.set_pressed(OS.is_window_fullscreen())
|
||||
$Button_FixedSize.set_pressed(!OS.is_window_resizable())
|
||||
$Button_Minimized.set_pressed(OS.is_window_minimized())
|
||||
@@ -67,55 +67,55 @@ func check_wm_api():
|
||||
var s = ""
|
||||
if (!OS.has_method("get_screen_count")):
|
||||
s += " - get_screen_count()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("get_current_screen")):
|
||||
s += " - get_current_screen()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_current_screen")):
|
||||
s += " - set_current_screen()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("get_screen_position")):
|
||||
s += " - get_screen_position()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("get_screen_size")):
|
||||
s += " - get_screen_size()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("get_window_position")):
|
||||
s += " - get_window_position()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_window_position")):
|
||||
s += " - set_window_position()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("get_window_size")):
|
||||
s += " - get_window_size()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_window_size")):
|
||||
s += " - set_window_size()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_window_fullscreen")):
|
||||
s += " - set_window_fullscreen()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("is_window_fullscreen")):
|
||||
s += " - is_window_fullscreen()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_window_resizable")):
|
||||
s += " - set_window_resizable()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("is_window_resizable")):
|
||||
s += " - is_window_resizable()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_window_minimized")):
|
||||
s += " - set_window_minimized()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("is_window_minimized")):
|
||||
s += " - is_window_minimized()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("set_window_maximized")):
|
||||
s += " - set_window_maximized()\n"
|
||||
|
||||
|
||||
if (!OS.has_method("is_window_maximized")):
|
||||
s += " - is_window_maximized()\n"
|
||||
|
||||
|
||||
if (s.length() == 0):
|
||||
return true
|
||||
else:
|
||||
@@ -133,16 +133,16 @@ func _ready():
|
||||
func _input(event):
|
||||
if (event is InputEventMouseMotion):
|
||||
mousepos = event.position
|
||||
|
||||
|
||||
if (event is InputEventKey):
|
||||
if Input.is_action_pressed("mouse_mode_visible"):
|
||||
observer.state = observer.STATE_MENU
|
||||
_on_Button_MouseModeVisible_pressed()
|
||||
|
||||
|
||||
if Input.is_action_pressed("mouse_mode_hidden"):
|
||||
observer.state = observer.STATE_MENU
|
||||
_on_Button_MouseModeHidden_pressed()
|
||||
|
||||
|
||||
if Input.is_action_pressed("mouse_mode_captured"):
|
||||
_on_Button_MouseModeCaptured_pressed()
|
||||
|
||||
|
||||
@@ -1,18 +1,42 @@
|
||||
[gd_scene load_steps=3 format=2]
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://observer/observer.tscn" type="PackedScene" id=1]
|
||||
[ext_resource path="res://control.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CubeMesh" id=1]
|
||||
|
||||
size = Vector3( 2, 2, 2 )
|
||||
subdivide_width = 0
|
||||
subdivide_height = 0
|
||||
subdivide_depth = 0
|
||||
|
||||
[node name="Spatial" type="Spatial"]
|
||||
|
||||
[node name="Observer" parent="." instance=ExtResource( 1 )]
|
||||
|
||||
transform = Transform( 0.910685, 0, -0.4131, 0, 1, 0, 0.4131, 0, 0.910685, -4.81287, -0.152566, 9.90641 )
|
||||
|
||||
[node name="MeshInstance" type="MeshInstance" parent="."]
|
||||
|
||||
layers = 1
|
||||
material_override = null
|
||||
cast_shadow = 1
|
||||
extra_cull_margin = 0.0
|
||||
visible_in_all_rooms = false
|
||||
use_in_baked_light = false
|
||||
lod_min_distance = 0.0
|
||||
lod_min_hysteresis = 0.0
|
||||
lod_max_distance = 0.0
|
||||
lod_max_hysteresis = 0.0
|
||||
mesh = SubResource( 1 )
|
||||
skeleton = NodePath("..")
|
||||
material/0 = null
|
||||
|
||||
[node name="Control" type="Control" parent="."]
|
||||
|
||||
anchor_right = 1
|
||||
anchor_bottom = 1
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -25,6 +49,7 @@ margin_left = 20.0
|
||||
margin_top = 20.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 45.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -42,6 +67,7 @@ margin_left = 20.0
|
||||
margin_top = 60.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 85.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -59,6 +85,7 @@ margin_left = 20.0
|
||||
margin_top = 100.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 125.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -76,6 +103,7 @@ margin_left = 20.0
|
||||
margin_top = 140.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 165.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -93,6 +121,7 @@ margin_left = 20.0
|
||||
margin_top = 178.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 203.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -110,6 +139,7 @@ margin_left = 20.0
|
||||
margin_top = 218.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 243.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -127,6 +157,7 @@ margin_left = 20.0
|
||||
margin_top = 258.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 283.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -144,6 +175,7 @@ margin_left = 20.0
|
||||
margin_top = 298.0
|
||||
margin_right = 120.0
|
||||
margin_bottom = 323.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -163,6 +195,7 @@ margin_left = 20.0
|
||||
margin_top = 221.0
|
||||
margin_right = 225.0
|
||||
margin_bottom = 196.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -183,6 +216,7 @@ margin_left = 20.0
|
||||
margin_top = 186.0
|
||||
margin_right = 225.0
|
||||
margin_bottom = 161.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -203,6 +237,7 @@ margin_left = 20.0
|
||||
margin_top = 151.0
|
||||
margin_right = 225.0
|
||||
margin_bottom = 126.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -223,6 +258,7 @@ margin_left = 140.0
|
||||
margin_top = 140.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 153.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -240,6 +276,7 @@ margin_left = 140.0
|
||||
margin_top = 60.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 73.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -258,6 +295,7 @@ margin_left = 140.0
|
||||
margin_top = 100.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 113.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -276,6 +314,7 @@ margin_left = 140.0
|
||||
margin_top = 220.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 153.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -293,6 +332,7 @@ margin_left = 140.0
|
||||
margin_top = 300.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 317.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -311,6 +351,7 @@ margin_left = 140.0
|
||||
margin_top = 20.0
|
||||
margin_right = 20.0
|
||||
margin_bottom = 40.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -329,6 +370,7 @@ margin_left = 140.0
|
||||
margin_top = 340.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 353.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -347,6 +389,7 @@ margin_left = 140.0
|
||||
margin_top = 380.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 396.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -365,6 +408,7 @@ margin_left = 140.0
|
||||
margin_top = 416.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 432.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -383,6 +427,7 @@ margin_left = 140.0
|
||||
margin_top = 451.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 467.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -401,6 +446,7 @@ margin_left = 140.0
|
||||
margin_top = 489.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 505.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -419,6 +465,7 @@ margin_left = 140.0
|
||||
margin_top = 524.0
|
||||
margin_right = 16.0
|
||||
margin_bottom = 540.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -437,6 +484,7 @@ margin_left = 20.0
|
||||
margin_top = 122.0
|
||||
margin_right = 286.0
|
||||
margin_bottom = 63.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -457,6 +505,7 @@ margin_left = 20.0
|
||||
margin_top = 65.0
|
||||
margin_right = 286.0
|
||||
margin_bottom = 11.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -477,6 +526,7 @@ margin_left = 20.0
|
||||
margin_top = 249.0
|
||||
margin_right = 286.0
|
||||
margin_bottom = 227.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
@@ -494,6 +544,7 @@ margin_left = 200.0
|
||||
margin_top = 100.0
|
||||
margin_right = 600.0
|
||||
margin_bottom = 450.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 0
|
||||
size_flags_horizontal = 2
|
||||
@@ -509,6 +560,7 @@ margin_left = 8.0
|
||||
margin_top = 8.0
|
||||
margin_right = 392.0
|
||||
margin_bottom = 314.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
size_flags_horizontal = 2
|
||||
|
||||
Reference in New Issue
Block a user