<Ui>
	
	<Frame parentKey="Animations" name="$parentAnimations" inherits="TellMeWhen_EventContainer">
		<Frames>
			<Frame parentKey="SubHandlerList" name="$parentSubHandlerList">
				<Size x="150" y="10"/>
				<Anchors>
					<Anchor point="TOPLEFT" />
					<Anchor point="BOTTOM" y="-0"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						TMW:ConvertContainerToScrollFrame(self, true, nil, 8)
					</OnLoad>
				</Scripts>
			</Frame>
			
			<Frame parentKey="ConfigFrames" name="$parentConfigFrames">
				<KeyValues>
					<KeyValue key="tmwClass" type="string" value="Events_ColumnConfigContainer"/>
				</KeyValues>

				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="$parentSubHandlerListScrollFrame" relativePoint="TOPRIGHT" x="5" y="0"/>
					<Anchor point="BOTTOMRIGHT" x="-0" y="0"/>
				</Anchors>
				<Frames>
					<Slider parentKey="Duration" name="$parentDuration" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" valuestep="0.1" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_DURATION"], TMW.L["ANIM_DURATION_DESC"])
								self:SetSetting("Duration")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(0.1, math.huge)
								self:SetRange(10)
								self:SetValueStep(0.1)
								self:SetTextFormatter(TMW.C.Formatter.S_SECONDS, TMW.C.Formatter.F_1)

								self:CScriptAdd("ReloadRequested", function()
									local settings = self:GetSettingTable()
									if settings then
										self:SetEnabled(not settings.Infinite)
									end
								end)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>

					<CheckButton parentKey="Infinite" name="$parentInfinite" inherits="TellMeWhen_EventHandler_ColumnConfig_CheckTemplate">
						<Size x="30" y="30"/>
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_INFINITE"], TMW.L["ANIM_INFINITE_DESC"])
								self:SetSetting("Infinite")
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider parentKey="Magnitude" name="$parentMagnitude" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" valuestep="1">
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_MAGNITUDE"], TMW.L["ANIM_MAGNITUDE_DESC"])
								self:SetSetting("Magnitude")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(0, math.huge)
								self:SetRange(10)
								self:SetTextFormatter(TMW.C.Formatter.PIXELS, TMW.C.Formatter.PASS)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>

					<Slider parentKey="Period" name="$parentPeriod" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" valuestep="0.1" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_PERIOD"], TMW.L["ANIM_PERIOD_DESC"])
								self:SetSetting("Period")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(0, math.huge)
								self:SetRange(10)
								self:SetTextFormatter(TMW.C.Formatter.S_SECONDS, TMW.C.Formatter.F_1)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>
					

					<Button parentKey="Color" name="$parentColor" inherits="TellMeWhen_ColorButtonTemplate">
						<Anchors>
							<Anchor point="LEFT" x="15" />
						</Anchors>
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_COLOR"], TMW.L["ANIM_COLOR_DESC"])
								self:SetHasOpacity(true)
								self:SetSetting("AnimColor")

								self.paddingTop, self.paddingBottom = 4, 4
							</OnLoad>
						</Scripts>
					</Button>


					<EditBox parentKey="Image" name="$parentImage" inherits="TellMeWhen_InputBoxTemplate" autoFocus="false">
						<Size y="15"/>
						<Anchors>
							<!-- <Anchor point="TOPLEFT" relativeTo="$parentPeriod" relativePoint="BOTTOMLEFT" x="4" y="-25"/> -->
							<Anchor point="LEFT" x="15" />
							<Anchor point="RIGHT" x="-15" />
						</Anchors>
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_TEX"], TMW.L["ANIM_TEX_DESC"])
								self:SetSetting("Image")
								self.paddingTop, self.paddingBottom = 4, 7

								self:CScriptAdd("ModifyValueForSave", function(self, value)
									return TMW:CleanPath(value)
								end)

								TMW.SUG:EnableEditBox(self, "texture", true)
							</OnLoad>
						</Scripts>
					</EditBox>

					<CheckButton parentKey="Fade" name="$parentFade" inherits="TellMeWhen_EventHandler_ColumnConfig_CheckTemplate">
						<Size x="30" y="30"/>
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_FADE"], TMW.L["ANIM_FADE_DESC"])
								self:SetSetting("Fade")
							</OnLoad>
						</Scripts>
					</CheckButton>

					<Slider parentKey="AlphaStandalone" name="$parentAlphaStandalone" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_ALPHASTANDALONE"], TMW.L["ANIM_ALPHASTANDALONE_DESC"])
								self:SetSetting("Alpha")
								
								self:SetMinMaxValues(0, 1)
								self:SetValueStep(0.01)
								self:SetTextFormatter(TMW.C.Formatter.PERCENT100)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>
					
					
					<Slider parentKey="Thickness" name="$parentThickness" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_THICKNESS"], TMW.L["ANIM_THICKNESS_DESC"])
								self:SetSetting("Thickness")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(0.1, math.huge)
								self:SetValueStep(0.1)
								self:SetRange(10)
								self:SetTextFormatter(TMW.C.Formatter.PIXELS, TMW.C.Formatter.F_1)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>
					
					<Slider parentKey="Size_anim" name="$parentSize_anim" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_SIZE_ANIM"], TMW.L["ANIM_SIZE_ANIM_DESC"])
								self:SetSetting("Size_anim")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(-math.huge, math.huge)
								self:SetValueStep(0.1)
								self:SetRange(10)
								self:SetTextFormatter(TMW.C.Formatter.PIXELS, TMW.C.Formatter.F_1)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>

					<Slider parentKey="SizeX" name="$parentSizeX" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_SIZEX"], TMW.L["ANIM_SIZEX_DESC"])
								self:SetSetting("SizeX")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(1, math.huge)
								self:SetValueStep(1)
								self:SetRange(100)
								self:SetTextFormatter(TMW.C.Formatter.PIXELS, TMW.C.Formatter.PASS)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>

					<Slider parentKey="SizeY" name="$parentSizeY" inherits="TellMeWhen_EventHandler_ColumnConfig_SliderTemplate" >
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								self:SetTexts(TMW.L["ANIM_SIZEY"], TMW.L["ANIM_SIZEY_DESC"])
								self:SetSetting("SizeY")
								
								self:SetMode(self.MODE_ADJUSTING)
								self:SetMinMaxValues(1, math.huge)
								self:SetValueStep(1)
								self:SetRange(100)
								self:SetTextFormatter(TMW.C.Formatter.PIXELS, TMW.C.Formatter.PASS)

								self:UseLightColor()
							</OnLoad>
						</Scripts>
					</Slider>

					<Frame parentKey="AnchorTo" name="$parentAnchorTo" inherits="TMW_DropDownMenuTemplate">
						<Anchors>
							<Anchor point="LEFT" x="15" />
							<Anchor point="RIGHT" x="-20" />
						</Anchors>
						<Layers>
							<Layer level="ARTWORK">
								<FontString parentKey="Header" inherits="GameFontHighlightSmall" justifyH="CENTER" justifyV="BOTTOM">
									<Anchors>
										<Anchor point="BOTTOM" relativePoint="TOP" y="0"/>
										<Anchor point="LEFT" x="-5"/>
										<Anchor point="RIGHT" x="5"/>
									</Anchors>
								</FontString>
							</Layer>
						</Layers>
						<Scripts>
							<OnLoad>
								TMW:CInit(self)

								local Animations = TMW.EVENTS:GetEventHandler("Animations")
								
								self:SetFunction(Animations.AnchorTo_Dropdown)
								self:SetTexts(TMW.L["ANCHORTO"], nil)
								self:SetSetting("Image")
								self.paddingTop, self.paddingBottom = 14, 4

								self:CScriptAdd("ReloadRequested", function()
									local settings = self:GetSettingTable()
									if settings then
										Animations:AnchorTo_Dropdown_SetText(settings.AnchorTo)
									end
								end)

								self.Header:SetText(TMW.L["ANCHORTO"])
							</OnLoad>
						</Scripts>
					</Frame>

				</Frames>

				<Scripts>
					<OnLoad>
						TMW:CInit(self)
					</OnLoad>
				</Scripts>
			</Frame>
		</Frames>
		<Layers>
			<Layer level="OVERLAY">
				<FontString parentKey="ListHeader" name="$parentListHeader" inherits="GameFontNormalLarge" justifyH="LEFT" text="">
					<Anchors>
						<Anchor point="BOTTOM" relativeTo="$parentSubHandlerListScrollFrame" relativePoint="TOP" y="1"/>
					</Anchors>
				</FontString>
				
				<FontString parentKey="SettingsHeader" name="$parentSettingsHeader" inherits="GameFontNormalLarge" justifyH="CENTER" text="">
					<Anchors>
						<Anchor point="BOTTOM" relativeTo="$parentSubHandlerListScrollFrame" relativePoint="TOP" />
						<Anchor point="LEFT" relativeTo="$parentConfigFrames"/>
						<Anchor point="RIGHT" relativeTo="$parentConfigFrames"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>

</Ui>
