control_gallery.tscn 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. [gd_scene load_steps=6 format=2]
  2. [ext_resource path="res://icon.png" type="Texture" id=1]
  3. [ext_resource path="res://noto_sans_ui_regular.ttf" type="DynamicFontData" id=2]
  4. [sub_resource type="DynamicFont" id=1]
  5. font_data = ExtResource( 2 )
  6. [sub_resource type="Theme" id=2]
  7. default_font = SubResource( 1 )
  8. [sub_resource type="ButtonGroup" id=3]
  9. [node name="ControlGallery" type="Control"]
  10. anchor_right = 1.0
  11. anchor_bottom = 1.0
  12. theme = SubResource( 2 )
  13. __meta__ = {
  14. "_edit_use_anchors_": false
  15. }
  16. [node name="MainPanel" type="ColorRect" parent="."]
  17. anchor_right = 1.0
  18. anchor_bottom = 1.0
  19. color = Color( 0.113725, 0.113725, 0.113725, 1 )
  20. [node name="HSplitContainer" type="HSplitContainer" parent="MainPanel"]
  21. anchor_right = 1.0
  22. anchor_bottom = 1.0
  23. margin_left = 10.0
  24. margin_top = 10.0
  25. margin_right = -10.0
  26. margin_bottom = -10.0
  27. custom_constants/separation = 10
  28. __meta__ = {
  29. "_edit_use_anchors_": false
  30. }
  31. [node name="BasicControls" type="Panel" parent="MainPanel/HSplitContainer"]
  32. margin_right = 329.0
  33. margin_bottom = 580.0
  34. rect_min_size = Vector2( 280, 0 )
  35. size_flags_horizontal = 3
  36. [node name="VBoxContainer" type="VBoxContainer" parent="MainPanel/HSplitContainer/BasicControls"]
  37. anchor_right = 1.0
  38. anchor_bottom = 1.0
  39. margin_left = 10.0
  40. margin_top = 10.0
  41. margin_right = -10.0
  42. margin_bottom = -10.0
  43. size_flags_horizontal = 3
  44. custom_constants/separation = 15
  45. __meta__ = {
  46. "_edit_use_anchors_": false
  47. }
  48. [node name="Title" type="Label" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  49. margin_right = 309.0
  50. margin_bottom = 23.0
  51. custom_colors/font_color = Color( 1, 1, 1, 0.627451 )
  52. text = "Basic controls"
  53. align = 1
  54. __meta__ = {
  55. "_edit_use_anchors_": false
  56. }
  57. [node name="Button" type="Button" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  58. margin_top = 38.0
  59. margin_right = 309.0
  60. margin_bottom = 67.0
  61. text = "Button"
  62. [node name="LinkButton" type="LinkButton" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  63. margin_top = 82.0
  64. margin_right = 309.0
  65. margin_bottom = 105.0
  66. hint_tooltip = "Hint Tooltip"
  67. text = "LinkButton (hover me for tooltip)"
  68. __meta__ = {
  69. "_edit_use_anchors_": false
  70. }
  71. [node name="ColorPickerContainer" type="HBoxContainer" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  72. margin_top = 120.0
  73. margin_right = 309.0
  74. margin_bottom = 149.0
  75. custom_constants/separation = 10
  76. [node name="ColorPickerButton" type="ColorPickerButton" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer/ColorPickerContainer"]
  77. margin_right = 64.0
  78. margin_bottom = 29.0
  79. rect_min_size = Vector2( 64, 0 )
  80. color = Color( 0.278431, 0.54902, 0.74902, 1 )
  81. __meta__ = {
  82. "_edit_use_anchors_": false
  83. }
  84. [node name="Label" type="Label" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer/ColorPickerContainer"]
  85. margin_left = 74.0
  86. margin_top = 3.0
  87. margin_right = 214.0
  88. margin_bottom = 26.0
  89. text = "ColorPickerButton"
  90. [node name="CheckBox" type="CheckBox" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  91. margin_top = 164.0
  92. margin_right = 309.0
  93. margin_bottom = 195.0
  94. text = "CheckBox"
  95. [node name="CheckButton" type="CheckButton" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  96. margin_top = 210.0
  97. margin_right = 309.0
  98. margin_bottom = 250.0
  99. text = "CheckButton"
  100. [node name="LineEdit" type="LineEdit" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  101. margin_top = 265.0
  102. margin_right = 309.0
  103. margin_bottom = 298.0
  104. text = "LineEdit"
  105. [node name="TextEdit" type="TextEdit" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  106. margin_top = 313.0
  107. margin_right = 309.0
  108. margin_bottom = 413.0
  109. rect_min_size = Vector2( 0, 100 )
  110. text = "TextEdit
  111. Unlike LineEdit, I accept multiple lines."
  112. __meta__ = {
  113. "_edit_use_anchors_": false
  114. }
  115. [node name="Label" type="Label" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  116. margin_top = 428.0
  117. margin_right = 309.0
  118. margin_bottom = 451.0
  119. text = "Label"
  120. [node name="TabContainer" type="TabContainer" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer"]
  121. margin_top = 466.0
  122. margin_right = 309.0
  123. margin_bottom = 546.0
  124. rect_min_size = Vector2( 0, 80 )
  125. __meta__ = {
  126. "_edit_use_anchors_": false
  127. }
  128. [node name="Tab 1" type="Control" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer/TabContainer"]
  129. anchor_right = 1.0
  130. anchor_bottom = 1.0
  131. margin_left = 4.0
  132. margin_top = 41.0
  133. margin_right = -4.0
  134. margin_bottom = -4.0
  135. [node name="RichTextLabel" type="RichTextLabel" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer/TabContainer/Tab 1"]
  136. anchor_right = 1.0
  137. anchor_bottom = 1.0
  138. margin_top = 5.0
  139. bbcode_enabled = true
  140. bbcode_text = "[center]RichTextLabel: [color=#8ff]Tab 1[/color] is selected.[/center]"
  141. text = "RichTextLabel: Tab 1 is selected."
  142. __meta__ = {
  143. "_edit_use_anchors_": false
  144. }
  145. [node name="Tab 2" type="Control" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer/TabContainer"]
  146. visible = false
  147. anchor_right = 1.0
  148. anchor_bottom = 1.0
  149. margin_left = 4.0
  150. margin_top = 41.0
  151. margin_right = -4.0
  152. margin_bottom = -4.0
  153. [node name="RichTextLabel" type="RichTextLabel" parent="MainPanel/HSplitContainer/BasicControls/VBoxContainer/TabContainer/Tab 2"]
  154. anchor_right = 1.0
  155. anchor_bottom = 1.0
  156. margin_top = 5.0
  157. bbcode_enabled = true
  158. bbcode_text = "[center]RichTextLabel: [color=#ff8]Tab 2[/color] is selected.[/center]"
  159. text = "RichTextLabel: Tab 2 is selected."
  160. __meta__ = {
  161. "_edit_use_anchors_": false
  162. }
  163. [node name="VSplitContainer" type="VSplitContainer" parent="MainPanel/HSplitContainer"]
  164. margin_left = 339.0
  165. margin_right = 1004.0
  166. margin_bottom = 580.0
  167. rect_min_size = Vector2( 350, 0 )
  168. size_flags_horizontal = 3
  169. size_flags_stretch_ratio = 2.0
  170. [node name="Numbers" type="Panel" parent="MainPanel/HSplitContainer/VSplitContainer"]
  171. margin_right = 665.0
  172. margin_bottom = 260.0
  173. rect_min_size = Vector2( 0, 260 )
  174. size_flags_vertical = 3
  175. __meta__ = {
  176. "_edit_use_anchors_": false
  177. }
  178. [node name="VBoxContainer" type="VBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers"]
  179. anchor_right = 1.0
  180. anchor_bottom = 1.0
  181. margin_left = 10.0
  182. margin_top = 10.0
  183. margin_right = -10.0
  184. margin_bottom = -10.0
  185. custom_constants/separation = 10
  186. __meta__ = {
  187. "_edit_use_anchors_": false
  188. }
  189. [node name="Title" type="Label" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer"]
  190. margin_right = 645.0
  191. margin_bottom = 23.0
  192. custom_colors/font_color = Color( 1, 1, 1, 0.627451 )
  193. text = "Numbers"
  194. align = 1
  195. __meta__ = {
  196. "_edit_use_anchors_": false
  197. }
  198. [node name="SpinBox" type="SpinBox" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer"]
  199. margin_top = 33.0
  200. margin_right = 190.0
  201. margin_bottom = 66.0
  202. rect_min_size = Vector2( 190, 0 )
  203. size_flags_horizontal = 0
  204. prefix = "SpinBox"
  205. [node name="HSliderContainer" type="HBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer"]
  206. margin_top = 76.0
  207. margin_right = 645.0
  208. margin_bottom = 99.0
  209. custom_constants/separation = 10
  210. __meta__ = {
  211. "_edit_use_anchors_": false
  212. }
  213. [node name="HSlider" type="HSlider" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/HSliderContainer"]
  214. margin_right = 190.0
  215. margin_bottom = 16.0
  216. rect_min_size = Vector2( 190, 0 )
  217. __meta__ = {
  218. "_edit_use_anchors_": false
  219. }
  220. [node name="Label" type="Label" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/HSliderContainer"]
  221. margin_left = 200.0
  222. margin_right = 255.0
  223. margin_bottom = 23.0
  224. text = "HSlider"
  225. __meta__ = {
  226. "_edit_use_anchors_": false
  227. }
  228. [node name="ProgressBarContainer" type="HBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer"]
  229. margin_top = 109.0
  230. margin_right = 645.0
  231. margin_bottom = 132.0
  232. custom_constants/separation = 10
  233. __meta__ = {
  234. "_edit_use_anchors_": false
  235. }
  236. [node name="ProgressBar" type="ProgressBar" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/ProgressBarContainer"]
  237. margin_right = 190.0
  238. margin_bottom = 23.0
  239. rect_min_size = Vector2( 190, 0 )
  240. value = 50.0
  241. __meta__ = {
  242. "_edit_use_anchors_": false
  243. }
  244. [node name="Label" type="Label" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/ProgressBarContainer"]
  245. margin_left = 200.0
  246. margin_right = 295.0
  247. margin_bottom = 23.0
  248. text = "ProgressBar"
  249. [node name="HSeparatorContainer" type="HBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer"]
  250. margin_top = 142.0
  251. margin_right = 645.0
  252. margin_bottom = 165.0
  253. custom_constants/separation = 10
  254. __meta__ = {
  255. "_edit_use_anchors_": false
  256. }
  257. [node name="HSeparatorLeft" type="HSeparator" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/HSeparatorContainer"]
  258. margin_right = 268.0
  259. margin_bottom = 23.0
  260. size_flags_horizontal = 3
  261. [node name="Label" type="Label" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/HSeparatorContainer"]
  262. margin_left = 278.0
  263. margin_right = 366.0
  264. margin_bottom = 23.0
  265. text = "HSeparator"
  266. __meta__ = {
  267. "_edit_use_anchors_": false
  268. }
  269. [node name="HSeparatorRight" type="HSeparator" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/HSeparatorContainer"]
  270. margin_left = 376.0
  271. margin_right = 645.0
  272. margin_bottom = 23.0
  273. size_flags_horizontal = 3
  274. [node name="TextureProgressContainer" type="HBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer"]
  275. margin_top = 175.0
  276. margin_right = 645.0
  277. margin_bottom = 239.0
  278. custom_constants/separation = 10
  279. __meta__ = {
  280. "_edit_use_anchors_": false
  281. }
  282. [node name="Control" type="Control" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/TextureProgressContainer"]
  283. margin_right = 64.0
  284. margin_bottom = 64.0
  285. rect_min_size = Vector2( 64, 64 )
  286. [node name="TextureProgress" type="TextureProgress" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/TextureProgressContainer/Control"]
  287. anchor_right = 1.0
  288. anchor_bottom = 1.0
  289. rect_scale = Vector2( 0.5, 0.5 )
  290. value = 67.0
  291. texture_progress = ExtResource( 1 )
  292. fill_mode = 4
  293. __meta__ = {
  294. "_edit_use_anchors_": false
  295. }
  296. [node name="Label" type="Label" parent="MainPanel/HSplitContainer/VSplitContainer/Numbers/VBoxContainer/TextureProgressContainer"]
  297. margin_left = 74.0
  298. margin_top = 20.0
  299. margin_right = 201.0
  300. margin_bottom = 43.0
  301. text = "TextureProgress"
  302. [node name="Lists" type="Panel" parent="MainPanel/HSplitContainer/VSplitContainer"]
  303. margin_top = 272.0
  304. margin_right = 665.0
  305. margin_bottom = 580.0
  306. rect_min_size = Vector2( 0, 220 )
  307. size_flags_horizontal = 3
  308. size_flags_vertical = 3
  309. size_flags_stretch_ratio = 2.5
  310. [node name="VBoxContainer" type="VBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Lists"]
  311. anchor_right = 1.0
  312. anchor_bottom = 1.0
  313. margin_left = 10.0
  314. margin_top = 10.0
  315. margin_right = -10.0
  316. margin_bottom = -10.0
  317. custom_constants/separation = 10
  318. __meta__ = {
  319. "_edit_use_anchors_": false
  320. }
  321. [node name="Title" type="Label" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer"]
  322. margin_right = 645.0
  323. margin_bottom = 23.0
  324. custom_colors/font_color = Color( 1, 1, 1, 0.627451 )
  325. text = "Lists"
  326. align = 1
  327. __meta__ = {
  328. "_edit_use_anchors_": false
  329. }
  330. [node name="OptionButton" type="OptionButton" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer"]
  331. margin_top = 33.0
  332. margin_right = 200.0
  333. margin_bottom = 62.0
  334. rect_min_size = Vector2( 200, 0 )
  335. size_flags_horizontal = 0
  336. text = "OptionButton"
  337. items = [ "OptionButton", null, false, 0, null, "Item 1", null, false, 1, null, "Item 2", null, false, 2, null, "Disabled Item", null, true, 3, null ]
  338. selected = 0
  339. [node name="MenuButton" type="MenuButton" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer"]
  340. margin_top = 72.0
  341. margin_right = 200.0
  342. margin_bottom = 101.0
  343. rect_min_size = Vector2( 200, 0 )
  344. size_flags_horizontal = 0
  345. text = "MenuButton"
  346. flat = false
  347. items = [ "Action Item", null, 0, false, false, 0, 0, null, "", false, "Separator", null, 0, false, false, 1, 0, null, "", true, "Checkbox Item 1", null, 1, true, false, 2, 0, null, "", false, "Checkbox Item 2", null, 1, false, false, 3, 0, null, "", false, "Disabled Checkbox Item", null, 0, false, true, 4, 0, null, "", false, "Radio Item 1", null, 2, true, false, 5, 0, null, "", false, "Radio Item 2", null, 2, false, false, 6, 0, null, "", false ]
  348. [node name="RadioButtons" type="VBoxContainer" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer"]
  349. margin_top = 111.0
  350. margin_right = 329.0
  351. margin_bottom = 200.0
  352. size_flags_horizontal = 0
  353. custom_constants/separation = -2
  354. [node name="CheckBox" type="CheckBox" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer/RadioButtons"]
  355. margin_right = 329.0
  356. margin_bottom = 31.0
  357. pressed = true
  358. group = SubResource( 3 )
  359. text = "CheckBox with ButtonGroup assigned 1"
  360. [node name="CheckBox2" type="CheckBox" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer/RadioButtons"]
  361. margin_top = 29.0
  362. margin_right = 329.0
  363. margin_bottom = 60.0
  364. group = SubResource( 3 )
  365. text = "CheckBox with ButtonGroup assigned 2"
  366. [node name="CheckBox3" type="CheckBox" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer/RadioButtons"]
  367. margin_top = 58.0
  368. margin_right = 329.0
  369. margin_bottom = 89.0
  370. group = SubResource( 3 )
  371. text = "CheckBox with ButtonGroup assigned 3"
  372. [node name="ItemList" type="ItemList" parent="MainPanel/HSplitContainer/VSplitContainer/Lists/VBoxContainer"]
  373. margin_top = 210.0
  374. margin_right = 645.0
  375. margin_bottom = 288.0
  376. hint_tooltip = "This ItemList allows multiple selection.
  377. Hold Ctrl or Shift to select multiple items."
  378. size_flags_vertical = 3
  379. items = [ "ItemList - Item 1", null, false, "ItemList - Item 2", null, false, "ItemList - Disabled item with icon assigned", ExtResource( 1 ), true, "ItemList - Item 3 with icon assigned", ExtResource( 1 ), false ]
  380. select_mode = 1
  381. fixed_icon_size = Vector2( 16, 16 )