# Attach Dialog Item To Dialog Item

Grammar — Move item|Dialog Item to (offsetX, offsetY) relative to relativeAnchor of relativeItem|Relative Control for players (from anchor)
FlagsNative | Action

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

# Arguments

  • int [ control ] — Item
  • playergroup — Players
  • int [ preset::Anchor ] — Anchor
  • int [ control ] — Relative Item
  • int [ preset::Anchor ] — Relative Anchor
  • int — OffsetX
  • int — OffsetY

Returns — void

native void DialogControlSetPositionRelative(
	int control,
	playergroup players,
	int anchor,
	int relative,
	int relativeAnchor,
	int offsetX,
	int offsetY,
);

Category: Dialog / Dialog Item Size And Position

# Examples

# campaigns/liberty.sc2campaign

MapScript.galaxy

// L3284
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_controlTipBG, c_anchorTopLeft, 100, 70)
// L3288
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_controlTipLabel1, c_anchorTopLeft, 205, 0)
// L3293
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottom, gv_controlTipBG, c_anchorBottom, 0, -70)
// L3691
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_scoreTitle, c_anchorTopLeft, 0, 25)
// L3703
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_highScoreTitle, c_anchorTopLeft, 0, 25)
// L3713
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_uI_ScoreLabel, c_anchorTopLeft, (((lv_index - 1) * 67) - 10), 25)
// L3725
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, gv_uI_LifeLabelLargeIcon, c_anchorBottomRight, 16, -5)
// L3748
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, gv_uI_BombLabelLargeIcon, c_anchorBottomRight, 16, 0)
// L10443
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, gv_zPlanetPanel_DropdownDifficulty, c_anchorLeft, -15, 0)
// L10449
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, lv_triangle, c_anchorLeft, -20, 0)
// L10455
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottom, lv_bottom, c_anchorTop, 0, 25)
// L10461
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_missionInfoBG, c_anchorCenter, 0, 0)
// L10687
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textBorder, c_anchorCenter, 0, 0)
// L13652
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_replayFrame, c_anchorCenter, 0, 0)
// L13693
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_aBChoiceFrame, c_anchorTopLeft, 70, 70)
// L13696
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopRight, gv_aBChoiceFrame, c_anchorTopRight, -70, 70)
// L13703
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, gv_aBChoiceFrame, c_anchorBottomLeft, 65, -50)
// L13706
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomRight, gv_aBChoiceFrame, c_anchorBottomRight, -65, -50)
// L3284
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_controlTipBG, c_anchorTopLeft, 100, 70)
// L3288
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_controlTipLabel1, c_anchorTopLeft, 205, 0)
// L3293
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottom, gv_controlTipBG, c_anchorBottom, 0, -70)
// L3691
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_scoreTitle, c_anchorTopLeft, 0, 25)
// L3703
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_highScoreTitle, c_anchorTopLeft, 0, 25)
// L3713
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_uI_ScoreLabel, c_anchorTopLeft, (((lv_index - 1) * 67) - 10), 25)
// L3725
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, gv_uI_LifeLabelLargeIcon, c_anchorBottomRight, 16, -5)
// L3748
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, gv_uI_BombLabelLargeIcon, c_anchorBottomRight, 16, 0)
// L10443
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, gv_zPlanetPanel_DropdownDifficulty, c_anchorLeft, -15, 0)
// L10449
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, lv_triangle, c_anchorLeft, -20, 0)
// L10455
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottom, lv_bottom, c_anchorTop, 0, 25)
// L10461
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_missionInfoBG, c_anchorCenter, 0, 0)
// L10687
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textBorder, c_anchorCenter, 0, 0)
// L13652
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_replayFrame, c_anchorCenter, 0, 0)
// L13693
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, gv_aBChoiceFrame, c_anchorTopLeft, 70, 70)
// L13696
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopRight, gv_aBChoiceFrame, c_anchorTopRight, -70, 70)
// L13703
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, gv_aBChoiceFrame, c_anchorBottomLeft, 65, -50)
// L13706
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomRight, gv_aBChoiceFrame, c_anchorBottomRight, -65, -50)

# campaigns/libertystory.sc2campaign

CampaignLib.galaxy

// L1914
DialogControlSetPositionRelative(lp_item, PlayerGroupAll(), lp_anchor, lp_relativeItem, lp_relativeAnchor, FixedToInt(lp_offsetX), FixedToInt(lp_offsetY))
// L1973
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_titleItem, c_anchorBottom, 0, 5)
// L1979
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottom, libCamp_gv__MsgDlgButton, c_anchorTop, 0, -15)
// L5715
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, libCamp_gv_tS_RoomChangeButtons[libCamp_gv_tS_RoomChangeButtonCount], c_anchorCenter, 0, 0)
// L5724
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, libCamp_gv_tS_RoomChangeButtons[libCamp_gv_tS_RoomChangeButtonCount], c_anchorCenter, 0, 0)
// L5879
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, libCamp_gv_tS_RoomChangeButtons[lp_buttonId], c_anchorCenter, 0, -1)
// L10793
DialogControlSetPositionRelative(libCamp_gv_tS_DebugProgressImageCurrent, PlayerGroupAll(), c_anchorCenter, libCamp_gv_tS_DebugProgressMissionButtons[(lv_indexMission)], c_anchorCenter, 0, 0)
// L10794
DialogControlSetPositionRelative(libCamp_gv_tS_DebugProgressImageOK, PlayerGroupAll(), c_anchorCenter, libCamp_gv_tS_DebugProgressButtonOK, c_anchorCenter, 0, 0)
// L13498
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libCamp_gv_tS_DebugResearchButtonProtossMinus, c_anchorRight, 2, 0)
// L13505
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libCamp_gv_tS_DebugResearchButtonProtossReset, c_anchorRight, 2, 0)

# campaigns/swarm.sc2campaign

MapScript.galaxy

// L6418
DialogControlSetPositionRelative(gv_buttonSecurityComputer_ReleaseZerg, PlayerGroupAll(), c_anchorTop, lv_panelReleaseZerg, c_anchorTop, 0, 40)
// L6433
DialogControlSetPositionRelative(gv_buttonSecurityComputer_ReleaseGas, PlayerGroupAll(), c_anchorTop, lv_panelReleaseGas, c_anchorTop, 0, 40)
// L6418
DialogControlSetPositionRelative(gv_buttonSecurityComputer_ReleaseZerg, PlayerGroupAll(), c_anchorTop, lv_panelReleaseZerg, c_anchorTop, 0, 40)
// L6433
DialogControlSetPositionRelative(gv_buttonSecurityComputer_ReleaseGas, PlayerGroupAll(), c_anchorTop, lv_panelReleaseGas, c_anchorTop, 0, 40)

# campaigns/swarmstory.sc2campaign

SwarmCampaignLib.galaxy

// L2908
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorRight, libSwaC_gv_zS_BB_HpBackground, c_anchorRight, 0, 0)
// L9686
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, lv_border, c_anchorLeft, (((lv_upgradeIndex - 1) * 225) + 12), 0)
// L9690
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libSwaC_gv_zS_ArmyCustomArchivesUpgradeCheck[lv_categoryIndex][lv_upgradeIndex], c_anchorRight, 3, 0)
// L9706
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, lv_border, c_anchorLeft, (((lv_evoIndex - 1) * 190) + 12), 0)
// L9709
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorLeft, libSwaC_gv_zS_ArmyCustomArchivesEvolutionCheck[lv_categoryIndex][lv_evoIndex], c_anchorRight, 0, 0)
// L9844
DialogControlSetPositionRelative(libSwaC_gv_zS_ArmyCustomArchivesUpgradeBorder, PlayerGroupAll(), c_anchorTopLeft, libSwaC_gv_zS_ArmyCustomArchivesSectionBG, c_anchorTopLeft, 225, 85)
// L9851
DialogControlSetPositionRelative(libSwaC_gv_zS_ArmyCustomArchivesUpgradeBorder, PlayerGroupAll(), c_anchorTopLeft, libSwaC_gv_zS_ArmyCustomArchivesSectionBG, c_anchorTopLeft, 225, 75)
// L11667
DialogControlSetPositionRelative(libSwaC_gv_zS_KerriganUITierAbilityFrame[5], PlayerGroupAll(), c_anchorTopLeft, libSwaC_gv_zS_KerriganUITierTemplate3, c_anchorTopLeft, 0, 0)
// L11675
DialogControlSetPositionRelative(libSwaC_gv_zS_KerriganUITierAbilityFrame[5], PlayerGroupAll(), c_anchorTopLeft, libSwaC_gv_zS_KerriganUITierTemplate2, c_anchorTopLeft, 0, 0)
// L14597
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopRight, lv_button, c_anchorTopRight, (-1 * lv_marginX), (1 * lv_marginY))

# campaigns/swarmstoryutil.sc2mod

Lib281DEC45.galaxy

// L819
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_UIArchivesLoadingLabel, PlayerGroupAll(), c_anchorTopRight, lib281DEC45_gv_zSS_UIArchivesMissionPanel, c_anchorBottomRight, 0, 0)
// L2390
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryInteractiveLabel[lib281DEC45_gv_zSS_DebugStoryInteractiveCount], PlayerGroupAll(), c_anchorTopRight, lib281DEC45_gv_zSS_DebugStoryEnabledLabel, c_anchorTopLeft, lib281DEC45_gv_zSSC_DebugStoryMargin, (((lib281DEC45_gv_zSS_DebugStoryInteractiveCount-1)*50)+50))
// L2393
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryEnabledCheckbox[lib281DEC45_gv_zSS_DebugStoryInteractiveCount], PlayerGroupAll(), c_anchorTop, lib281DEC45_gv_zSS_DebugStoryEnabledLabel, c_anchorTop, 0, (((lib281DEC45_gv_zSS_DebugStoryInteractiveCount-1)*50)+50))
// L2396
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryAmbientCheckbox[lib281DEC45_gv_zSS_DebugStoryInteractiveCount], PlayerGroupAll(), c_anchorTop, lib281DEC45_gv_zSS_DebugStoryAmbientLabel, c_anchorTop, 0, (((lib281DEC45_gv_zSS_DebugStoryInteractiveCount-1)*50)+50))
// L2399
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryInteractiveReset[lib281DEC45_gv_zSS_DebugStoryInteractiveCount], PlayerGroupAll(), c_anchorTopLeft, lib281DEC45_gv_zSS_DebugStoryAmbientLabel, c_anchorTopRight, lib281DEC45_gv_zSSC_DebugStoryMargin, (((lib281DEC45_gv_zSS_DebugStoryInteractiveCount-1)*50)+50))
// L7737
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStorySceneList, PlayerGroupAll(), c_anchorTopLeft, lib281DEC45_gv_zSS_DebugStoryTypeList, c_anchorTopRight, 50, 0)
// L7750
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryPlayButton, PlayerGroupAll(), c_anchorTopLeft, lib281DEC45_gv_zSS_DebugStoryTypeList, c_anchorTopLeft, 0, 350)
// L7757
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryKerriganTypeLabel, PlayerGroupAll(), c_anchorLeft, lib281DEC45_gv_zSS_DebugStoryPlayButton, c_anchorRight, 20, 15)
// L7760
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryKerriganTypeCheckbox, PlayerGroupAll(), c_anchorLeft, lib281DEC45_gv_zSS_DebugStoryKerriganTypeLabel, c_anchorRight, 0, -15)
// L7764
DialogControlSetPositionRelative(lib281DEC45_gv_zSS_DebugStoryStateList, PlayerGroupAll(), c_anchorTopLeft, lib281DEC45_gv_zSS_DebugStoryPlayButton, c_anchorBottomLeft, 0, 50)

# campaigns/void.sc2campaign

MapScript.galaxy

// L1149
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1199
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1249
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1299
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1351
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1402
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1452
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1597
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L2340
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagAnchorPoint, c_anchorCenter, 0, 0)
// L3028
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagAnchorPoint, c_anchorCenter, 0, 0)
// L3373
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagAnchorPoint, c_anchorCenter, 0, 0)
// L2099
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagDialogAnchorPoint, c_anchorCenter, 0, 0)
// L1149
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1199
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1249
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1299
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1351
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1402
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L1452
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L2099
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagDialogAnchorPoint, c_anchorCenter, 0, 0)
// L1597
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_anchorPoint, c_anchorCenter, 0, 0)
// L2340
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagAnchorPoint, c_anchorCenter, 0, 0)
// L3028
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagAnchorPoint, c_anchorCenter, 0, 0)
// L3373
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorCenter, lv_textTagAnchorPoint, c_anchorCenter, 0, 0)

# campaigns/voidstory.sc2campaign

VoidCampaignLib.galaxy

// L175
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20)
// L193
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20)
// L289
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTop, lv_lastItem, c_anchorBottom, 0, -20)
// L910
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopRight, lv_button, c_anchorTopRight, (-1 * lv_marginX), (1 * lv_marginY))
// L915
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorTopLeft, lv_button, c_anchorTopLeft, (1 * lv_marginX), (1 * lv_marginY))
// L920
DialogControlSetPositionRelative(DialogControlLastCreated(), PlayerGroupAll(), c_anchorBottomLeft, lv_button, c_anchorBottomLeft, (1 * lv_marginX), (-1 * lv_marginY))