# Relative Dialog Item

Grammar — Relative dialog item of dialogItem for player
FlagsNative | Function

Returns the dialog item that the specified dialog item is anchored relative to.

# Arguments

  • int<control> — Dialog Item
  • int — Player

Returns — int<control>

native int DialogControlGetRelativeControl(
	int control,
	int player,
);

Category: Dialog / Dialog Item Size And Position

# Examples

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:1775

    // Implementation
    lv_x = IntToFixed(DialogControlGetOffsetX(lp_dialogItem, lp_player));
    if ((DialogControlGetRelativeControl(lp_dialogItem, lp_player) == c_invalidDialogControlId)) {
        lv_anchor = DialogControlGetAnchor(lp_dialogItem, lp_player);
        if (((lv_anchor == c_anchorTopLeft) || (lv_anchor == c_anchorTopRight) || (lv_anchor == c_anchorBottomLeft) || (lv_anchor == c_anchorBottomRight) || (lv_anchor == c_anchorLeft) || (lv_anchor == c_anchorRight))) {

campaigns/libertystory.sc2campaignbase.sc2data/TriggerLibs/CampaignLib.galaxy:1796

    // Implementation
    lv_y = IntToFixed(DialogControlGetOffsetY(lp_dialogItem, lp_player));
    if ((DialogControlGetRelativeControl(lp_dialogItem, lp_player) == c_invalidDialogControlId)) {
        lv_anchor = DialogControlGetAnchor(lp_dialogItem, lp_player);
        if (((lv_anchor == c_anchorTopLeft) || (lv_anchor == c_anchorTopRight) || (lv_anchor == c_anchorBottomLeft) || (lv_anchor == c_anchorBottomRight) || (lv_anchor == c_anchorTop) || (lv_anchor == c_anchorBottom))) {