<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
	<Frame name="MoveAnythingOptions" parent="UIParent">
		<Scripts>
			<OnLoad function="MovAny_OptionsOnLoad"/>
			<OnShow function="MovAny_OptionsOnShow"/>
		</Scripts>
		
		<Layers>
			<Layer level="BACKGROUND">
				<FontString name="MAOptFrameListRows" inherits="GameFontNormal" text="清單列數:">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="MoveAnythingOptions" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="15" y="-30"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="MAOptProfile" inherits="GameFontNormal" text="設定檔:">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="MoveAnythingOptions" relativePoint="TOPLEFT">
							<Offset>
								<AbsDimension x="15" y="-63"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
				<FontString name="MAOptVersion" inherits="GameFontNormal" text="">
					<Anchors>
						<Anchor point="BOTTOMRIGHT" relativeTo="MoveAnythingOptions" relativePoint="BOTTOMRIGHT">
							<Offset>
								<AbsDimension x="-19" y="20"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		
		<Frames>
			<Slider name="MAOptRowsSlider" inherits="OptionsSliderTemplate">
				<Size>
					<AbsDimension x="220" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MoveAnythingOptions" relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="95" y="-25"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						_G[self:GetName().."Text"]:SetText("列數")
						_G[self:GetName().."High"]:SetText("100")
						_G[self:GetName().."Low"]:SetText("2")
						self:SetMinMaxValues(2, 100)
						self:SetValueStep(1)
					</OnLoad>
					<OnValueChanged>
						MovAny:SetNumRows(self:GetValue())
					</OnValueChanged>
				</Scripts>
			</Slider>
			
			<Button name="MAOptProfileDropDown" inherits="Lib_UIDropDownMenuTemplate" id="1">
				<Size>
					<AbsDimension x="220" y="16"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptRowsSlider" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="-22" y="-15"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnShow>
						Lib_UIDropDownMenu_SetWidth(self, 150)
					</OnShow>
					<OnClick>
						ToggleDropDownMenu(self:GetID(), nil, self, self, 6, 7, nil, self)
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptProfileRename" inherits="MAButtonTemplate" text="R">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptProfileDropDown" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="0" y="-2"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "重新命名"
					</OnLoad>
					<OnClick>
						MovAny:ProfileRenameClicked(self)
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptProfileSaveAs" inherits="MAButtonTemplate" text="S">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptProfileRename" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="4" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "另存新檔"
					</OnLoad>
					<OnClick>
						MovAny:ProfileSaveAsClicked(self)
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptProfileAdd" inherits="MAButtonTemplate" text="+">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptProfileSaveAs" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="4" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "新增"
					</OnLoad>
					<OnClick>
						MovAny:ProfileAddClicked(self)
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptProfileDelete" inherits="MAButtonTemplate" text="-">
				<Size>
					<AbsDimension x="20" y="20"/>
				</Size>
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptProfileAdd" relativePoint="TOPRIGHT">
						<Offset>
							<AbsDimension x="4" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "刪除"
					</OnLoad>
					<OnClick>
						MovAny:ProfileDeleteClicked(self)
					</OnClick>
				</Scripts>
			</Button>

	
			<CheckButton name="MAOptAlwaysShowNudger" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptProfileDropDown" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="-5" y="-15"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用時，主視窗會顯示移動控制項。\n\n預設只有在與框架互動時才會顯示移動控制項。"
						_G[self:GetName().."Text"]:SetText("主視窗顯示移動控制項")
					</OnLoad>
					<OnClick>
						local reshowGUI = nil
						if MAOptions:IsShown() and MADB.alwaysShowNudger ~= MAOptAlwaysShowNudger:GetChecked() then
							reshowGUI = true
						end
						MovAny:OptionCheckboxChecked(self, "alwaysShowNudger")
						if reshowGUI then
							MAOptions:Hide()
							MAOptions:Show()
						end
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptShowTooltips" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptAlwaysShowNudger" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用/停用顯示滑鼠提示。\n\n滑鼠指向元素時按住 Shift 鍵，會反轉顯示滑鼠提示的行為。"
						_G[self:GetName().."Text"]:SetText("顯示滑鼠提示")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "tooltips")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptPlaySound" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptShowTooltips" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "開啟和關閉主視窗時是否要播放音效。"
						_G[self:GetName().."Text"]:SetText("播放音效")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "playSound")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptCloseGUIOnEscape" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptPlaySound" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						_G[self:GetName().."Text"]:SetText("按 Esc 鍵關閉主視窗")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "closeGUIOnEscape")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptDontSearchFrameNames" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptCloseGUIOnEscape" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "停用搜尋實際框架名稱。"
						_G[self:GetName().."Text"]:SetText("不要搜尋框架名稱")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "dontSearchFrameNames")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptNoBags" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptDontSearchFrameNames" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用/停用連結背包分類。\n\n使用其他插件移動背包時請勾選。"
						_G[self:GetName().."Text"]:SetText("停用背包分類相關功能")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "noBags")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptDontHookCreateFrame" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptNoBags" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用/停用連結 CreateFrame。\n\n需要重新載入才會生效。"
						_G[self:GetName().."Text"]:SetText("停用新建視窗相關功能")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "dontHookCreateFrame")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptDontSyncWhenLeavingCombat" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptDontHookCreateFrame" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用/停用戰鬥結束後同步待處理的框架。\n\n停用這個選項時，戰鬥結束後需要手動同步被保護的框架。"
						_G[self:GetName().."Text"]:SetText("戰鬥結束後停用同步")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "dontSyncWhenLeavingCombat")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptSquareMM" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptDontSyncWhenLeavingCombat" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用/停用方形小地圖。\n\n在 \"小地圖\" 分類中隱藏 \"圓形邊框\"，移除作為遮罩的外框。"
						_G[self:GetName().."Text"]:SetText("使用方形小地圖")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "squareMM")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptNoMMMW" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptSquareMM" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "啟用/停用滑鼠滾輪縮放小地圖。\n\n需要重新載入才會生效。"
						_G[self:GetName().."Text"]:SetText("停用滑鼠滾輪縮放小地圖功能")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "noMMMW")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<CheckButton name="MAOptDisableErrorMessages" inherits="MACheckButtonTemplate">
				<Anchors>
					<Anchor point="TOPLEFT" relativeTo="MAOptNoMMMW" relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="0" y="-1"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.alwaysShowTooltip = true
						self.tooltipText = "開啟/關閉顯示錯誤訊息。"
						_G[self:GetName().."Text"]:SetText("停用錯誤訊息")
					</OnLoad>
					<OnClick>
						MovAny:OptionCheckboxChecked(self, "disableErrorMessages")
					</OnClick>
				</Scripts>
			</CheckButton>
			
			<Button name="MAOptResetProfile" inherits="MAButtonTemplate" text="重置設定檔">
				<Size>
					<AbsDimension x="120" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="MoveAnythingOptions"  relativePoint="BOTTOMLEFT">
						<Offset>
							<AbsDimension x="10" y="15"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.tooltipText = "重置設定檔\n\n重置設定檔，刪除這個設定檔中儲存的所有框架設定。"
						self.alwaysShowTooltip = true
					</OnLoad>
					<OnEnter function="MovAny_TooltipShow"/>
					<OnLeave function="MovAny_TooltipHide"/>
					<OnClick>
						if MADB.playSound then
							PlaySound("igMainMenuOption")
						end
						StaticPopup_Show("MOVEANYTHING_PROFILE_RESET_CONFIRM")
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptExportProfile" inherits="MAButtonTemplate" text="匯出設定檔">
				<Size>
					<AbsDimension x="120" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="BOTTOMLEFT" relativeTo="MAOptResetProfile"  relativePoint="TOPLEFT">
						<Offset>
							<AbsDimension x="0" y="5"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						--self.tooltipText = ""
						--self.alwaysShowTooltip = true
					</OnLoad>
					<OnEnter function="MovAny_TooltipShow"/>
					<OnLeave function="MovAny_TooltipHide"/>
					<OnClick>
						if MADB.playSound then
							PlaySound("igMainMenuOption")
						end
						MovAny:PortDialog(2)
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptImportProfile" inherits="MAButtonTemplate" text="匯入設定檔">
				<Size>
					<AbsDimension x="120" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="MAOptExportProfile"  relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="1" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						--self.tooltipText = ""
						--self.alwaysShowTooltip = true
					</OnLoad>
					<OnEnter function="MovAny_TooltipShow"/>
					<OnLeave function="MovAny_TooltipHide"/>
					<OnClick>
						if MADB.playSound then
							PlaySound("igMainMenuOption")
						end
						MovAny:PortDialog(1)
					</OnClick>
				</Scripts>
			</Button>
			
			<Button name="MAOptResetAll" inherits="MAButtonTemplate" text="全部重置">
				<Size>
					<AbsDimension x="120" y="22"/>
				</Size>
				<Anchors>
					<Anchor point="LEFT" relativeTo="MAOptResetProfile"  relativePoint="RIGHT">
						<Offset>
							<AbsDimension x="1" y="0"/>
						</Offset>
					</Anchor>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.tooltipText = "全部重置\n\n將版面配置恢復成預設的設定。刪除所有框架設定和自訂框架清單。"
						self.alwaysShowTooltip = true
					</OnLoad>
					<OnEnter function="MovAny_TooltipShow"/>
					<OnLeave function="MovAny_TooltipHide"/>
					<OnClick>
						if MADB.playSound then
							PlaySound("igMainMenuOption")
						end
						StaticPopup_Show("MOVEANYTHING_RESET_ALL_CONFIRM")
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
</Ui>