diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 232357f8222c..4d52eacba82c 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,13 +26,13 @@ The currently selected color. - If [code]true[/code], the color will apply only after user releases mouse button, otherwise it will apply immediatly even in mouse motion event (which can cause performance issues). + If [code]true[/code] the color will apply only after the user releases the mouse button, otherwise it will apply immediatly even in mouse motion event (which can cause performance issues). - 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 d049e936a840..6ac2911c11da 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 69a70cfa394b..e1bffb719e14 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 d11b369e687a..2efb529f310e 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]. @@ -129,7 +129,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 @@ -148,10 +148,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] @@ -173,6 +173,7 @@ + Returns [member margin_left] and [member margin_top]. See also [member rect_position]. @@ -207,7 +208,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]. @@ -220,7 +221,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)) @@ -232,14 +233,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. @@ -256,7 +257,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]. @@ -273,33 +274,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). @@ -318,7 +321,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. @@ -374,7 +377,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]. @@ -457,7 +460,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. @@ -516,7 +519,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. @@ -534,15 +537,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() @@ -564,7 +567,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. @@ -585,7 +588,7 @@ - Set the rotation (in radians). + Sets the rotation (in radians). @@ -594,7 +597,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. @@ -753,22 +756,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. @@ -777,7 +780,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]. @@ -903,7 +906,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].