# Attach Dialog To Dialog
Grammar — Move dialog to (offsetX, offsetY) relative to relativeAnchor of relativeDialog (from anchor)
Flags —Native
|Action
Moves a dialog to the specified anchor, relative to the anchor of another dialog, with the specified offsets.
# Arguments
int
[ dialog ] — Dialogint
[ preset::Anchor ] — Anchorint
[ dialog ] — Relative Dialogint
[ preset::Anchor ] — Relative Anchorint
— OffsetXint
— OffsetY
Returns — void
native void DialogSetPositionRelative(
int dialog,
int anchor,
int relative,
int relativeAnchor,
int offsetX,
int offsetY,
);
# Related
Category: Dialog / Dialog Size And Position
- [F] —
void
— Set Dialog Size — ( DialogSetSize ) - [F] —
void
— Move Dialog — ( DialogSetPosition ) - [F] —
void
— Attach Dialog To Dialog — ( DialogSetPositionRelative ) - [F] —
void
— Attach Dialog To Unit — ( DialogSetPositionRelativeToUnit ) - [F] —
void
— Anchor Dialog To Unit — ( DialogSetPositionRelativeToUnitWithAnchor ) - [F] —
void
— Set Dialog Fullscreen — ( DialogSetFullscreen ) - [F] —
int
— Dialog Width — ( DialogGetWidth ) - [F] —
int
— Dialog Height — ( DialogGetHeight ) - [F] —
int
— Dialog Offset X — ( DialogGetOffsetX ) - [F] —
int
— Dialog Offset Y — ( DialogGetOffsetY ) - [F] —
int
[ preset::Anchor ] — Dialog Anchor — ( DialogGetAnchor ) - [F] —
int
[ preset::Anchor ] — Dialog Relative Anchor — ( DialogGetRelativeAnchor ) - [F] —
int
[ dialog ] — Relative Dialog — ( DialogGetRelativeDialog ) - [F] —
bool
— Dialog Is Fullscreen — ( DialogIsFullscreen )
# Examples
# campaigns/liberty.sc2campaign
// L3548
DialogSetPositionRelative(DialogLastCreated(), c_anchorTop, lv_dlg, c_anchorBottom, 0, -20)
// L3604
DialogSetPositionRelative(DialogLastCreated(), c_anchorRight, gv_bossHPBarDlg, c_anchorLeft, -10, 0)
// L3652
DialogSetPositionRelative(DialogLastCreated(), c_anchorTopRight, gv_unitHPBarDlg, c_anchorTopLeft, -10, 0)
// L16922
DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0)
// L22709
DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0)
// L3548
DialogSetPositionRelative(DialogLastCreated(), c_anchorTop, lv_dlg, c_anchorBottom, 0, -20)
// L3604
DialogSetPositionRelative(DialogLastCreated(), c_anchorRight, gv_bossHPBarDlg, c_anchorLeft, -10, 0)
// L3652
DialogSetPositionRelative(DialogLastCreated(), c_anchorTopRight, gv_unitHPBarDlg, c_anchorTopLeft, -10, 0)
// L16922
DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0)
// L22709
DialogSetPositionRelative(libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonPlay)), c_anchorRight, libNtve_gf_ScreenButtonDialog((ge_ScreenButtonID_ButtonBack)), c_anchorLeft, 20, 0)
# campaigns/libertystory.sc2campaign
// L1851
DialogSetPositionRelative(lp_dialog, lp_anchor, lp_relativeDialog, lp_relativeAnchor, lv_x, lv_y)
# campaigns/voidstory.sc2campaign
// L3010
DialogSetPositionRelative(libVCUI_gv_pU_StarmapPlanetButtonDialog[1], c_anchorCenter, libVCUI_gv_pU_StarmapPlanetAttachDialog[1], c_anchorBottom, 0, 0)
// L3011
DialogSetPositionRelative(libVCUI_gv_pU_StarmapPlanetButtonDialog[2], c_anchorCenter, libVCUI_gv_pU_StarmapPlanetAttachDialog[2], c_anchorBottom, 0, 0)