# Anchor Dialog To Unit
Grammar — Move dialog to (offsetX, offsetY) relative to attachment of unit anchored anchor
Flags —Native
|Action
Moves a dialog to the specified anchor, relative to the specified attachment point of the specified unit, with the specified offsets.
# Arguments
int
[ dialog ] — Dialogunit
— Unitstring
[ preset::AttachPoints ] — Attachmentint
[ preset::Anchor ] — Anchorint
— OffsetXint
— OffsetY
Returns — void
native void DialogSetPositionRelativeToUnitWithAnchor(
int dialog,
unit inUnit,
string inAttachment,
int anchor,
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/void.sc2campaign
// L1141
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1191
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1241
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1291
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1343
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1394
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1444
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1589
DialogSetPositionRelativeToUnitWithAnchor(gv_blinkTagAnchor, gv_blinkHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L2332
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L3020
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 120)
// L3365
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tMakeAssimilatorAssimilator, "Ref_Origin", c_anchorCenter, 0, 120)
// L2091
DialogSetPositionRelativeToUnitWithAnchor(lv_textTagDialogAnchor, lv_attackBeacon, "Ref_Origin", c_anchorCenter, 0, 80)
// L1141
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1191
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1241
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1291
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1343
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1394
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L1444
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset)
// L2091
DialogSetPositionRelativeToUnitWithAnchor(lv_textTagDialogAnchor, lv_attackBeacon, "Ref_Origin", c_anchorCenter, 0, 80)
// L1589
DialogSetPositionRelativeToUnitWithAnchor(gv_blinkTagAnchor, gv_blinkHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L2332
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 0)
// L3020
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 120)
// L3365
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tMakeAssimilatorAssimilator, "Ref_Origin", c_anchorCenter, 0, 120)
# mods/heroesdata.stormmod
// L711
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libMapM_gv_jungleCreepCamps[lp_camp].lv_campOwnershipFlagUnit, "Ref_Overhead", c_anchorCenter, 0, 0)
// L1306
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libMapM_gv_jungleCreepCamps[lp_Camp].lv_campOwnershipFlagUnit, "Ref_Overhead", c_anchorCenter, 0, 0)
# mods/heroesdata.stormmod
// L1113
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), lp_heroUnit, "Ref_Overhead", c_anchorBottom, 0, 0)
// L1141
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_choPlayer)].lv_choUnit, "Ref_Overhead", c_anchorBottom, 0, 0)