# Dialog Item Anchor
Grammar — Anchor of dialogItem for player
Flags —Native
|Function
Returns the anchor for the specified dialog item in relationship to its parent dialog. Requires a Player parameter as different players may have dialogs set up differently.
# Arguments
int
<control> — Dialog Itemint
— Player
Returns — int
<preset::Anchor>
native int DialogControlGetAnchor(int control, int player);
# Related
Category: Dialog / Dialog Item Size And Position
- Move Dialog Item —
void
— DialogControlSetPosition - Attach Dialog Item To Dialog Item —
void
— DialogControlSetPositionRelative - Set Dialog Item Rotation —
void
— libNtve_gf_SetDialogItemRotation - Set Dialog Item to Use Aspect Uncorrection —
void
— libNtve_gf_SetDialogItemtoUseAspectUncorrection - Set Dialog Item Size to Parent —
void
— DialogControlSetFullDialog - Set Dialog Item Size —
void
— DialogControlSetSize - Dialog Item Width —
int
— DialogControlGetWidth - Dialog Item Height —
int
— DialogControlGetHeight - Dialog Item Offset X —
int
— DialogControlGetOffsetX - Dialog Item Offset Y —
int
— DialogControlGetOffsetY - Dialog Item Anchor —
int
<preset::Anchor> — DialogControlGetAnchor - Dialog Item Relative Anchor —
int
<preset::Anchor> — DialogControlGetRelativeAnchor - Relative Dialog Item —
int
<control> — DialogControlGetRelativeControl - Dialog Item Is Full Dialog —
bool
— DialogControlIsFullDialog
# Examples
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:1776
lv_x = IntToFixed(DialogControlGetOffsetX(lp_dialogItem, lp_player));
if ((DialogControlGetRelativeControl(lp_dialogItem, lp_player) == c_invalidDialogControlId)) {
lv_anchor = DialogControlGetAnchor(lp_dialogItem, lp_player);
if (((lv_anchor == c_anchorTopLeft) || (lv_anchor == c_anchorTopRight) || (lv_anchor == c_anchorBottomLeft) || (lv_anchor == c_anchorBottomRight) || (lv_anchor == c_anchorLeft) || (lv_anchor == c_anchorRight))) {
lv_x -= libCamp_gv_gRIDDLG_MARGINE_X;
campaigns/libertystory.sc2campaign — base.sc2data/TriggerLibs/CampaignLib.galaxy:1797
lv_y = IntToFixed(DialogControlGetOffsetY(lp_dialogItem, lp_player));
if ((DialogControlGetRelativeControl(lp_dialogItem, lp_player) == c_invalidDialogControlId)) {
lv_anchor = DialogControlGetAnchor(lp_dialogItem, lp_player);
if (((lv_anchor == c_anchorTopLeft) || (lv_anchor == c_anchorTopRight) || (lv_anchor == c_anchorBottomLeft) || (lv_anchor == c_anchorBottomRight) || (lv_anchor == c_anchorTop) || (lv_anchor == c_anchorBottom))) {
lv_y -= libCamp_gv_gRIDDLG_MARGINE_Y;