window_management.tscn 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. [gd_scene load_steps=3 format=1]
  2. [ext_resource path="res://observer/observer.tscn" type="PackedScene" id=1]
  3. [ext_resource path="res://control.gd" type="Script" id=2]
  4. [node name="Spatial" type="Spatial"]
  5. _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
  6. [node name="Observer" parent="." instance=ExtResource( 1 )]
  7. transform/local = Transform( 0.910685, 0, -0.4131, 0, 1, 0, 0.4131, 0, 0.910685, -4.81287, -0.152566, 9.90641 )
  8. [node name="TestCube" type="TestCube" parent="."]
  9. _import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
  10. layers = 1
  11. geometry/visible = true
  12. geometry/material_override = null
  13. geometry/cast_shadow = 1
  14. geometry/receive_shadows = true
  15. geometry/range_begin = 0.0
  16. geometry/range_end = 0.0
  17. geometry/extra_cull_margin = 0.0
  18. geometry/billboard = false
  19. geometry/billboard_y = false
  20. geometry/depth_scale = false
  21. geometry/visible_in_all_rooms = false
  22. geometry/use_baked_light = false
  23. geometry/baked_light_tex_id = 0
  24. [node name="Control" type="Control" parent="."]
  25. anchor/right = 1
  26. anchor/bottom = 1
  27. focus/ignore_mouse = false
  28. focus/stop_mouse = true
  29. size_flags/horizontal = 2
  30. size_flags/vertical = 2
  31. margin/left = 0.0
  32. margin/top = 0.0
  33. margin/right = 0.0
  34. margin/bottom = 0.0
  35. script/script = ExtResource( 2 )
  36. [node name="Button_Fullscreen" type="Button" parent="Control"]
  37. focus/ignore_mouse = false
  38. focus/stop_mouse = true
  39. size_flags/horizontal = 2
  40. size_flags/vertical = 2
  41. margin/left = 20.0
  42. margin/top = 20.0
  43. margin/right = 120.0
  44. margin/bottom = 45.0
  45. toggle_mode = true
  46. enabled_focus_mode = 2
  47. shortcut = null
  48. text = "Fullscreen"
  49. flat = false
  50. [node name="Button_FixedSize" type="Button" parent="Control"]
  51. focus/ignore_mouse = false
  52. focus/stop_mouse = true
  53. size_flags/horizontal = 2
  54. size_flags/vertical = 2
  55. margin/left = 20.0
  56. margin/top = 60.0
  57. margin/right = 120.0
  58. margin/bottom = 85.0
  59. toggle_mode = true
  60. enabled_focus_mode = 2
  61. shortcut = null
  62. text = "FixedSize"
  63. flat = false
  64. [node name="Button_Minimized" type="Button" parent="Control"]
  65. focus/ignore_mouse = false
  66. focus/stop_mouse = true
  67. size_flags/horizontal = 2
  68. size_flags/vertical = 2
  69. margin/left = 20.0
  70. margin/top = 100.0
  71. margin/right = 120.0
  72. margin/bottom = 125.0
  73. toggle_mode = true
  74. enabled_focus_mode = 2
  75. shortcut = null
  76. text = "Minimized"
  77. flat = false
  78. [node name="Button_Maximized" type="Button" parent="Control"]
  79. focus/ignore_mouse = false
  80. focus/stop_mouse = true
  81. size_flags/horizontal = 2
  82. size_flags/vertical = 2
  83. margin/left = 20.0
  84. margin/top = 140.0
  85. margin/right = 120.0
  86. margin/bottom = 165.0
  87. toggle_mode = true
  88. enabled_focus_mode = 2
  89. shortcut = null
  90. text = "Maximized"
  91. flat = false
  92. [node name="Button_MoveTo" type="Button" parent="Control"]
  93. focus/ignore_mouse = false
  94. focus/stop_mouse = true
  95. size_flags/horizontal = 2
  96. size_flags/vertical = 2
  97. margin/left = 20.0
  98. margin/top = 178.0
  99. margin/right = 120.0
  100. margin/bottom = 203.0
  101. toggle_mode = false
  102. enabled_focus_mode = 2
  103. shortcut = null
  104. text = "MoveTo"
  105. flat = false
  106. [node name="Button_Resize" type="Button" parent="Control"]
  107. focus/ignore_mouse = false
  108. focus/stop_mouse = true
  109. size_flags/horizontal = 2
  110. size_flags/vertical = 2
  111. margin/left = 20.0
  112. margin/top = 218.0
  113. margin/right = 120.0
  114. margin/bottom = 243.0
  115. toggle_mode = false
  116. enabled_focus_mode = 2
  117. shortcut = null
  118. text = "Resize"
  119. flat = false
  120. [node name="Button_Screen0" type="Button" parent="Control"]
  121. focus/ignore_mouse = false
  122. focus/stop_mouse = true
  123. size_flags/horizontal = 2
  124. size_flags/vertical = 2
  125. margin/left = 20.0
  126. margin/top = 258.0
  127. margin/right = 120.0
  128. margin/bottom = 283.0
  129. toggle_mode = false
  130. enabled_focus_mode = 2
  131. shortcut = null
  132. text = "Screen0"
  133. flat = false
  134. [node name="Button_Screen1" type="Button" parent="Control"]
  135. focus/ignore_mouse = false
  136. focus/stop_mouse = true
  137. size_flags/horizontal = 2
  138. size_flags/vertical = 2
  139. margin/left = 20.0
  140. margin/top = 298.0
  141. margin/right = 120.0
  142. margin/bottom = 323.0
  143. toggle_mode = false
  144. enabled_focus_mode = 2
  145. shortcut = null
  146. text = "Screen1"
  147. flat = false
  148. [node name="Button_MouseModeVisible" type="Button" parent="Control"]
  149. anchor/top = 1
  150. anchor/bottom = 1
  151. focus/ignore_mouse = false
  152. focus/stop_mouse = true
  153. size_flags/horizontal = 2
  154. size_flags/vertical = 2
  155. margin/left = 20.0
  156. margin/top = 221.0
  157. margin/right = 225.0
  158. margin/bottom = 196.0
  159. toggle_mode = true
  160. enabled_focus_mode = 2
  161. shortcut = null
  162. text = "[F1] MOUSE_MODE_VISIBLE"
  163. flat = false
  164. align = 0
  165. [node name="Button_MouseModeHidden" type="Button" parent="Control"]
  166. anchor/top = 1
  167. anchor/bottom = 1
  168. focus/ignore_mouse = false
  169. focus/stop_mouse = true
  170. size_flags/horizontal = 2
  171. size_flags/vertical = 2
  172. margin/left = 20.0
  173. margin/top = 186.0
  174. margin/right = 225.0
  175. margin/bottom = 161.0
  176. toggle_mode = true
  177. enabled_focus_mode = 2
  178. shortcut = null
  179. text = "[F2] MOUSE_MODE_HIDDEN"
  180. flat = false
  181. align = 0
  182. [node name="Button_MouseModeCaptured" type="Button" parent="Control"]
  183. anchor/top = 1
  184. anchor/bottom = 1
  185. focus/ignore_mouse = false
  186. focus/stop_mouse = true
  187. size_flags/horizontal = 2
  188. size_flags/vertical = 2
  189. margin/left = 20.0
  190. margin/top = 151.0
  191. margin/right = 225.0
  192. margin/bottom = 126.0
  193. toggle_mode = true
  194. enabled_focus_mode = 2
  195. shortcut = null
  196. text = "[F3] MOUSE_MODE_CAPTURED"
  197. flat = false
  198. align = 0
  199. [node name="Label_Mode" type="Label" parent="Control"]
  200. anchor/left = 1
  201. anchor/right = 1
  202. focus/ignore_mouse = true
  203. focus/stop_mouse = true
  204. size_flags/horizontal = 2
  205. size_flags/vertical = 0
  206. margin/left = 140.0
  207. margin/top = 140.0
  208. margin/right = 20.0
  209. margin/bottom = 153.0
  210. text = "Mode:"
  211. percent_visible = 1.0
  212. lines_skipped = 0
  213. max_lines_visible = -1
  214. [node name="Label_Position" type="Label" parent="Control"]
  215. anchor/left = 1
  216. anchor/right = 1
  217. focus/ignore_mouse = true
  218. focus/stop_mouse = true
  219. size_flags/horizontal = 2
  220. size_flags/vertical = 0
  221. margin/left = 140.0
  222. margin/top = 60.0
  223. margin/right = 20.0
  224. margin/bottom = 73.0
  225. text = "Position:"
  226. valign = 1
  227. percent_visible = 1.0
  228. lines_skipped = 0
  229. max_lines_visible = -1
  230. [node name="Label_Size" type="Label" parent="Control"]
  231. anchor/left = 1
  232. anchor/right = 1
  233. focus/ignore_mouse = true
  234. focus/stop_mouse = true
  235. size_flags/horizontal = 2
  236. size_flags/vertical = 0
  237. margin/left = 140.0
  238. margin/top = 100.0
  239. margin/right = 20.0
  240. margin/bottom = 113.0
  241. text = "Size:"
  242. valign = 1
  243. percent_visible = 1.0
  244. lines_skipped = 0
  245. max_lines_visible = -1
  246. [node name="Label_MousePosition" type="Label" parent="Control"]
  247. anchor/left = 1
  248. anchor/right = 1
  249. focus/ignore_mouse = true
  250. focus/stop_mouse = true
  251. size_flags/horizontal = 2
  252. size_flags/vertical = 0
  253. margin/left = 140.0
  254. margin/top = 220.0
  255. margin/right = 20.0
  256. margin/bottom = 153.0
  257. text = "Mouse Position:"
  258. percent_visible = 1.0
  259. lines_skipped = 0
  260. max_lines_visible = -1
  261. [node name="Label_Screen_Count" type="Label" parent="Control"]
  262. anchor/left = 1
  263. anchor/right = 1
  264. focus/ignore_mouse = true
  265. focus/stop_mouse = true
  266. size_flags/horizontal = 2
  267. size_flags/vertical = 0
  268. margin/left = 140.0
  269. margin/top = 300.0
  270. margin/right = 20.0
  271. margin/bottom = 317.0
  272. text = "Screen_Count:"
  273. valign = 1
  274. percent_visible = 1.0
  275. lines_skipped = 0
  276. max_lines_visible = -1
  277. [node name="Label_Screen_Current" type="Label" parent="Control"]
  278. anchor/left = 1
  279. anchor/right = 1
  280. focus/ignore_mouse = true
  281. focus/stop_mouse = true
  282. size_flags/horizontal = 2
  283. size_flags/vertical = 0
  284. margin/left = 140.0
  285. margin/top = 20.0
  286. margin/right = 20.0
  287. margin/bottom = 40.0
  288. text = "Screen:"
  289. valign = 1
  290. percent_visible = 1.0
  291. lines_skipped = 0
  292. max_lines_visible = -1
  293. [node name="Label_Screen0_Resolution" type="Label" parent="Control"]
  294. anchor/left = 1
  295. anchor/right = 1
  296. focus/ignore_mouse = true
  297. focus/stop_mouse = true
  298. size_flags/horizontal = 2
  299. size_flags/vertical = 0
  300. margin/left = 140.0
  301. margin/top = 340.0
  302. margin/right = 16.0
  303. margin/bottom = 353.0
  304. text = "Screen0 Resolution: "
  305. valign = 1
  306. percent_visible = 1.0
  307. lines_skipped = 0
  308. max_lines_visible = -1
  309. [node name="Label_Screen0_Position" type="Label" parent="Control"]
  310. anchor/left = 1
  311. anchor/right = 1
  312. focus/ignore_mouse = true
  313. focus/stop_mouse = true
  314. size_flags/horizontal = 2
  315. size_flags/vertical = 0
  316. margin/left = 140.0
  317. margin/top = 380.0
  318. margin/right = 16.0
  319. margin/bottom = 396.0
  320. text = "Screen0 Position: "
  321. valign = 1
  322. percent_visible = 1.0
  323. lines_skipped = 0
  324. max_lines_visible = -1
  325. [node name="Label_Screen0_DPI" type="Label" parent="Control"]
  326. anchor/left = 1
  327. anchor/right = 1
  328. focus/ignore_mouse = true
  329. focus/stop_mouse = true
  330. size_flags/horizontal = 2
  331. size_flags/vertical = 0
  332. margin/left = 140.0
  333. margin/top = 416.0
  334. margin/right = 16.0
  335. margin/bottom = 432.0
  336. text = "Screen0 DPI:"
  337. valign = 1
  338. percent_visible = 1.0
  339. lines_skipped = 0
  340. max_lines_visible = -1
  341. [node name="Label_Screen1_Resolution" type="Label" parent="Control"]
  342. anchor/left = 1
  343. anchor/right = 1
  344. focus/ignore_mouse = true
  345. focus/stop_mouse = true
  346. size_flags/horizontal = 2
  347. size_flags/vertical = 0
  348. margin/left = 140.0
  349. margin/top = 451.0
  350. margin/right = 16.0
  351. margin/bottom = 467.0
  352. text = "Screen1 Resolution: "
  353. valign = 1
  354. percent_visible = 1.0
  355. lines_skipped = 0
  356. max_lines_visible = -1
  357. [node name="Label_Screen1_Position" type="Label" parent="Control"]
  358. anchor/left = 1
  359. anchor/right = 1
  360. focus/ignore_mouse = true
  361. focus/stop_mouse = true
  362. size_flags/horizontal = 2
  363. size_flags/vertical = 0
  364. margin/left = 140.0
  365. margin/top = 489.0
  366. margin/right = 16.0
  367. margin/bottom = 505.0
  368. text = "Screen1 Position: "
  369. valign = 1
  370. percent_visible = 1.0
  371. lines_skipped = 0
  372. max_lines_visible = -1
  373. [node name="Label_Screen1_DPI" type="Label" parent="Control"]
  374. anchor/left = 1
  375. anchor/right = 1
  376. focus/ignore_mouse = true
  377. focus/stop_mouse = true
  378. size_flags/horizontal = 2
  379. size_flags/vertical = 0
  380. margin/left = 140.0
  381. margin/top = 524.0
  382. margin/right = 16.0
  383. margin/bottom = 540.0
  384. text = "Screen1 DPI:"
  385. valign = 1
  386. percent_visible = 1.0
  387. lines_skipped = 0
  388. max_lines_visible = -1
  389. [node name="Label_KeyInfo" type="Label" parent="Control"]
  390. anchor/top = 1
  391. anchor/bottom = 1
  392. focus/ignore_mouse = true
  393. focus/stop_mouse = true
  394. size_flags/horizontal = 2
  395. size_flags/vertical = 0
  396. margin/left = 20.0
  397. margin/top = 122.0
  398. margin/right = 286.0
  399. margin/bottom = 63.0
  400. text = "F1: activate MOUSE_MODE_VISIBLE\nF2: activate MOUSE_MODE_HIDDEN\nF3: activate MOUSE_MODE_CAPTURED"
  401. valign = 2
  402. percent_visible = 1.0
  403. lines_skipped = 0
  404. max_lines_visible = -1
  405. [node name="Label_MouseModeCaptured_KeyInfo" type="Label" parent="Control"]
  406. anchor/top = 1
  407. anchor/bottom = 1
  408. focus/ignore_mouse = true
  409. focus/stop_mouse = true
  410. size_flags/horizontal = 2
  411. size_flags/vertical = 0
  412. margin/left = 20.0
  413. margin/top = 65.0
  414. margin/right = 286.0
  415. margin/bottom = 11.0
  416. text = "ESC: deactivate MOUSE_MODE_CAPTURED\nW, S: move forward, backward\nA, D: strafe left, right"
  417. valign = 2
  418. percent_visible = 1.0
  419. lines_skipped = 0
  420. max_lines_visible = -1
  421. [node name="Label_MouseModes" type="Label" parent="Control"]
  422. anchor/top = 1
  423. anchor/bottom = 1
  424. focus/ignore_mouse = true
  425. focus/stop_mouse = true
  426. size_flags/horizontal = 2
  427. size_flags/vertical = 0
  428. margin/left = 20.0
  429. margin/top = 249.0
  430. margin/right = 286.0
  431. margin/bottom = 227.0
  432. text = "MouseModes:"
  433. valign = 2
  434. percent_visible = 1.0
  435. lines_skipped = 0
  436. max_lines_visible = -1
  437. [node name="ImplementationDialog" type="AcceptDialog" parent="Control"]
  438. visibility/visible = false
  439. focus/ignore_mouse = false
  440. focus/stop_mouse = true
  441. size_flags/horizontal = 2
  442. size_flags/vertical = 2
  443. margin/left = 200.0
  444. margin/top = 100.0
  445. margin/right = 600.0
  446. margin/bottom = 450.0
  447. popup/exclusive = false
  448. window/title = "Please be advised..."
  449. dialog/hide_on_ok = true
  450. [node name="Text" type="Label" parent="Control/ImplementationDialog"]
  451. focus/ignore_mouse = true
  452. focus/stop_mouse = true
  453. size_flags/horizontal = 2
  454. size_flags/vertical = 0
  455. margin/left = 16.0
  456. margin/top = 20.0
  457. margin/right = 378.0
  458. margin/bottom = 298.0
  459. text = "This is an Implementation-Test-Demo\n\nIt is used to help implementing a new window handling api\nacross platforms.\n\nYour platform lacks at the moment the following methods:\n"
  460. percent_visible = 1.0
  461. lines_skipped = 0
  462. max_lines_visible = -1
  463. [connection signal="pressed" from="Control/Button_Fullscreen" to="Control" method="_on_Button_Fullscreen_pressed"]
  464. [connection signal="pressed" from="Control/Button_FixedSize" to="Control" method="_on_Button_FixedSize_pressed"]
  465. [connection signal="pressed" from="Control/Button_Minimized" to="Control" method="_on_Button_Minimized_pressed"]
  466. [connection signal="pressed" from="Control/Button_Maximized" to="Control" method="_on_Button_Maximized_pressed"]
  467. [connection signal="pressed" from="Control/Button_MoveTo" to="Control" method="_on_Button_MoveTo_pressed"]
  468. [connection signal="pressed" from="Control/Button_Resize" to="Control" method="_on_Button_Resize_pressed"]
  469. [connection signal="pressed" from="Control/Button_Screen0" to="Control" method="_on_Button_Screen0_pressed"]
  470. [connection signal="pressed" from="Control/Button_Screen1" to="Control" method="_on_Button_Screen1_pressed"]
  471. [connection signal="pressed" from="Control/Button_MouseModeVisible" to="Control" method="_on_Button_MouseModeVisible_pressed"]
  472. [connection signal="pressed" from="Control/Button_MouseModeHidden" to="Control" method="_on_Button_MouseModeHidden_pressed"]
  473. [connection signal="pressed" from="Control/Button_MouseModeCaptured" to="Control" method="_on_Button_MouseModeCaptured_pressed"]