<Ui>

	<Frame name="TellMeWhen_PBarOptions" inherits="TellMeWhen_OptionsModuleContainer" virtual="true">
		<Size y="30"/>
		<Frames>
			<CheckButton name="$parentShowPBar" inherits="TellMeWhen_CheckTemplate" parentKey="ShowPBar">
				<Anchors>
					<Anchor point="TOP" y="-1"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						TMW:CInit(self, {
							setting = "ShowPBar",
							title = TMW.L["ICONMENU_ENABLE"],
							tooltip = TMW.L["ICONMENU_SHOWPBAR_DESC"],
						})
					</OnLoad>
				</Scripts>
			</CheckButton>
			<CheckButton name="$parentInvertPBar" inherits="TellMeWhen_CheckTemplate" parentKey="InvertPBar">
				<Scripts>
					<OnLoad>
						TMW:CInit(self, {
							setting = "InvertPBar",
							title = TMW.L["ICONMENU_INVERTBARS"],
							tooltip = TMW.L["ICONMENU_INVERTPBAR_DESC"],
							disabled = function(self)
								return not TMW.CI.ics.ShowPBar
							end,
							ModifySettingValue = function(self, value)
								return tonumber(value) or 0
							end,
						})
					</OnLoad>
				</Scripts>
			</CheckButton>
			<EditBox name="$parentPBarOffs" inherits="TellMeWhen_TimeEditBoxTemplate" parentKey="PBarOffs" autoFocus="false">
				<Size x="45" y="15"/>
				<Anchors>
					<Anchor point="LEFT" relativeTo="$parentInvertPBar" relativePoint="RIGHT" y="1"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.text:SetText(TMW.L["ICONMENU_OFFS"])
						self.text:SetWidth(50)
						self.setting = "PBarOffs"
						
						self.text:ClearAllPoints()
						self.text:SetPoint("LEFT", self, "RIGHT", 1, 0)
						
						TMW:CInit(self, {
							setting = "PBarOffs",
							title = TMW.L["ICONMENU_OFFS"],
							tooltip = TMW.L["ICONMENU_BAROFFS"],
							disabled = function(self)
								return not TMW.CI.ics.ShowPBar
							end,
						})
					</OnLoad>
				</Scripts>
			</EditBox>
		</Frames>
		<Scripts>
			<OnLoad>
				self.Header:SetText(TMW.L["CONFIGPANEL_PBAR_HEADER"])
				
				
				self.ShowPBar:ConstrainLabel(self.InvertPBar)
				self.InvertPBar:ConstrainLabel(self.PBarOffs)
				
				TMW.IE:DistributeFrameAnchorsLaterally(self, 3, self.ShowPBar, self.InvertPBar, self.PBarOffs)
			</OnLoad>
		</Scripts>
	</Frame>
 
</Ui>