<?xml version="1.0" encoding="utf-8"?>

<Context>
    <Container ID="MapPinFlags"/>

    <Instance Name="MapPinFlag">
        <WorldAnchor ID="Anchor">
            <Container ID="FlagRoot" Anchor="C,B" Size="48,48">
                <Container Anchor="C,C" Size="50,50">

                    <Image Size="59,79" Texture="MapPin" Anchor="C,T" Offset="1,-16"/>
                    <!-- Black Border & Actual flag -->
                    <Image ID="FlagBaseOutline" Size="50,50" TextureOffset="0,0" Texture="MapPinFlag" Anchor="C,T" />
                    <Image ID="FlagBase" Size="50,50" TextureOffset="150,0" Texture="MapPinFlag" Anchor="C,T" />
                    <Image ID="FlagBaseLighten" Size="50,50" TextureOffset="150,50" Texture="MapPinFlag" Anchor="C,T" />
                    <Image ID="FlagBaseDarken" Size="50,50" TextureOffset="150,100" Texture="MapPinFlag" Anchor="C,T" />

                    <!--Image ID="NormalSelectBG" Size="64,64" Hidden="1" TextureOffset="0,192" Texture="UnitFlagBase.dds" /-->
                    <Image ID="NormalSelect" Size="50,50" Hidden="1" TextureOffset="0,100" Texture="MapPinFlag">
                        <AlphaAnim AlphaStart="0" AlphaEnd="1" Cycle="Bounce" Pause="0" Speed="1">
                            <Image ID="NormalSelectPulse" Size="50,50" TextureOffset="0,50" Texture="MapPinFlag"/>
                        </AlphaAnim>
                    </Image>

                    <Button ID="NormalButton" Anchor="C,T" Size="50,50" NoDefaultSound="1">
                        <Image ID="HexIcon" Anchor="C,C" Size="32,32" Hide="1"/>
                        <ScrollAnim ID="NormalScrollAnim" Size="50,50" Pause=".05" Speed="3" Texture="UnitFlagShine" MaskTexture="MapPinFlagMask" Cycle="Once" ShowOnMouseOver="1"/>
                        <Image ID="FlagOver" Size="50,50" TextureOffset="0,50" Texture="MapPinFlag"/>
                    </Button>

                    <!-- Lighting Effect -->
                    <Image ID="LightEffect" TextureOffset="100,0" Texture="MapPinFlag" Size="50,50" Anchor="C,T"/>
                    <!-- Unit Icon -->
                    <AlphaAnim ID="UnitIconAnim" Anchor="C,T" Size="50,50" Pause="0" Cycle="Bounce" Speed="1" AlphaStart="0.95" AlphaEnd="0.25" Stopped="1">
                        <Image ID="UnitIcon" Anchor="C,C" Size="24,24" Texture="MapPins24"/>
                    </AlphaAnim>

                    <Image ID="NameContainer" Texture="Controls_DropShadow4" Color="0,0,0,150" Size="auto,20" Anchor="C,T" AnchorSide="I,O" StretchMode="Fill" AutoSizePadding="15,8" Offset="0,-8">
                        <Label ID="NameLabel" Anchor="C,C" String="UNKNOWN_MAP_PIN_NAME" Style="FontNormal14" FontStyle="Glow" ColorSet="BodyTextBright"/>
                    </Image>
                    
                    <!-- DMT addition start-->
                    <Grid ID="YieldContainer" Style="YieldBacking" Size="auto,24" Anchor="C,B" Color="0,0,0,128" Offset="1,-17">
                        <Label ID="YieldText" Offset="0,0.5" Anchor="C,C" Style="YieldBonusText"/>
                    </Grid>
                    <Image ID="CanPlaceIcon" Texture="Alert18" Size="18,18" Anchor="R,T" Offset="0,3"/>
                    <!-- DMT addition end-->

                </Container>
            </Container>
        </WorldAnchor>
    </Instance>

    <Include File="PopupDialog"/>
    <MakeInstance Name="PopupDialog"/>
</Context>
