Quantcast

Added titles to the weights and config dialogs

Kevin Lyles [08-01-10 - 21:52]
Added titles to the weights and config dialogs
Filename
Locales/enUS/base.lua
config.xml
weights.xml
diff --git a/Locales/enUS/base.lua b/Locales/enUS/base.lua
index 92c0d16..c3d82c2 100644
--- a/Locales/enUS/base.lua
+++ b/Locales/enUS/base.lua
@@ -20,6 +20,7 @@ L["weights"] = "weights"
 L["DECIMAL_SEPARATOR"] = "."

 -- config.xml
+L["CONFIG_TITLE"] = "WeightsWatcher Configuration"
 L["CALC_OPTS"] = "Calculation Options"
 L["USE_UE_GEMS_TT"] = "Consider gems that are Unique-Equipped"
 L["USE_UE_GEMS"] = "Use Unique-Equipped Gems"
@@ -58,6 +59,7 @@ L["SHOW_DIFF"] = "Show differences to current gear"
 L["SHOW_DIFF_TT"] = "Shows the change in score compared to the currently equipped gear"

 -- weights.xml
+L["WEIGHTS_TITLE"] = "WeightsWatcher Weight Values"
 L["WATCH_TT"] = "Watch this weight?"
 L["Save"] = "Save"
 L["Copy"] = "Copy"
diff --git a/config.xml b/config.xml
index 2768b14..19b826f 100644
--- a/config.xml
+++ b/config.xml
@@ -124,6 +124,17 @@
 			<Anchor point="CENTER"/>
 		</Anchors>
 		<Layers>
+			<Layer level="OVERLAY">
+				<FontString name="$parentTitle" parentKey="title" inherits="GameFontNormalLarge" text="CONFIG_TITLE">
+					<Anchors>
+						<Anchor point="TOP">
+							<Offset>
+								<AbsDimension y="-5"/>
+							</Offset>
+						</Anchor>
+					</Anchors>
+				</FontString>
+			</Layer>
 			<Layer level="BACKGROUND">
 				<Texture setAllPoints="true">
 					<!--Plain black background with 80% alpha-->
@@ -685,6 +696,7 @@
 		</Frames>
 		<Scripts>
 			<OnLoad>
+				self.title:SetText(ww_localization[self.title:GetText()])
 				table.insert(UISpecialFrames, self:GetName());
 			</OnLoad>
 		</Scripts>
diff --git a/weights.xml b/weights.xml
index 3330834..a8ef837 100644
--- a/weights.xml
+++ b/weights.xml
@@ -488,6 +488,17 @@
 			<Anchor point="CENTER"/>
 		</Anchors>
 		<Layers>
+			<Layer level="OVERLAY">
+				<FontString name="$parentTitle" parentKey="title" inherits="GameFontNormalLarge" text="WEIGHTS_TITLE">
+					<Anchors>
+						<Anchor point="TOP">
+							<Offset>
+								<AbsDimension y="-5"/>
+							</Offset>
+						</Anchor>
+					</Anchors>
+				</FontString>
+			</Layer>
 			<Layer level="BACKGROUND">
 				<Texture setAllPoints="true">
 					<!--Plain black background with 50% alpha-->
@@ -745,6 +756,7 @@
 		</Frames>
 		<Scripts>
 			<OnLoad>
+				self.title:SetText(ww_localization[self.title:GetText()])
 				table.insert(UISpecialFrames, self:GetName());
 			</OnLoad>
 			<OnHide>