# 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
- Set Dialog Size —
void
— DialogSetSize - Move Dialog —
void
— DialogSetPosition - Attach Dialog To Dialog —
void
— DialogSetPositionRelative - Attach Dialog To Unit —
void
— DialogSetPositionRelativeToUnit - Anchor Dialog To Unit —
void
— DialogSetPositionRelativeToUnitWithAnchor - Set Dialog Fullscreen —
void
— DialogSetFullscreen - Dialog Width —
int
— DialogGetWidth - Dialog Height —
int
— DialogGetHeight - Dialog Offset X —
int
— DialogGetOffsetX - Dialog Offset Y —
int
— DialogGetOffsetY - Dialog Anchor —
int
<preset::Anchor> — DialogGetAnchor - Dialog Relative Anchor —
int
<preset::Anchor> — DialogGetRelativeAnchor - Relative Dialog —
int
<dialog> — DialogGetRelativeDialog - Dialog Is Fullscreen —
bool
— DialogIsFullscreen
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1141
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1191
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1241
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1291
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1343
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1394
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/sc2tutorial.sc2map/MapScript.galaxy:1444
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur01.sc2map/MapScript.galaxy:2091
lv_textTagDialogAnchor = DialogLastCreated();
DialogSetImageVisible(lv_textTagDialogAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(lv_textTagDialogAnchor, lv_attackBeacon, "Ref_Origin", c_anchorCenter, 0, 80);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur02.sc2map/MapScript.galaxy:1589
gv_blinkTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_blinkTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_blinkTagAnchor, gv_blinkHelper, "Ref_Origin", c_anchorCenter, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur02.sc2map/MapScript.galaxy:2332
gv_tTextTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_tTextTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur02.sc2map/MapScript.galaxy:3020
gv_tTextTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_tTextTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 120);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/paiur02.sc2map/MapScript.galaxy:3365
gv_tTextTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_tTextTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tMakeAssimilatorAssimilator, "Ref_Origin", c_anchorCenter, 0, 120);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1141
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1191
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1241
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1291
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1343
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1394
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/sc2tutorial.sc2map — MapScript.galaxy:1444
gv_textTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_textTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_textTagAnchor, lp_unit, "Ref_Origin", c_anchorCenter, 0, lp_yOffset);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur01.sc2map — MapScript.galaxy:2091
lv_textTagDialogAnchor = DialogLastCreated();
DialogSetImageVisible(lv_textTagDialogAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(lv_textTagDialogAnchor, lv_attackBeacon, "Ref_Origin", c_anchorCenter, 0, 80);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur02.sc2map — MapScript.galaxy:1589
gv_blinkTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_blinkTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_blinkTagAnchor, gv_blinkHelper, "Ref_Origin", c_anchorCenter, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur02.sc2map — MapScript.galaxy:2332
gv_tTextTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_tTextTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur02.sc2map — MapScript.galaxy:3020
gv_tTextTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_tTextTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tInvisHelper, "Ref_Origin", c_anchorCenter, 0, 120);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/paiur02.sc2map — MapScript.galaxy:3365
gv_tTextTagAnchor = DialogLastCreated();
DialogSetImageVisible(gv_tTextTagAnchor, false);
DialogSetPositionRelativeToUnitWithAnchor(gv_tTextTagAnchor, gv_tMakeAssimilatorAssimilator, "Ref_Origin", c_anchorCenter, 0, 120);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
DialogControlSetSize(DialogControlLastCreated(), PlayerGroupAll(), 1, 1);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/MapMechanicsLib.galaxy:711
DialogCreate(1, 1, c_anchorTop, 0, 0, true);
libMapM_gv_uIJungleCampPanel.lv_jungleCreepCampsDialog[lp_camp] = DialogLastCreated();
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libMapM_gv_jungleCreepCamps[lp_camp].lv_campOwnershipFlagUnit, "Ref_Overhead", c_anchorCenter, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
libMapM_gv_uIJungleCampPanel.lv_jungleCreepCamp_PositionControl[lp_camp] = DialogControlLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/MapMechanicsLib.galaxy:1306
DialogCreate(1, 1, c_anchorTop, 0, 0, true);
libMapM_gv_uIJungleCampPanel.lv_jungleCreepCampsDialog[lp_Camp] = DialogLastCreated();
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libMapM_gv_jungleCreepCamps[lp_Camp].lv_campOwnershipFlagUnit, "Ref_Overhead", c_anchorCenter, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
libMapM_gv_uIJungleCampPanel.lv_jungleCreepCamp_PositionControl[lp_Camp] = DialogControlLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:1113
DialogCreate(1, 1, c_anchorTop, 0, 0, true);
libUIUI_gv_uIBoosts.lv_boostFXAnchor[lp_player][lv_heroIndex] = DialogLastCreated();
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), lp_heroUnit, "Ref_Overhead", c_anchorBottom, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
libUIUI_gv_uIBoosts.lv_boostFXAnchorFrame[lp_player][lv_heroIndex] = DialogControlLastCreated();
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/UILib.galaxy:1141
DialogCreate(1, 1, c_anchorTop, 0, 0, true);
libUIUI_gv_uIBoosts.lv_boostFXAnchor[lp_player][lv_heroIndex] = DialogLastCreated();
DialogSetPositionRelativeToUnitWithAnchor(DialogLastCreated(), libGDHL_gv_chogallPairs[libGame_gf_TeamNumberOfPlayer(lv_choPlayer)].lv_choUnit, "Ref_Overhead", c_anchorBottom, 0, 0);
DialogControlCreate(DialogLastCreated(), c_triggerControlTypePanel);
libUIUI_gv_uIBoosts.lv_boostFXAnchorFrame[lp_player][lv_heroIndex] = DialogControlLastCreated();