diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index e44df6d022d..9cc0cda5610 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -4,7 +4,7 @@ Color picker control. - This is a simple color picker [Control]. It's useful for selecting a color from an RGB/RGBA colorspace. + [Control] node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace. @@ -17,7 +17,7 @@ - Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker. + Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. Note: the presets list is only for [i]this[/i] color picker. @@ -26,10 +26,10 @@ The currently selected color. - If [code]true[/code], shows an alpha channel slider (transparency). + If [code]true[/code] shows an alpha channel slider (transparency). - If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). + If [code]true[/code] allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 1a40c883143..99a30cdc08f 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -4,7 +4,7 @@ Button that pops out a [ColorPicker]. - Encapsulates a [ColorPicker] making it accesible by pressing a button, pressing the button will toggle the [ColorPicker] visibility + Encapsulates a [ColorPicker] making it accesible by pressing a button. Pressing the button will toggle the [ColorPicker] visibility. @@ -15,14 +15,14 @@ - Returns the [code]ColorPicker[/code] that this [code]ColorPickerButton[/code] toggles. + Returns the [ColorPicker] that this node toggles. - Returns the control's [PopupPanel] which allows you to connect to Popup Signals. This allows you to handle events when the ColorPicker is shown or hidden. + Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index 8748ec05444..25f21a77348 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -1,10 +1,10 @@ - Colored rect for canvas. + Colored rectangle. - An object that is represented on the canvas as a rect with color. [Color] is used to set or get color info for the rect. + Displays a colored rectangle. @@ -14,9 +14,9 @@ - The color to fill the [code]ColorRect[/code]. + The fill color. [codeblock] - $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect node's color to red + $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red. [/codeblock] diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 52af6ffcd97..0f8367906a9 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1,7 +1,7 @@ - All User Interface nodes inherit from Control. Features anchors and margins to adapt its position and size to its parent. + All User Interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent. Base class for all User Interface or [i]UI[/i] related nodes. [code]Control[/code] features a bounding rectangle that defines its extents, an anchor position relative to its parent and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. @@ -23,7 +23,7 @@ - Returns the minimum size this Control can shrink to. The node can never be smaller than this minimum size. + Returns the minimum size for this control. See [member rect_min_size]. @@ -121,7 +121,7 @@ This method should only be used to test the data. Process the data in [method drop_data]. [codeblock] extends Control - + func can_drop_data(position, data): # check position if it is relevant to you # otherwise just check data @@ -140,10 +140,10 @@ Godot calls this method to pass you the [code]data[/code] from a control's [method get_drag_data] result. Godot first calls [method can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control. [codeblock] extends ColorRect - + func can_drop_data(position, data): return typeof(data) == TYPE_DICTIONARY and data.has('color') - + func drop_data(position, data): color = data['color'] [/codeblock] @@ -165,6 +165,7 @@ + Returns [member margin_left] and [member margin_top]. See also [member rect_position]. @@ -199,7 +200,7 @@ - Returns the mouse cursor shape the control displays on mouse hover, one of the [code]CURSOR_*[/code] constants. + Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape]. @@ -212,7 +213,7 @@ A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. [codeblock] extends Control - + func get_drag_data(position): var mydata = make_data() set_drag_preview(make_preview(mydata)) @@ -224,14 +225,14 @@ - Returns MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). + Returns [member margin_right] and [member margin_bottom]. - Return which control is owning the keyboard focus, or null if no one. + Returns the control that has the keyboard focus or [code]null[/code] if none. @@ -248,7 +249,7 @@ - Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_position], [method get_size]). + Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size]. @@ -265,33 +266,35 @@ - Return the minimum size this Control can shrink to. A control will never be displayed or resized smaller than its minimum size. + Returns the minimum size for this control. See [member rect_min_size]. + Returns the width/height occupied in the parent control. + Returns the parent control node. - Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_position], [method get_size]). + Returns the position and size of the control relative to the top-left corner of the parent Control. See [member rect_position] and [member rect_size]. - Return the rotation (in radians) + Returns the rotation (in radians). @@ -310,7 +313,7 @@ - Return the tooltip, which will appear when the cursor is resting over this control. + Returns the tooltip, which will appear when the cursor is resting over this control. @@ -366,7 +369,7 @@ - Return whether the Control is the current focused control (see [method set_focus_mode]). + Returns [code]true[/code] if this is the current focused control. See [member focus_mode]. @@ -449,7 +452,7 @@ - Give up the focus, no other control will be able to receive keyboard input. + Give up the focus. No other control will be able to receive keyboard input. @@ -508,7 +511,7 @@ - Sets MARGIN_LEFT and MARGIN_TOP at the same time. This is a helper (see [method set_margin]). + Sets [member margin_left] and [member margin_top] at the same time. @@ -526,15 +529,15 @@ extends Control func _ready(): set_drag_forwarding(target_control) - + # TargetControl.gd extends Control func can_drop_data_fw(position, data, from_control): return true - + func drop_data_fw(position, data, from_control): my_handle_data(data) - + func get_drag_data_fw(position, from_control): set_drag_preview(my_preview) return my_data() @@ -556,7 +559,7 @@ - Sets MARGIN_RIGHT and MARGIN_BOTTOM at the same time. This is a helper (see [method set_margin]). + Sets [member margin_right] and [member margin_bottom] at the same time. @@ -577,7 +580,7 @@ - Set the rotation (in radians). + Sets the rotation (in radians). @@ -586,7 +589,7 @@ - Display a Control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. + Displays a control as modal. Control must be a subwindow. Modal controls capture the input signals until closed or the area outside them is accessed. When a modal control loses focus, or the ESC key is pressed, they automatically hide. Modal controls are used extensively for popup dialogs and menus. @@ -744,22 +747,22 @@ - The node cannot grab focus. Use with [member set_focus_mode]. + The node cannot grab focus. Use with [member focus_mode]. - The node can only grab focus on mouse clicks. Use with [member set_focus_mode]. + The node can only grab focus on mouse clicks. Use with [member focus_mode]. - The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with [member set_focus_mode]. + The node can grab focus on mouse click or using the arrows and the Tab keys on the keyboard. Use with [member focus_mode]. Sent when the node changes size. Use [member rect_size] to get the new size. - Sent when the mouse pointer enters the node's [code]Rect[/code] area. + Sent when the mouse pointer enters the node. - Sent when the mouse pointer exits the node's [code]Rect[/code] area. + Sent when the mouse pointer exits the node. Sent when the node grabs focus. @@ -768,7 +771,7 @@ Sent when the node loses focus. - Sent when the node's [member theme] changes, right before Godot redraws the [code]Control[/code]. Happens when you call one of the [code]add_*_override[/code] + Sent when the node's [member theme] changes, right before Godot redraws the control. Happens when you call one of the [code]add_*_override[/code] Sent when an open modal dialog closes. See [member show_modal]. @@ -894,7 +897,7 @@ Sets the node's size flags to both fill and expand. See the 2 constants above for more information. - Tells the parent [Container] to center the node in itself. It centers the [code]Control[/code] based on its bounding box, so it doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. + Tells the parent [Container] to center the node in itself. It centers the control based on its bounding box, so it doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical].