WindowDialog.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="WindowDialog" inherits="Popup" version="3.6" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. Base class for window dialogs.
  5. </brief_description>
  6. <description>
  7. Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel [Control] that draws a window decoration and allows motion and resizing.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_close_button">
  13. <return type="TextureButton" />
  14. <description>
  15. Returns the close [TextureButton].
  16. [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
  17. </description>
  18. </method>
  19. </methods>
  20. <members>
  21. <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" default="false">
  22. If [code]true[/code], the user can resize the window.
  23. </member>
  24. <member name="window_title" type="String" setter="set_title" getter="get_title" default="&quot;&quot;">
  25. The text displayed in the window's title bar.
  26. </member>
  27. </members>
  28. <constants>
  29. </constants>
  30. <theme_items>
  31. <theme_item name="title_color" data_type="color" type="Color" default="Color( 0, 0, 0, 1 )">
  32. The color of the title text.
  33. </theme_item>
  34. <theme_item name="close_h_ofs" data_type="constant" type="int" default="18">
  35. The horizontal offset of the close button.
  36. </theme_item>
  37. <theme_item name="close_v_ofs" data_type="constant" type="int" default="18">
  38. The vertical offset of the close button.
  39. </theme_item>
  40. <theme_item name="scaleborder_size" data_type="constant" type="int" default="4">
  41. The thickness of the border that can be dragged when scaling the window (if [member resizable] is enabled).
  42. </theme_item>
  43. <theme_item name="title_height" data_type="constant" type="int" default="20">
  44. The vertical offset of the title text.
  45. </theme_item>
  46. <theme_item name="title_font" data_type="font" type="Font">
  47. The font used to draw the title.
  48. </theme_item>
  49. <theme_item name="close" data_type="icon" type="Texture">
  50. The icon for the close button.
  51. </theme_item>
  52. <theme_item name="close_highlight" data_type="icon" type="Texture">
  53. The icon used for the close button when it's hovered with the mouse cursor.
  54. </theme_item>
  55. <theme_item name="panel" data_type="style" type="StyleBox">
  56. The style for both the content background of the [WindowDialog] and the title bar. The title bar is created with a top border and an expand margin using the [code]panel[/code] stylebox.
  57. </theme_item>
  58. </theme_items>
  59. </class>