# Attach Dialog To Dialog

Grammar — Move dialog to (offsetX, offsetY) relative to relativeAnchor of relativeDialog (from anchor)
FlagsNative | Action

Moves a dialog to the specified anchor, relative to the anchor of another dialog, with the specified offsets.

# Arguments

  • int<dialog> — Dialog
  • int<preset::Anchor> — Anchor
  • int<dialog> — Relative Dialog
  • int<preset::Anchor> — Relative Anchor
  • int — OffsetX
  • int — OffsetY

Returns — void

native void DialogSetPositionRelative(
	int dialog,
	int anchor,
	int relative,
	int relativeAnchor,
	int offsetX,
	int offsetY,
);

Category: Dialog / Dialog Size And Position

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3548

    DialogCreate(1000, 100, c_anchorCenter, 0, 0, false);
    lv_dlg2 = DialogLastCreated();
    DialogSetPositionRelative(DialogLastCreated(), c_anchorTop, lv_dlg, c_anchorBottom, 0, -20);
    DialogSetImageVisible(DialogLastCreated(), false);
    libCamp_gf_CreateDialogItemInGrid(DialogLastCreated(), c_triggerControlTypeLabel, c_anchorCenter, 0.0, 0.0, 19.0, 1.6, StringExternal("Param/Value/CA138096"));

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3604

    gv_bossHPBarLabelDlg = DialogLastCreated();
    DialogSetImageVisible(DialogLastCreated(), false);
    DialogSetPositionRelative(DialogLastCreated(), c_anchorRight, gv_bossHPBarDlg, c_anchorLeft, -10, 0);
    DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 0, 0);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tarcade.sc2map/MapScript.galaxy:3652

    gv_unitHPBarLabelDlg = DialogLastCreated();
    DialogSetImageVisible(DialogLastCreated(), false);
    DialogSetPositionRelative(DialogLastCreated(), c_anchorTopRight, gv_unitHPBarDlg, c_anchorTopLeft, -10, 0);
    DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 0, 0);

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:16922

    libNtve_gf_DisplayScreenButton((ge_ScreenButtonID_ButtonPlay), StringExternal("Param/Value/067BD733"), 240, 80, c_anchorBottomRight, 320, 70, gt_CantinaArcadePlay);
    gf_FromatBackPlayButton(libNtve_gf_ScreenButton((ge_ScreenButtonID_ButtonPlay)));
    DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0);
    gf_DisplayRoomChangePanel();
    gf_ReturnFlahsing();

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tstory01.sc2map/MapScript.galaxy:22709

    libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), "WoL_CantinaArcade_PlayButton", PlayerGroupAll());
    gf_FromatBackPlayButton(libNtve_gf_ScreenButton((ge_ScreenButtonID_ButtonPlay)));
    DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0);
    return true;
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3548

    DialogCreate(1000, 100, c_anchorCenter, 0, 0, false);
    lv_dlg2 = DialogLastCreated();
    DialogSetPositionRelative(DialogLastCreated(), c_anchorTop, lv_dlg, c_anchorBottom, 0, -20);
    DialogSetImageVisible(DialogLastCreated(), false);
    libCamp_gf_CreateDialogItemInGrid(DialogLastCreated(), c_triggerControlTypeLabel, c_anchorCenter, 0.0, 0.0, 19.0, 1.6, StringExternal("Param/Value/CA138096"));

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3604

    gv_bossHPBarLabelDlg = DialogLastCreated();
    DialogSetImageVisible(DialogLastCreated(), false);
    DialogSetPositionRelative(DialogLastCreated(), c_anchorRight, gv_bossHPBarDlg, c_anchorLeft, -10, 0);
    DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 0, 0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tarcade.sc2mapMapScript.galaxy:3652

    gv_unitHPBarLabelDlg = DialogLastCreated();
    DialogSetImageVisible(DialogLastCreated(), false);
    DialogSetPositionRelative(DialogLastCreated(), c_anchorTopRight, gv_unitHPBarDlg, c_anchorTopLeft, -10, 0);
    DialogControlCreate(DialogLastCreated(), c_triggerControlTypeLabel);
    DialogControlSetPosition(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, 0, 0);

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:16922

    libNtve_gf_DisplayScreenButton((ge_ScreenButtonID_ButtonPlay), StringExternal("Param/Value/067BD733"), 240, 80, c_anchorBottomRight, 320, 70, gt_CantinaArcadePlay);
    gf_FromatBackPlayButton(libNtve_gf_ScreenButton((ge_ScreenButtonID_ButtonPlay)));
    DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0);
    gf_DisplayRoomChangePanel();
    gf_ReturnFlahsing();

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tstory01.sc2mapMapScript.galaxy:22709

    libNtve_gf_SetDialogItemHandle(DialogControlLastCreated(), "WoL_CantinaArcade_PlayButton", PlayerGroupAll());
    gf_FromatBackPlayButton(libNtve_gf_ScreenButton((ge_ScreenButtonID_ButtonPlay)));
    DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0);
    return true;
}

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

    lv_x = libCamp_gf_GD_GridToInteger(lp_offsetX, libCamp_ge_GRIDDLG_HV_Horizontal, libCamp_ge_GRIDDLG_HV2_NoneClient);
    lv_y = libCamp_gf_GD_GridToInteger(lp_offsetY, libCamp_ge_GRIDDLG_HV_Vertical, libCamp_ge_GRIDDLG_HV2_NoneClient);
    DialogSetPositionRelative(lp_dialog, lp_anchor, lp_relativeDialog, lp_relativeAnchor, lv_x, lv_y);
}

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:3010

    DialogControlSetPositionRelative(libVCUI_gv_pU_StarmapPlanetTitleCallout[1], PlayerGroupAll(), c_anchorBottomLeft, libVCUI_gv_pU_StarmapPlanetAttachPanel[1], c_anchorBottom, 0, 0);
    DialogControlSetPositionRelative(libVCUI_gv_pU_StarmapPlanetTitleCallout[2], PlayerGroupAll(), c_anchorBottomLeft, libVCUI_gv_pU_StarmapPlanetAttachPanel[2], c_anchorBottom, 0, 0);
    DialogSetPositionRelative(libVCUI_gv_pU_StarmapPlanetButtonDialog[1], c_anchorCenter, libVCUI_gv_pU_StarmapPlanetAttachDialog[1], c_anchorBottom, 0, 0);
    DialogSetPositionRelative(libVCUI_gv_pU_StarmapPlanetButtonDialog[2], c_anchorCenter, libVCUI_gv_pU_StarmapPlanetAttachDialog[2], c_anchorBottom, 0, 0);
    DialogSetPositionRelativeToUnit(libVCUI_gv_pU_StarmapPlanetAttachDialog[3], libVCUI_gv_pU_StarmapPlanetAttachUnit[3], "Ref_Center", 0, 0);

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignUILib.galaxy:3011

    DialogControlSetPositionRelative(libVCUI_gv_pU_StarmapPlanetTitleCallout[2], PlayerGroupAll(), c_anchorBottomLeft, libVCUI_gv_pU_StarmapPlanetAttachPanel[2], c_anchorBottom, 0, 0);
    DialogSetPositionRelative(libVCUI_gv_pU_StarmapPlanetButtonDialog[1], c_anchorCenter, libVCUI_gv_pU_StarmapPlanetAttachDialog[1], c_anchorBottom, 0, 0);
    DialogSetPositionRelative(libVCUI_gv_pU_StarmapPlanetButtonDialog[2], c_anchorCenter, libVCUI_gv_pU_StarmapPlanetAttachDialog[2], c_anchorBottom, 0, 0);
    DialogSetPositionRelativeToUnit(libVCUI_gv_pU_StarmapPlanetAttachDialog[3], libVCUI_gv_pU_StarmapPlanetAttachUnit[3], "Ref_Center", 0, 0);
    DialogControlSetPositionRelative(libVCUI_gv_pU_StarmapSelectedPlanetNameLabelCallout, PlayerGroupAll(), c_anchorBottomRight, libVCUI_gv_pU_StarmapPlanetAttachPanel[3], c_anchorBottom, 0, 0);