﻿<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="TRP2_MagasinFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Backdrop bgFile="Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal-Desaturated" edgeFile="Interface\GLUES\COMMON\TextPanel-Border" tile="true">
			<EdgeSize><AbsValue val="32"/></EdgeSize><TileSize><AbsValue val="350"/></TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Size x="300" y="410"/>
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Layers>
			<Layer level="Border">
				<Texture name="TRP2_MagasinFrameReputSurFond">
					<Size x="190" y="15"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="55" y="-380"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="TRP2_MagasinFrameReputFond">
					<Size x="256" y="15"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="55" y="-380"/>
					</Anchors>
				</Texture>
			</Layer>
		    <Layer level="OVERLAY">
				<Texture name="TRP2_MagasinFrameReputBorder" file="Interface\CastingBar\UI-CastingBar-Border-Small">
					<Size x="256" y="64"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="-355"/>
					</Anchors>
				</Texture>
				<FontString name="TRP2_MagasinFrameReputConut" inherits="GameFontNormalSmall" justifyH="CENTER" text="blabla">
					<Anchors>
						<Anchor point="TOP" x="0" y="-382"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_MagasinFrameTitre" inherits="GameFontNormalLarge" justifyH="CENTER" text="Titre">
					<Anchors>
						<Anchor point="TOP" x="0" y="-10"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_MagasinFrameOwner" inherits="GameFontNormal" justifyH="CENTER" text="Owner">
					<Anchors>
						<Anchor point="TOP" relativeto="TRP2_MagasinFrameTitre" relativepoint="BOTTOM" x="0" y="-5"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_MagasinFrameEtat" inherits="GameFontNormal" justifyH="CENTER" text="State">
					<Anchors>
						<Anchor point="TOP" x="0" y="-305"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_MagasinFrameReputation" inherits="GameFontNormal" justifyH="CENTER" text="Rep">
					<Anchors>
						<Anchor point="TOP" x="0" y="-360"/>
					</Anchors>
				</FontString>
		    </Layer>
		</Layers>
		<Frames>
			<Button name="TRP2_MagasinFrameDodo" inherits="TRP2_MainMenuOngletTemplate">
				<Anchors><Anchor point="TOP" x="0" y="-325"/></Anchors>
				<Scripts>
					<OnLoad>
						getglobal(self:GetName().."Icon"):SetTexture("Interface\\ICONS\\Spell_Nature_Sleep");
					</OnLoad>
				</Scripts>
			</Button>
			<!-- Liste des objet -->
			<Frame name="TRP2_MagasinFrameListe" toplevel="false" parent="TRP2_MagasinFrame" hidden="false" inherits="TRP2_ListeTemplate">
				<Anchors>
					<Anchor point="TOP" x="0" y="-50"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.TimeSinceLastUpdate = 0;
						TRP2_MagasinFrameListeRecherche:Hide();
						TRP2_MagasinFrameListeClose:SetScript("OnClick",function(self) self:GetParent():GetParent():Hide(); end);
					</OnLoad>
					<OnUpdate>
						self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed;
						if (self.TimeSinceLastUpdate > 0.25) then
							self.TimeSinceLastUpdate = 0;
							if TRP2_MagasinFrame.owner ~= UnitName("target") or not CheckInteractDistance("target", 2) then
								TRP2_MagasinFrame:Hide();
							end
						end
					</OnUpdate>
				</Scripts>
			</Frame>
		</Frames>
	</Frame>
	
	<!-- Emplacement Inventaire TEMPLATE  -->
	<Button name="TRP2InventaireSlotTemplate" enableMouse="true" virtual="true">
		<Size x="36" y="36"/>
		<Layers>
		    <Layer level="BORDER">
				<Texture name="$parentIcon">
					<Size x="36" y="36"/>
					<Anchors>
						<Anchor point="CENTER" x="0" y="0"/>
					</Anchors>
				</Texture>
		    </Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentQuest" file="Interface\ContainerFrame\UI-Icon-QuestBorder">
					<Size x="36" y="36"/>
					<Anchors>
						<Anchor point="CENTER" x="0" y="0"/>
					</Anchors>
				</Texture>
		    </Layer>
		    <Layer level="OVERLAY">
				<FontString name="$parentQte" inherits="NumberFontNormal" justifyH="RIGHT" text="">
					<Anchors>
						<Anchor point="RIGHT" x="-6" y="-6"/>
					</Anchors>
				</FontString>
				<FontString name="$parentCooldownText" inherits="GameFontNormalSmall" justifyH="CENTER" text="">
					<Anchors>
						<Anchor point="CENTER" x="-2" y="14"/>
					</Anchors>
				</FontString>
		    </Layer>
		</Layers>
		<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
		<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
		<Frames>
		</Frames>
		<Scripts>
			<OnLeave>
				TRP2_ObjetTooltip:Hide()
			</OnLeave>
			<OnUpdate>
				self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed;
				if (self.TimeSinceLastUpdate > 0.5) then
					self.TimeSinceLastUpdate = 0;
					TRP2_SlotOnUpdate(self);
				end
			</OnUpdate>
			<OnEnter>
				if self.ObjetID then
					if string.find(self:GetName(),"TRP2SacFrameSlot") then
						TRP2_SetObjetTooltip(self.Slot,self);
					else
						TRP2_SetObjetTooltip(self.Slot,self,3);
					end
				end
			</OnEnter>
			<OnLoad>
				self.TimeSinceLastUpdate = 0;
				self:RegisterForClicks("LeftButtonUp", "RightButtonUp");
				self:RegisterForDrag("LeftButton","RightButton");
				CreateFrame("Cooldown",self:GetName().."Cooldown",self);
				getglobal(self:GetName().."Cooldown"):SetAllPoints(self);
			</OnLoad>
			<OnDragStart>
				TRP2_SlotOnDragStart(self,button);
			</OnDragStart>
			<OnDragStop>
				TRP2_SlotOnDragStop(self,button);
			</OnDragStop>
			<OnClick>
				if button == "RightButton" and IsControlKeyDown() and string.find(self:GetName(),"TRP2_HUDButton") then
					self:Hide();
					TRP2_DeleteHudButton(self);
				end
				if self.ObjetID then
					if button == "RightButton" and IsControlKeyDown() then
						TRP2_CreateHudButton(self);
					elseif string.find(self:GetName(),"TRP2PlanqueFrameSlot") or string.find(self:GetName(),"TRP2CoffreFrameSlot") then
						if button == "RightButton" then
							TRP2_Error(TRP2_LOC_INVERROR2);
						end
					elseif string.find(self:GetName(),"TRP2SacFrameSlot") or string.find(self:GetName(),"TRP2_HUDButton") then
						if button == "LeftButton" then
							if IsShiftKeyDown() then
								local activeWindow = ChatEdit_GetActiveWindow();
								if ( activeWindow ) then
									local itemName = TRP2_GetWithDefaut(TRP2_GetItemInfo(self.ObjetID),"Nom",TRP2_LOC_NEW_Objet);
									activeWindow:Insert("~"..itemName.."~");
									TRP2_AddItemToCache(self.Slot,itemName);
								elseif self.Slot["Qte"] > 1 then
									if not TRP2_ExchangeFrame:IsVisible() then
										StaticPopupDialogs["TRP2_OBJET_CREATE_STACK"].text = TRP2_CTS("Indiquez la taille de la seconde pile.");
										TRP2_ShowStaticPopup("TRP2_OBJET_CREATE_STACK",nil,self.SlotID,self.TRPtype,nil,nil,true);
									else
										TRP2_Error(TRP2_LOC_INVERROR3);
									end
								end
							elseif IsControlKeyDown() then
								if TRP2_GetWithDefaut(TRP2_GetItemInfo(self.ObjetID),"bGivable",true) then
									TRP2_MakeAColis(self);
								else
									TRP2_Error(ERR_CANT_WRAP_BOUND);
								end
							end
						elseif button == "RightButton" then
							TRP2_UseObjet(self.SlotID,self.Slot,self.ObjetID,self.TRPtype);
						end
					end
				end
			</OnClick>
		</Scripts>
	</Button>
	
	<!-- Emplacement Inventaire HUD TEMPLATE  -->
	<Button name="TRP2HUDInventaireSlotTemplate" movable="true" inherits="TRP2InventaireSlotTemplate" enableMouse="true" virtual="true">
		<Scripts>
			<OnEnter>
				if self.ObjetID then
					TRP2_SetObjetTooltip(self.Slot,self,7);
				end
			</OnEnter>
		</Scripts>
	</Button>
	
	<StatusBar name="TRP2_CastingBarFrame" toplevel="true" parent="UIParent" hidden="true" inherits="CastingBarFrameTemplate">
		<Size x="195" y="13"/>
		<Anchors>
			<Anchor point="CENTER" relativeto="CastingBarFrame" x="0" y="25"/>
		</Anchors>
		<Frames>
			<DressUpModel name="$parentModele" scale="1">
				<Size x="100" y="125"/>
				<Anchors>
					<Anchor point="BOTTOM" relativeto="$parent" relativepoint="TOP" x="0" y="5"/>
				</Anchors>
				<Scripts>
					<OnUpdate>
						if self.seqtime and self.sequence then
							self.seqtime = self.seqtime + (elapsed * 1000);
							self:SetSequenceTime(self.sequence, self.seqtime);
						end
					</OnUpdate>
				</Scripts>
			</DressUpModel>
		</Frames>
		<Scripts>
			<OnLoad>
			</OnLoad>
			<OnEvent>
			</OnEvent>
			<OnUpdate>
				TRP2_CastingBarFrame_OnUpdate(self, elapsed);
			</OnUpdate>
			<OnShow>
			</OnShow>
		</Scripts>
	</StatusBar>

	<Button name="TRP2_BoutonExchangeSlot" inherits="TRP2_MainMenuOngletTemplate" virtual="true">
		<Layers>
			<Layer level="Overlay">
				<FontString name="$parentQte" inherits="NumberFontNormal" justifyH="RIGHT">
					<Anchors>
						<Anchor point="RIGHT" x="0" y="-6"/>
					</Anchors>
				</FontString>
				<FontString name="$parentNom" inherits="GameFontNormalSmall" justifyH="LEFT">
					<Size x="80" y="30"/> 
					<Anchors>
						<Anchor point="LEFT" x="31" y="2"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLeave>
				TRP2_ObjetTooltip:Hide();
			</OnLeave>
			<OnClick>
				TRP2_ExchangeSetSlot(nil, string.sub(self:GetName(),string.len(self:GetName())));
				TRP2_ObjetTooltip:Hide();
			</OnClick>
		</Scripts>
	</Button>
	
	<!-- Frame d'échange -->
	<Frame name="TRP2_ExchangeFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="384" y="256"/> 
		<Anchors>
			<Anchor point="LEFT" x="0" y="0"/>
		</Anchors>
		<Scripts>
			<OnUpdate>
				self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed; 	
				if (self.TimeSinceLastUpdate > 0.1) then
					self.TimeSinceLastUpdate = 0;
					TRP2_ExchangeFrameRefresh();
				end
			</OnUpdate>
			<OnLoad>
				self.TimeSinceLastUpdate = 0;
				TRP2_ExchangeFrameLeftRing:SetTexCoord(1, 0.55, 0, 1);
				TRP2_ExchangeFrameRightRing:SetTexCoord(0.55, 1, 0, 1);
			</OnLoad>
		</Scripts>
		<Frames>
			<Frame name="TRP2_ExchangeFrameOrFrame">
				<Backdrop bgFile="Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal-Desaturated" edgeFile="Interface\DialogFrame\UI-DialogBox-Gold-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="117"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Size x="260" y="50"/> 
				<Anchors>
					<Anchor point="TOP" x="10" y="-15"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<Texture name="$parentLeftOK" file="Interface\TradeFrame\UI-TradeFrame-Highlight">
							<Size x="200" y="200"/>
							<Anchors>
								<Anchor point="CENTER" x="-27" y="-78"/>
							</Anchors>
						</Texture>
						<Texture name="$parentRightOK" file="Interface\TradeFrame\UI-TradeFrame-Highlight">
							<Size x="200" y="200"/>
							<Anchors>
								<Anchor point="CENTER" x="100" y="-78"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
			</Frame>
			<Frame name="TRP2_ExchangeFrameLeftFrame">
				<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Gold-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="32"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Size x="125" y="150"/> 
				<Anchors>
					<Anchor point="CENTER" x="-55" y="-15"/>
				</Anchors>
				<Frames>
					<EditBox name="$parentOr" letters="10" numeric="true" inherits="TRP2_EditBoxSmallText" autofocus="false">
						<Anchors>
							<Anchor point="TOP" relativeto="TRP2_ExchangeFrame" relativepoint="TOP" x="-50" y="-35"/>
						</Anchors>
						<Scripts>
							<OnTextChanged>
								if self:IsVisible() then
									TRP2_ExchangeSetOr(self:GetText());
								end
							</OnTextChanged>
						</Scripts>
					</EditBox>
					<Button name="$parentObjet1" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-10"/>
						</Anchors>
					</Button>
					<Button name="$parentObjet2" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-45"/>
						</Anchors>
					</Button>
					<Button name="$parentObjet3" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-80"/>
						</Anchors>
					</Button>
					<Button name="$parentObjet4" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-115"/>
						</Anchors>
					</Button>
				</Frames>
			</Frame>
			<Frame name="TRP2_ExchangeFrameRightFrame">
				<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Gold-Border" tile="true">
					<EdgeSize>
						<AbsValue val="16"/>
					</EdgeSize>
					<TileSize>
						<AbsValue val="32"/>
					</TileSize>
					<BackgroundInsets>
						<AbsInset left="5" right="5" top="5" bottom="5"/>
					</BackgroundInsets>
				</Backdrop>
				<Size x="125" y="150"/> 
				<Anchors>
					<Anchor point="CENTER" x="75" y="-15"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="TRP2_ExchangeFrameRightFrameOr" inherits="GameFontNormalSmall" justifyH="CENTER">
							<Anchors>
								<Anchor point="TOP" x="0" y="35"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="0.95"/>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="$parentObjet1" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-10"/>
						</Anchors>
						<Scripts>
							<OnClick>
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentObjet2" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-45"/>
						</Anchors>
						<Scripts>
							<OnClick>
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentObjet3" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-80"/>
						</Anchors>
						<Scripts>
							<OnClick>
							</OnClick>
						</Scripts>
					</Button>
					<Button name="$parentObjet4" inherits="TRP2_BoutonExchangeSlot">
						<Anchors>
							<Anchor point="TOPLEFT" x="10" y="-115"/>
						</Anchors>
						<Scripts>
							<OnClick>
							</OnClick>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Button name="TRP2_ExchangeFrameAnnuler" inherits="TRP2_UIPanelButtonTemplate" text="Cancel">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="130" y="10"/>
				</Anchors>
				<Scripts>
					<OnClick>
						TRP2_CancelTransaction();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2_ExchangeFrameOK" inherits="TRP2_UIPanelButtonTemplate" text="Ok">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="35" y="10"/>
				</Anchors>
				<Scripts>
					<OnClick>
						TRP2_OKTransaction();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2_ExchangeFrameHelp" inherits="TRP2_HelpButtonTemplate">
				<Anchors>
					<Anchor point="BOTTOMLEFT" x="35" y="12"/>
				</Anchors>
				<Size x="110" y="30"/>
			</Button>
		</Frames>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentBG1" file="Interface\TradeFrame\ScaledDown\TradeTargetTopL_Normal">
					<Size x="256" y="256"/>
					<Anchors>
						<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" x="0" y="0"/>
					</Anchors>
				</Texture>
				<Texture name="$parentBG2" file="Interface\TradeFrame\ScaledDown\TradeTargetTopR_Normal">
					<Size x="128" y="256"/>
					<Anchors>
						<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" x="0" y="0"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture name="$parentPortrait">
					<Size x="55" y="55"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="10" y="-7"/>
					</Anchors>
				</Texture>
				<Texture name="$parentPortraitDroite">
					<Size x="55" y="55"/>
					<Anchors>
						<Anchor point="TOPRIGHT" x="10" y="-7"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="ARTWORK">
				<Texture name="$parentLeftRing" file="Interface\TARGETINGFRAME\UI-TargetingFrame-Rare-Elite">
					<Size x="115" y="128"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="-38" y="8"/>
					</Anchors>
				</Texture>
				<Texture name="$parentRightRing" file="Interface\TARGETINGFRAME\UI-TargetingFrame-Rare-Elite">
					<Size x="115" y="128"/>
					<Anchors>
						<Anchor point="TOPRIGHT" x="58" y="8"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="overlay">
				<FontString name="TRP2_ExchangeFramePseudoLeft" inherits="GameFontNormal" justifyH="LEFT">
					<Size x="0" y="0"/> 
					<Anchors>
						<Anchor point="TOPLEFT" x="80" y="-5"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_ExchangeFramePseudoRight" inherits="GameFontNormal" justifyH="RIGHT">
					<Size x="0" y="0"/> 
					<Anchors>
						<Anchor point="TOPRIGHT" x="-60" y="-5"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_ExchangeFrameSynchro" inherits="GameFontNormal" justifyH="LEFT">
					<Size x="0" y="0"/> 
					<Anchors>
						<Anchor point="BOTTOMLEFT" x="40" y="15"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
	</Frame>
	
	<!-- Inventaire Sac à Dos -->
	<Frame name="TRP2InventaireFrameSac" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="206" y="332"/> 
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentPortrait">
					<Size x="35" y="35"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="15" y="-6"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture file="Interface\ContainerFrame\UI-Bag-5x4">
					<Size x="256" y="256"/>
					<Anchors>
						<Anchor point="TOP" x="-30" y="0"/>
					</Anchors>
					<TexCoords left="0" right="1" top="0" bottom="1"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString name="$parentNomText" inherits="GameFontNormal" justifyH="CENTER">
					<Size x="110" y="5"/>
					<Anchors>
						<Anchor point="TOP" x="10" y="-13"/>
					</Anchors>
				</FontString>
				<FontString name="$parentPageText" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Size x="50" y="5"/>
					<Anchors>
						<Anchor point="TOP" x="45" y="-35"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnShow>
				TRP2_PlaySound("Sound\\Interface\\GuildBankOpenBag1.wav");
			</OnShow>
			<OnHide>
				TRP2_PlaySound("Sound\\Interface\\GuildBankOpenBag4.wav");
			</OnHide>
			<OnLoad>
				self:SetClampedToScreen(true);
			</OnLoad>
			<OnUpdate>
				if self.page then
					TRP2InventaireFrameSacPageText:SetText(self.page.."/20");
				end
			</OnUpdate>
		</Scripts>
		<Frames>
			<Button name="TRP2_Inv1Aide" inherits="TRP2_BoutonAideTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOP" x="-30" y="-30"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.Page = "Inventaire";
					</OnLoad>
				</Scripts>
			</Button>
			<Frame>
				<Size x="126" y="128"/> 
				<Anchors>
					<Anchor point="BOTTOM" x="43" y="39"/>
				</Anchors>
				<Layers>
					<Layer level="Background">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="11"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BORDER">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="-11"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="Artwork">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="-33"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="TRP2_SacGoldText" inherits="GameFontNormal" justifyH="RIGHT">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-24" y="25"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_SacOrTextLeft" inherits="GameFontNormal" justifyH="LEFT">
							<Size x="50" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-50" y="25"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_SacDurabTextLeft" inherits="GameFontNormal" justifyH="LEFT">
							<Size x="100" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-50" y="-19"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_SacDurabTextRight" inherits="GameFontNormal" justifyH="RIGHT">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-25" y="-19"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_SacPoidsText" inherits="GameFontNormal" justifyH="LEFT">
							<Size x="50" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-50" y="3"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_SacPoidsTextRight" inherits="GameFontNormal" justifyH="RIGHT">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-25" y="3"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="TRP2SacGoldBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOM" x="-38" y="20"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:RegisterForDrag("LeftButton");
							</OnLoad>
							<OnDragStart>
								SetCursor("Interface\\ICONS\\INV_Misc_Coin_01.blp");
								TRP2_PlaySound("Sound\\Interface\\iMoneyDialogOpen.wav");
							</OnDragStart>
							<OnDragStop>
								TRP2_GoldOnDragStop(self);
							</OnDragStop>
							<OnLeave>
								TRP2_MainTooltip:Hide();
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
						</Scripts>
					</Button>
					<Button name="TRP2SacPoidsBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOM" x="-38" y="-5"/>
						</Anchors>
						<Scripts>
							<OnLeave>
								TRP2_MainTooltip:Hide();
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
						</Scripts>
					</Button>
					<Button name="TRP2SacDurabilityBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOM" x="-38" y="-30"/>
						</Anchors>
						<Scripts>
							<OnLeave>
								TRP2_MainTooltip:Hide();
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
						</Scripts>
					</Button>
				</Frames>
				<Scripts>
					<OnUpdate>
						TRP2_SacGoldText:SetText("|cffffffff"..TRP2_GoldToText(TRP2_Module_Inventaire[TRP2_Royaume][TRP2_Joueur]["Sac"]["Or"]));
					</OnUpdate>
				</Scripts>
			</Frame>
			<Button name="TRP2SacFramePortraitBouton">
				<Size x="35" y="35"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="15" y="-6"/>
				</Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnEnter>
						TRP2_SetSacPortraitTooltip();
					</OnEnter>
					<OnClick>
						if not TRP2_CreationFrame:IsVisible() then
							TRP2_OpenPanel("Creation");
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2SacFrameSlot1" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot2" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot3" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot4" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot5" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot6" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot7" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot8" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot9" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot10" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot11" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot12" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot13" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot14" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot15" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot16" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot17" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-214"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot18" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-214"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot19" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-214"/></Anchors>
			</Button>
			<Button name="TRP2SacFrameSlot20" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-214"/></Anchors>
			</Button>
			<Button inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" x="-5" y="-1"/>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide()
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2SacFramePageNextBouton">
				<Size x="20" y="20"/>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
				<Anchors><Anchor point="TOPRIGHT" x="-15" y="-28"/></Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnUpdate>
						if self:GetParent().page and self:GetParent().page ~= 20 then
							self:Enable();
						else
							self:Disable();
						end
					</OnUpdate>
					<OnClick>
						if self:GetParent().page and self:GetParent().page ~= 20 then
							TRP2_ShowSac(self:GetParent().page+1);
							TRP2_PlaySound("Sound\\Interface\\uChatScrollButton.wav");
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2SacFramePagePrevBouton">
				<Size x="20" y="20"/>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
				<Anchors><Anchor point="TOPRIGHT" x="-80" y="-28"/></Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnUpdate>
						if self:GetParent().page and self:GetParent().page > 1 then
							self:Enable();
						else
							self:Disable();
						end
					</OnUpdate>
					<OnClick>
						if self:GetParent().page and self:GetParent().page > 1 then
							TRP2_ShowSac(self:GetParent().page-1);
							TRP2_PlaySound("Sound\\Interface\\uChatScrollButton.wav");
						end
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<!-- Inventaire Sac à Dos -->
	<Frame name="TRP2InventaireFrameCoffre" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="206" y="332"/>
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentPortrait">
					<Size x="35" y="35"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="15" y="-6"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture file="Interface\ContainerFrame\UI-Bag-5x4-bank">
					<Size x="256" y="256"/>
					<Anchors>
						<Anchor point="TOP" x="-30" y="0"/>
					</Anchors>
					<TexCoords left="0" right="1" top="0" bottom="1"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString name="$parentNomText" inherits="GameFontNormal" justifyH="CENTER">
					<Size x="110" y="5"/>
					<Anchors>
						<Anchor point="TOP" x="10" y="-13"/>
					</Anchors>
				</FontString>
				<FontString name="$parentPageText" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Size x="50" y="5"/>
					<Anchors>
						<Anchor point="TOP" x="45" y="-35"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:SetClampedToScreen(true);
			</OnLoad>
			<OnShow>
				TRP2_PlaySound("Sound\\Doodad\\ChestOpen.wav");
			</OnShow>
			<OnHide>
				TRP2_PlaySound("Sound\\Doodad\\HordeChest_01_Close.wav");
			</OnHide>
			<OnUpdate>
				if not IsMounted() or UnitOnTaxi("player") then
					self:Hide();
				elseif self.page then
					TRP2InventaireFrameCoffrePageText:SetText(self.page.."/20");
				end
			</OnUpdate>
		</Scripts>
		<Frames>
			<Button name="TRP2_Inv2Aide" inherits="TRP2_BoutonAideTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOP" x="-30" y="-30"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.Page = "Inventaire";
					</OnLoad>
				</Scripts>
			</Button>
			<Frame>
				<Size x="126" y="128"/>
				<Anchors>
					<Anchor point="BOTTOM" x="43" y="39"/>
				</Anchors>
				<Layers>
					<Layer level="Background">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="11"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="BORDER">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="-11"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="Artwork">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="-33"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="TRP2_CoffreGoldText" inherits="GameFontNormal" justifyH="RIGHT">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-24" y="25"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_CoffreOrTextLeft" inherits="GameFontNormal" justifyH="LEFT">
							<Size x="50" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-50" y="25"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_CoffreDurabTextLeft" inherits="GameFontNormal" justifyH="LEFT">
							<Size x="100" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-50" y="-19"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_CoffreDurabTextRight" inherits="GameFontNormal" justifyH="RIGHT">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-25" y="-19"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_CoffrePoidsText" inherits="GameFontNormal" justifyH="LEFT">
							<Size x="50" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="-50" y="3"/>
							</Anchors>
						</FontString>
						<FontString name="TRP2_CoffrePoidsTextRight" inherits="GameFontNormal" justifyH="RIGHT">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-25" y="3"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="TRP2CoffreGoldBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOM" x="-38" y="20"/>
						</Anchors>
						<Scripts>
							<OnLoad>
								self:RegisterForDrag("LeftButton");
							</OnLoad>
							<OnDragStart>
								SetCursor("Interface\\ICONS\\INV_Misc_Coin_01.blp");
								TRP2_PlaySound("Sound\\Interface\\iMoneyDialogOpen.wav");
							</OnDragStart>
							<OnDragStop>
								ResetCursor();
								if MouseIsOver(TRP2InventaireFrameSac) and TRP2InventaireFrameSac:IsVisible() then
									StaticPopupDialogs["TRP2_GET_MONTANT_NS"].text = TRP2_CTS(TRP2_ENTETE..TRP2_LOC_GoldToSac);
									TRP2_ShowStaticPopup("TRP2_GET_MONTANT_NS",nil,TRP2_TransfertOr,"Coffre","Sac",nil,true,0);
								end
								TRP2_PlaySound("Sound\\Interface\\iMoneyDialogClose.wav");
							</OnDragStop>
							<OnLeave>
								TRP2_MainTooltip:Hide();
								
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
						</Scripts>
					</Button>
					<Button name="TRP2CoffrePoidsBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOM" x="-38" y="-5"/>
						</Anchors>
						<Scripts>
							<OnLeave>
								TRP2_MainTooltip:Hide();
								
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
						</Scripts>
					</Button>
					<Button name="TRP2CoffreDurabilityBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOM" x="-38" y="-30"/>
						</Anchors>
						<Scripts>
							<OnLeave>
								TRP2_MainTooltip:Hide();
								
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
						</Scripts>
					</Button>
				</Frames>
				<Scripts>
					<OnUpdate>
						TRP2_CoffreGoldText:SetText("|cffffffff"..TRP2_GoldToText(TRP2_Module_Inventaire[TRP2_Royaume][TRP2_Joueur]["Coffre"]["Or"]));
					</OnUpdate>
				</Scripts>
			</Frame>
			<Button name="TRP2CoffreFramePortraitBouton">
				<Size x="35" y="35"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="15" y="-6"/>
				</Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnEnter>
						TRP2_SetCoffrePortraitTooltip();
					</OnEnter>
					<OnClick>
						if not TRP2_CreationFrame:IsVisible() then
							TRP2_OpenPanel("Creation");
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2CoffreFrameSlot1" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot2" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot3" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot4" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot5" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot6" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot7" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot8" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-93"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot9" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot10" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot11" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot12" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-134"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot13" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot14" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot15" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot16" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-174"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot17" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-214"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot18" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-214"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot19" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-214"/></Anchors>
			</Button>
			<Button name="TRP2CoffreFrameSlot20" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-214"/></Anchors>
			</Button>
			<Button inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" x="-5" y="-1"/>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide();
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2CoffreFramePageNextBouton">
				<Size x="20" y="20"/>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-NextPage-Disabled"/>
				<Anchors><Anchor point="TOPRIGHT" x="-15" y="-28"/></Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnUpdate>
						if self:GetParent().page and self:GetParent().page ~= 20 then
							self:Enable();
						else
							self:Disable();
						end
					</OnUpdate>
					<OnClick>
						if self:GetParent().page and self:GetParent().page ~= 20 then
							TRP2_ShowCoffre(self:GetParent().page+1);
							TRP2_PlaySound("Sound\\Interface\\uChatScrollButton.wav");
						end
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2CoffreFramePagePrevBouton">
				<Size x="20" y="20"/>
				<NormalTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Up"/>
				<PushedTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Down"/>
				<DisabledTexture file="Interface\Buttons\UI-SpellbookIcon-PrevPage-Disabled"/>
				<Anchors><Anchor point="TOPRIGHT" x="-80" y="-28"/></Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnUpdate>
						if self:GetParent().page and self:GetParent().page > 1 then
							self:Enable();
						else
							self:Disable();
						end
					</OnUpdate>
					<OnClick>
						if self:GetParent().page and self:GetParent().page > 1 then
							TRP2_ShowCoffre(self:GetParent().page-1);
							TRP2_PlaySound("Sound\\Interface\\uChatScrollButton.wav");
						end
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<!-- Inventaire Planque -->
	<Frame name="TRP2InventaireFramePlanque" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="206" y="90"/> 
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture name="$parentPortrait">
					<Size x="35" y="35"/>
					<Anchors>
						<Anchor point="TOPLEFT" x="15" y="-6"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture file="Interface\ContainerFrame\UI-Bag-1x4-Bank">
					<Size x="256" y="128"/>
					<Anchors>
						<Anchor point="TOP" x="-30" y="0"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString name="$parentNomText" inherits="GameFontNormal" justifyH="CENTER">
					<Size x="110" y="5"/>
					<Anchors>
						<Anchor point="TOP" x="10" y="-13"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self:SetClampedToScreen(true);
			</OnLoad>
			<OnShow>
				TRP2_PlaySound("Sound\\Interface\\PickUp\\PickUpBag.wav");
			</OnShow>
		</Scripts>
		<Frames>
			<Button name="TRP2_Inv3Aide" inherits="TRP2_BoutonAideTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOP" x="-30" y="-30"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.Page = "Planques";
					</OnLoad>
				</Scripts>
			</Button>
			<Frame>
				<Size x="126" y="128"/>
				<Anchors>
					<Anchor point="BOTTOM" x="43" y="-37"/>
				</Anchors>
				<Layers>
					<Layer level="Background">
						<Texture file="Interface\ContainerFrame\UI-Backpack-TokenFrame">
							<Size x="256" y="32"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="11"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="TRP2_PlanqueGoldText" inherits="GameFontNormal" justifyH="RIGHT" text="plou">
							<Size x="150" y="5"/>
							<Anchors>
								<Anchor point="BOTTOMRIGHT" x="-30" y="25"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
				<Frames>
					<Button name="TRP2PlanqueGoldBouton">
						<Size x="180" y="22"/>
						<Anchors>
							<Anchor point="BOTTOMRIGHT" x="-24" y="20"/>
						</Anchors>
						<Scripts>
							<OnLeave>
								TRP2_MainTooltip:Hide();
							</OnLeave>
							<OnEnter>
								TRP2_RefreshTooltipForFrame(self);
							</OnEnter>
							<OnLoad>
								self:RegisterForDrag("LeftButton");
							</OnLoad>
							<OnDragStart>
								SetCursor("Interface\\ICONS\\INV_Misc_Coin_01.blp");
								TRP2_PlaySound("Sound\\Interface\\iMoneyDialogOpen.wav");
							</OnDragStart>
							<OnDragStop>
								ResetCursor();
								if MouseIsOver(TRP2InventaireFrameSac) and TRP2InventaireFrameSac:IsVisible()  then
									StaticPopupDialogs["TRP2_GET_MONTANT_NS"].text = TRP2_CTS(TRP2_ENTETE..TRP2_LOC_GoldToSac);
									TRP2_ShowStaticPopup("TRP2_GET_MONTANT_NS",nil,TRP2_TransfertOr,"Planque","Sac",nil,true,0);
								end
								TRP2_PlaySound("Sound\\Interface\\iMoneyDialogClose.wav");
							</OnDragStop>
						</Scripts>
					</Button>
				</Frames>
			</Frame>
			<Button name="TRP2PlanqueFramePortraitBouton">
				<Size x="35" y="35"/>
				<Anchors>
					<Anchor point="TOPLEFT" x="15" y="-6"/>
				</Anchors>
				<Scripts>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
					<OnEnter>
						TRP2_SetTooltipForFrame(self,self,"TOPLEFT",0,0,TRP2_SetPlanquePortraitTooltip(TRP2InventaireFramePlanque.planqueTab,TRP2InventaireFramePlanque.planqueNom));
						TRP2_RefreshTooltipForFrame(self);
					</OnEnter>
				</Scripts>
			</Button>
			<Button name="TRP2PlanqueFrameSlot1" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="27" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2PlanqueFrameSlot2" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="68" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2PlanqueFrameSlot3" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="111" y="-50"/></Anchors>
			</Button>
			<Button name="TRP2PlanqueFrameSlot4" inherits="TRP2InventaireSlotTemplate">
				<Anchors><Anchor point="TOPLEFT" x="152" y="-50"/></Anchors>
			</Button>
			<Button inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" x="-5" y="-1"/>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide();
						TRP2_PlaySound("Sound\\Interface\\PickUp\\PutDownBag.wav");
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2PlanqueFrameEdit" inherits="TRP2_UIPanelButtonTemplate" text="EDIT">
				<Size x="60" y="20"/>
				<Anchors>
					<Anchor point="TOP" x="55" y="-28"/>
				</Anchors>
				<Scripts>
					<OnClick>
						if button=="LeftButton" then
							TRP2_EditPlanque();
						else
							TRP2_DeletePlanque();
						end
					</OnClick>
					<OnLoad>
						self:RegisterForClicks("RightButtonUp","LeftButtonUp");
					</OnLoad>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
	
	<!-- Inventaire Panneau -->
	<Frame name="TRP2InventaireFramePanneau" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Backdrop bgFile="Interface\Archeology\Arch-BookCompletedLeft" edgeFile="Interface\GLUES\COMMON\TextPanel-Border" tile="true">
			<EdgeSize><AbsValue val="32"/></EdgeSize><TileSize><AbsValue val="225"/></TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Size x="250" y="150"/> 
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture file="Interface\ACHIEVEMENTFRAME\UI-GuildAchievement-Parchment-Horizontal-Desaturated">
					<Size x="50" y="40"/>
					<Anchors>
						<Anchor point="TOP" x="-42" y="40"/>
					</Anchors>
				</Texture>
			</Layer>
			<Layer level="BORDER">
				<Texture file="Interface\ACHIEVEMENTFRAME\UI-Achievement-ComparisonHeader">
					<Size x="256" y="64"/>
					<Anchors>
						<Anchor point="TOP" x="35" y="55"/>
					</Anchors>
				</Texture>
				<Texture file="Interface\ACHIEVEMENTFRAME\UI-Achievement-IconFrame">
					<Size x="60" y="60"/>
					<Anchors>
						<Anchor point="CENTER" x="-1" y="1"/>
					</Anchors>
					<TexCoords left="0" right="0.55" top="0" bottom="0.55"/>
				</Texture>
			</Layer>
			<Layer level="OVERLAY">
				<FontString name="TRP2InventaireFramePanneauNomText" inherits="GameFontNormal" justifyH="CENTER" text="TITLE">
					<Size x="200" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="-25"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2InventaireFramePanneauHeaderText" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Anchors>
						<Anchor point="TOP" x="19" y="25"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				self.TimeSinceLastUpdate = 10;
			</OnLoad>
			<OnUpdate>
				self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed;
				if (self.TimeSinceLastUpdate > 0.20) then
					self.TimeSinceLastUpdate = 0;
					if TRP2_GetPlanqueID(true) ~= self.panneauID then
						self:Hide();
					end
				end
			</OnUpdate>
		</Scripts>
		<Frames>
			<Frame name="TRP2InventaireFramePanneauLoadingFrame">
				<Size x="250" y="150"/> 
				<Anchors>
					<Anchor point="CENTER" x="0" y="0"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						TRP2InventaireFramePanneauLoadingBarProgress:SetTexture(0,0.6,0);
						self.TimeSinceLastUpdate = 10;
					</OnLoad>
					<OnUpdate>
						self.TimeSinceLastUpdate = self.TimeSinceLastUpdate + elapsed;
						if (self.TimeSinceLastUpdate > 0.5) then
							self.TimeSinceLastUpdate = 0;
							TRP2_PanneauLoadingBar(TRP2InventaireFramePanneau.panneauNom,TRP2InventaireFramePanneau.docuID,TRP2InventaireFramePanneau.docuSize);
						end
					</OnUpdate>
				</Scripts>
				<Layers>
					<Layer level="BORDER">
						<Texture name="TRP2InventaireFramePanneauLoadingBarProgress">
							<Size x="145" y="8"/>
							<Anchors>
								<Anchor point="BOTTOMLEFT" x="50" y="20"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="ARTWORK">
						<Texture file="Interface\CastingBar\UI-CastingBar-Border">
							<Size x="192" y="48"/>
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="OVERLAY">
						<FontString name="TRP2InventaireFramePanneauLoadingText" inherits="GameFontNormalSmall" justifyH="CENTER">
							<Anchors>
								<Anchor point="BOTTOM" x="0" y="35"/>
							</Anchors>
						</FontString>
					</Layer>
				</Layers>
			</Frame>
			<Button inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" x="-1" y="-1"/>
				</Anchors>
				<Scripts>
					<OnClick>
						self:GetParent():Hide();
						TRP2_PlaySound("Sound\\Interface\\PickUp\\PutDownBag.wav");
					</OnClick>
				</Scripts>
			</Button>
			<Button name="TRP2InventaireFramePanneauEdit" inherits="TRP2_UIPanelButtonTemplate" hidden="true">
				<Size x="75" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="0" y="10"/>
				</Anchors>
				<Scripts>
					<OnClick>
						if button=="LeftButton" then
							TRP2_EditPanneau();
						else
							TRP2_DeletePanneau();
						end
					</OnClick>
					<OnLoad>
						self:RegisterForClicks("RightButtonUp","LeftButtonUp");
					</OnLoad>
				</Scripts>
			</Button>
			<Button name="TRP2InventaireFramePanneauSlot">
				<Anchors><Anchor point="CENTER" x="0" y="0"/></Anchors>
				<Size x="36" y="36"/>
				<Layers>
					<Layer level="BORDER">
						<Texture name="$parentIcon">
							<Size x="36" y="36"/>
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
					<Layer level="ARTWORK">
						<Texture name="$parentQuest" file="Interface\ContainerFrame\UI-Icon-QuestBorder">
							<Size x="36" y="36"/>
							<Anchors>
								<Anchor point="CENTER" x="0" y="0"/>
							</Anchors>
						</Texture>
					</Layer>
				</Layers>
				<PushedTexture file="Interface\Buttons\UI-Quickslot-Depress"/>
				<HighlightTexture alphaMode="ADD" file="Interface\Buttons\ButtonHilight-Square"/>
				<Scripts>
					<OnEnter>
						TRP2_RefreshTooltipForFrame(self);
					</OnEnter>
					<OnLeave>
						TRP2_MainTooltip:Hide();
					</OnLeave>
				</Scripts>
			</Button>
			<Button name="TRP2InventaireFramePanneauHeaderButton" inherits="TRP2_MainMenuOngletTemplate">
				<Anchors><Anchor point="TOP" x="-42" y="28"/></Anchors>
				<Scripts>
					<OnLoad>
						getglobal(self:GetName().."Icon"):SetTexture("Interface\\ICONS\\inv_misc_enchantedscroll");
					</OnLoad>
				</Scripts>
			</Button>
		</Frames>
	</Frame>

	<!-- Tooltip Objet -->
	<GameTooltip name="TRP2_ObjetTooltip" frameStrata="TOOLTIP" hidden="false" parent="UIParent" inherits="GameTooltipTemplate"/>
	
	<!-- Item Link Frame -->
	<Frame name="TRP2_ItemLinkTooltip" frameStrata="TOOLTIP" hidden="true" toplevel="true" movable="true" parent="UIParent" enableMouse="true">
		<TitleRegion setAllPoints="true"/>
		<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
			<EdgeSize>
				<AbsValue val="20"/>
			</EdgeSize>
			<TileSize>
				<AbsValue val="20"/>
			</TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Size x="250" y="250"/> 
		<Layers>
			<Layer level="overlay">
				<FontString name="TRP2_ItemLinkTooltipLine1" inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT" x="10" y="-10"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_ItemLinkTooltipLine2" inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="TRP2_ItemLinkTooltipLine1" relativePoint="BOTTOMLEFT" x="0" y="-2"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_ItemLinkTooltipLine3" inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="TRP2_ItemLinkTooltipLine2" relativePoint="BOTTOMLEFT" x="0" y="-2"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_ItemLinkTooltipLine4" inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="TRP2_ItemLinkTooltipLine3" relativePoint="BOTTOMLEFT" x="0" y="-2"/>
					</Anchors>
				</FontString>
				<FontString name="TRP2_ItemLinkTooltipLine5" inherits="GameFontNormal" justifyH="LEFT">
					<Anchors>
						<Anchor point="TOPLEFT" relativeTo="TRP2_ItemLinkTooltipLine4" relativePoint="BOTTOMLEFT" x="0" y="-2"/>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Scripts>
			<OnLoad>
				TRP2_ItemLinkTooltipLine1:SetNonSpaceWrap(true);
				TRP2_ItemLinkTooltipLine1:SetFontObject(GameFontNormalLarge);
				TRP2_ItemLinkTooltipLine2:SetNonSpaceWrap(true);
				TRP2_ItemLinkTooltipLine3:SetNonSpaceWrap(true);
				TRP2_ItemLinkTooltipLine4:SetNonSpaceWrap(true);
				TRP2_ItemLinkTooltipLine5:SetNonSpaceWrap(true);
			</OnLoad>
		</Scripts>
		<Frames>
			<Button inherits="UIPanelCloseButton">
				<Anchors>
					<Anchor point="TOPRIGHT" x="0" y="0"/>
				</Anchors>
				<Scripts>
					<OnClick>
						TRP2_ItemLinkTooltip:Hide();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
	
	<!-- Liste des planques -->
	<Frame name="TRP2_PlanqueListe" toplevel="true" parent="UIParent" hidden="true" inherits="TRP2_ListeTemplate">
		<TitleRegion setAllPoints="true"/>
		<Anchors>
			<Anchor point="center"/>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_PlanqueListeTitle" inherits="GameFontNormal" justifyH="CENTER" text="kek">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnShow>
				TRP2_LoadPlanqueList();
			</OnShow>
			<OnLoad>
				TRP2_PlanqueListeRecherche:Hide();
			</OnLoad>
		</Scripts>
	</Frame>
	
	<!-- Liste des panneaux -->
	<Frame name="TRP2_PanneauListe" toplevel="true" parent="UIParent" hidden="true" inherits="TRP2_ListeTemplate">
		<TitleRegion setAllPoints="true"/>
		<Anchors>
			<Anchor point="center"/>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_PanneauListeTitle" inherits="GameFontNormal" justifyH="CENTER" text="kek">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnShow>
				TRP2_LoadPanneauList();
			</OnShow>
			<OnLoad>
				TRP2_PanneauListeRecherche:Hide();
				for k=1,49,1 do --Initialisation
					getglobal("TRP2_PanneauListeSlot"..k.."Icon"):SetTexture("Interface\\ICONS\\inv_misc_enchantedscroll");
				end
			</OnLoad>
		</Scripts>
	</Frame>
	
	<!-- Liste des planques des autres -->
	<Frame name="TRP2_SearchPlanqueListe" toplevel="true" parent="UIParent" hidden="true" inherits="TRP2_ListeTemplate">
		<TitleRegion setAllPoints="true"/>
		<Anchors>
			<Anchor point="center"/>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_SearchPlanqueListeTitle" inherits="GameFontNormal" justifyH="CENTER" text="kek">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				TRP2_SearchPlanqueListeRecherche:Hide();
			</OnLoad>
		</Scripts>
	</Frame>
	
	<!-- Liste des panneau des autres -->
	<Frame name="TRP2_SearchPanneauListe" toplevel="true" parent="UIParent" hidden="true" inherits="TRP2_ListeTemplate">
		<TitleRegion setAllPoints="true"/>
		<Anchors>
			<Anchor point="center"/>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_SearchPanneauListeTitle" inherits="GameFontNormal" justifyH="CENTER" text="kek">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnLoad>
				TRP2_SearchPanneauListeRecherche:Hide();
				for k=1,49,1 do --Initialisation
					getglobal("TRP2_SearchPanneauListeSlot"..k.."Icon"):SetTexture("Interface\\ICONS\\inv_misc_enchantedscroll");
				end
			</OnLoad>
		</Scripts>
	</Frame>
	
	<!-- Creation planque -->
	<Frame name="TRP2_CreationPlanqueFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="250" y="285"/> 
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Backdrop bgFile="Interface\AchievementFrame\UI-Achievement-StatsBackground" edgeFile="Interface\GLUES\COMMON\TextPanel-Border" tile="true">
			<EdgeSize><AbsValue val="32"/></EdgeSize><TileSize><AbsValue val="400"/></TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_CreationPlanqueFrameTitle" inherits="GameFontNormal" justifyH="CENTER" text="kek">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="TRP2_Inv3Aide" inherits="TRP2_BoutonAideTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="-10" y="-10"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.Page = "Planques";
					</OnLoad>
				</Scripts>
			</Button>
			<EditBox name="TRP2_CreationPlanqueFrameNom" letters="50" numeric="false" inherits="TRP2_EditBoxExtensible" autofocus="false">
				<Size x="170" y="18"/>
				<Anchors>
					<Anchor point="TOP" x="0" y="-15"/>
				</Anchors>
			</EditBox>
			<Frame name="TRP2_CreationPlanqueFrameAccessNoms" inherits="TRP2_ZoneSaisieTemplate">
				<Anchors>
					<Anchor point="TOP" relativepoint="bottom" relativeto="TRP2_CreationPlanqueFrameNom" x="0" y="-15"/>
				</Anchors>
			</Frame>
			<Frame name="TRP2_CreationPlanqueFrameAccessLevel" inherits="TRP2_LabelledDropDown" enableMouse="true">
				<Anchors>
					<Anchor point="TOP" relativepoint="bottom" relativeto="TRP2_CreationPlanqueFrameAccessNoms" x="-60" y="-15"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						TRP2_CreationPlanqueFrameAccessLevelButton:SetScript("OnClick",function(self) 
							TRP2_InitUIDropDown(TRP2_DD_PlanqueAccess,self,-110,0);
						end);
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="TRP2_CreationPlanqueFrameIcone" inherits="TRP2_MainMenuOngletTemplate">
				<Anchors>
					<Anchor point="TOP" relativeto="TRP2_CreationPlanqueFrameAccessLevel" relativepoint="BOTTOM" x="60" y="-20"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="TRP2_CreationPlanqueFrameIconeTexte" inherits="GameFontNormalSmall" justifyH="CENTER" text="kek">
							<Size x="300" y="0"/>
							<Anchors>
								<Anchor point="TOP" x="0" y="15"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="0.95"/>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnClick>
						TRP2_SetListFor("icones",TRP2_CreationPlanqueFrame,nil,self:GetName().."Icon",self:GetName());
					</OnClick>
				</Scripts>
			</Button>
			<CheckButton name="TRP2_CreationPlanqueFramePublic" inherits="TRP2_CheckButtonSmallTemplate">
				<Size x="24" y="24"/>
				<Anchors>
					<Anchor point="TOP" relativeto="TRP2_CreationPlanqueFrameIcone" relativepoint="BOTTOM" x="-60" y="-10"/>
				</Anchors>
			</CheckButton>
			<!-- <CheckButton name="TRP2_CreationPlanqueFrameReadOnly" inherits="TRP2_CheckButtonSmallTemplate">
				<Size x="24" y="24"/>
				<Anchors>
					<Anchor point="TOP" relativeto="TRP2_CreationPlanqueFramePublic" relativepoint="BOTTOM" x="0" y="0"/>
				</Anchors>
			</CheckButton> -->
			<Button name="TRP2_CreationPlanqueFrameSave" inherits="TRP2_UIPanelButtonTemplate" text="OK">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="-45" y="10"/>
				</Anchors>
			</Button>
			<Button name="TRP2_CreationPlanqueFrameCancel" inherits="TRP2_UIPanelButtonTemplate" text="CANCEL">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="45" y="10"/>
				</Anchors>
				<Scripts>
					<OnClick>
						TRP2_CreationPlanqueFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
	
	<!-- Creation panneau -->
	<Frame name="TRP2_CreationPanneauFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="250" y="285"/> 
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Backdrop bgFile="Interface\AchievementFrame\UI-Achievement-StatsBackground" edgeFile="Interface\GLUES\COMMON\TextPanel-Border" tile="true">
			<EdgeSize><AbsValue val="32"/></EdgeSize><TileSize><AbsValue val="400"/></TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_CreationPanneauFrameTitle" inherits="GameFontNormal" justifyH="CENTER">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="TRP2_Inv31Aide" inherits="TRP2_BoutonAideTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOPRIGHT" x="-10" y="-10"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.Page = "Panneaux";
					</OnLoad>
				</Scripts>
			</Button>
			<EditBox name="TRP2_CreationPanneauFrameNom" letters="50" numeric="false" inherits="TRP2_EditBoxExtensible" autofocus="false">
				<Size x="170" y="18"/>
				<Anchors>
					<Anchor point="TOP" x="0" y="-15"/>
				</Anchors>
			</EditBox>
			<Frame name="TRP2_CreationPanneauFrameAccessNoms" inherits="TRP2_ZoneSaisieTemplate">
				<Anchors>
					<Anchor point="TOP" relativepoint="bottom" relativeto="TRP2_CreationPanneauFrameNom" x="0" y="-15"/>
				</Anchors>
			</Frame>
			<Frame name="TRP2_CreationPanneauFrameAccessLevel" inherits="TRP2_LabelledDropDown" enableMouse="true">
				<Anchors>
					<Anchor point="TOP" relativepoint="bottom" relativeto="TRP2_CreationPanneauFrameAccessNoms" x="-60" y="-15"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						TRP2_CreationPanneauFrameAccessLevelButton:SetScript("OnClick",function(self) 
							TRP2_InitUIDropDown(TRP2_DD_PlanqueAccess,self,-110,0);
						end);
					</OnLoad>
				</Scripts>
			</Frame>
			<Button name="TRP2_CreationPanneauFrameIcone" inherits="TRP2_MainMenuOngletTemplate">
				<Anchors>
					<Anchor point="TOP" relativeto="TRP2_CreationPanneauFrameAccessLevel" relativepoint="BOTTOM" x="60" y="-20"/>
				</Anchors>
				<Layers>
					<Layer level="OVERLAY">
						<FontString name="TRP2_CreationPanneauFrameIconeTexte" inherits="GameFontNormalSmall" justifyH="CENTER" text="kek">
							<Size x="300" y="0"/>
							<Anchors>
								<Anchor point="TOP" x="0" y="15"/>
							</Anchors>
							<Color r="0.95" g="0.95" b="0.95"/>
						</FontString>
					</Layer>
				</Layers>
				<Scripts>
					<OnEnter>
						if self.Arg then
							local tab = TRP2_GetDocumentInfo(self.Arg);
							TRP2_SetTooltipForFrame(self,self,"RIGHT",-5,-5,TRP2_CreatSimpleTooltipDocument(tab),TRP2_CreatSimpleTooltipDocumentNext(tab,self.Arg).."\n\n"
								.."{j}"..TRP2_LOC_CLIC.." : {w}"..TRP2_LOC_DocuCHOOSE);
						else
							TRP2_SetTooltipForFrame(self,self,"RIGHT",-5,-5,TRP2_LOC_DocuCHOOSE,"{j}"..TRP2_LOC_CLIC.." : {w}"..TRP2_LOC_DocuCHOOSE);
						end
						TRP2_RefreshTooltipForFrame(self);
					</OnEnter>
					<OnClick>
						TRP2_SetListFor("docuID",TRP2_CreationPanneauFrame,false,self);
					</OnClick>
				</Scripts>
			</Button>
			<CheckButton name="TRP2_CreationPanneauFramePublic" inherits="TRP2_CheckButtonSmallTemplate">
				<Size x="24" y="24"/>
				<Anchors>
					<Anchor point="TOP" relativeto="TRP2_CreationPanneauFrameIcone" relativepoint="BOTTOM" x="-60" y="-10"/>
				</Anchors>
			</CheckButton>
			<Button name="TRP2_CreationPanneauFrameSave" inherits="TRP2_UIPanelButtonTemplate" text="OK">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="-45" y="10"/>
				</Anchors>
			</Button>
			<Button name="TRP2_CreationPanneauFrameCancel" inherits="TRP2_UIPanelButtonTemplate" text="CANCEL">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="45" y="10"/>
				</Anchors>
				<Scripts>
					<OnClick>
						TRP2_CreationPanneauFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
	
	<!-- OutBox Button -->
	<Button name="TRP2_MailOutBoxButton" parent="MailFrame" inherits="TRP2_MainMenuOngletTemplate">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="5" y="-20"/>
		</Anchors>
		<Frames>
			<Button name="TRP2_OutBoxAide" inherits="TRP2_BoutonAideTemplate">
				<Size x="16" y="16"/>
				<Anchors>
					<Anchor point="TOP" x="0" y="20"/>
				</Anchors>
				<Scripts>
					<OnLoad>
						self.Page = "Colis";
					</OnLoad>
				</Scripts>
			</Button>
		</Frames>
		<Scripts>
			<OnEnter>
				TRP2_SetTooltipForFrame(self,self,"BOTTOM",0,0,"{w}TRP2 : "..TRP2_LOC_OUTBOX,
					TRP2_GetIndexedTabSize(TRP2_Module_Inventaire[TRP2_Royaume][TRP2_Joueur]["OutBox"]).." "..TRP2_LOC_COURRATT);
				TRP2_RefreshTooltipForFrame(self);
			</OnEnter>
			<OnClick>
				TRP2_SetListFor("courrSend",UIParent);
			</OnClick>
		</Scripts>
	</Button>
	<!-- InBox Button -->
	<Button name="TRP2_MailInBoxButton" parent="MailFrame" inherits="TRP2_MainMenuOngletTemplate">
		<Anchors>
			<Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="5" y="-56"/>
		</Anchors>
		<Scripts>
			<OnEnter>
				TRP2_SetTooltipForFrame(self,self,"BOTTOM",0,0,"{w}TRP2 : "..TRP2_LOC_INBOX,
					TRP2_GetIndexedTabSize(TRP2_Module_Inventaire[TRP2_Royaume][TRP2_Joueur]["InBox"]).." "..TRP2_LOC_COURRATT);
				TRP2_RefreshTooltipForFrame(self);
			</OnEnter>
			<OnClick>
				TRP2_SetListFor("courrReceiv",UIParent);
			</OnClick>
		</Scripts>
	</Button>
	
	<!-- Creation d'un colis -->
	<Frame name="TRP2_ColisFrame" toplevel="true" movable="true" parent="UIParent" enableMouse="true" hidden="true">
		<TitleRegion setAllPoints="true"/>
		<Size x="250" y="150"/> 
		<Anchors>
			<Anchor point="CENTER" x="0" y="0"/>
		</Anchors>
		<Backdrop bgFile="Interface\AchievementFrame\UI-Achievement-StatsBackground" edgeFile="Interface\GLUES\COMMON\TextPanel-Border" tile="true">
			<EdgeSize><AbsValue val="32"/></EdgeSize><TileSize><AbsValue val="400"/></TileSize>
			<BackgroundInsets>
				<AbsInset left="5" right="5" top="5" bottom="5"/>
			</BackgroundInsets>
		</Backdrop>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="TRP2_ColisFrameTitle" inherits="GameFontNormal" justifyH="CENTER" text="kek">
					<Size x="300" y="0"/>
					<Anchors>
						<Anchor point="TOP" x="0" y="15"/>
					</Anchors>
					<Color r="0.95" g="0.95" b="0.95"/>
				</FontString>
			</Layer>
		</Layers>
		<Frames>
			<Button name="TRP2_ColisFrameObjet" inherits="TRP2_MainMenuOngletTemplate">
				<Anchors>
					<Anchor point="TOP" x="0" y="-20"/>
				</Anchors>
				<Scripts>
					<OnLeave>
						TRP2_ObjetTooltip:Hide()
					</OnLeave>
				</Scripts>
			</Button>
			<EditBox name="TRP2_ColisFrameNom" letters="30" numeric="false" inherits="TRP2_EditBoxExtensible" autofocus="false">
				<Size x="125" y="18"/>
				<Anchors>
					<Anchor point="TOP" x="0" y="-60"/>
				</Anchors>
			</EditBox>
			<EditBox name="TRP2_ColisFrameMessage" letters="100" numeric="false" inherits="TRP2_EditBoxExtensible" autofocus="false">
				<Size x="150" y="18"/>
				<Anchors>
					<Anchor point="TOP" x="0" y="-90"/>
				</Anchors>
			</EditBox>
			<Button name="TRP2_ColisFrameObjetConfirm" inherits="TRP2_UIPanelButtonTemplate" text="OK">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="-45" y="10"/>
				</Anchors>
			</Button>
			<Button name="TRP2_ColisFrameObjetConfirmCancel" inherits="TRP2_UIPanelButtonTemplate" text="CANCEL">
				<Size x="90" y="20"/>
				<Anchors>
					<Anchor point="BOTTOM" x="45" y="10"/>
				</Anchors>
				<Scripts>
					<OnClick>
						TRP2_ColisFrame:Hide();
					</OnClick>
				</Scripts>
			</Button>
		</Frames>
	</Frame>
	
</Ui>