Page MenuHomeFeedback Tracker

Introduce ctrlGroup and ctrlGroupControls commands
New, WishlistPublic

Description

ctrlGroup - Command to retrieve a control's parent ControlsGroup.

Syntax : ctrlGroup control

Arguments:
control - UI control.

Return :
Control of type CT_CONTROLS_GROUP (15)
controlNull if arg control is not in a ControlsGroup.

Example :

_controlsGroup = ctrlGroup _control;

Details

Legacy ID
416670539
Severity
None
Resolution
Open
Reproducibility
N/A
Category
Feature Request
Steps To Reproduce

Given a control variable it is not easy to get the ControlsGroup it belongs to.

Additional Information

Thanks for the consideration, keep up the good work this game is great.

Event Timeline

gidsacha edited Steps To Reproduce. (Show Details)Jan 30 2015, 1:44 AM
gidsacha edited Additional Information. (Show Details)
gidsacha set Category to Feature Request.
gidsacha set Reproducibility to N/A.
gidsacha set Severity to None.
gidsacha set Resolution to Open.
gidsacha set Legacy ID to 416670539.May 7 2016, 8:11 PM

What does ctrlParent return?

ctrlParent returns the parent display, regardless if the control is in a group or not.

The reverse command would also be usefull :

  _controls = ctrlGroupControls _controlsGroup;

returns an array containing all controls within _controlsGroup.

Larrow added a subscriber: Larrow.Nov 11 2016, 11:33 PM

An allControlsGroupControls would be extremely helpful seeing as currently allControls is only for displays.

Also the ability to remove the mouse wheel scroll from a ctrlGroup. Currently any controlsGroup that has children outside of its Y bounds can be scrolled using the mouse wheel, no matter if it has 0 scrollbar width or height, or even if you issue a ctrlRemoveAllEventHandlers "MouseZChanged" you can still scroll the ctrlGroup.

This means using a ctrlGroup as a component area for things like a node editor where you would want to drag the main group(window) via Mouse Button 1 and handle the child positions in script, quickly breaks down due to this behaviour.
There is no way to even get the current scroll position so you can handle the offset yourself.

Even for things like info windows, if using a ctrlGroup that has been scrolled and then refilled with info there is no way to reset the control to the top which in doing so would present the end user with the new info from the begining, instead the end user is left where the ctrlGroup was previously scrolled to.

Hope that makes sense, ctrlGroups could be so more useful if we had more control over how they behave.

ctrlParent returns the parent display, regardless if the control is in a group or not.

Use ctrlParentControlsGroup