Quantcast

Changed a dropdown to use the same xml/lua split as the rest

Kevin Lyles [06-27-10 - 01:03]
Changed a dropdown to use the same xml/lua split as the rest
Filename
weights.lua
weights.xml
diff --git a/weights.lua b/weights.lua
index 7a674f4..a7ceb1d 100644
--- a/weights.lua
+++ b/weights.lua
@@ -598,11 +598,6 @@ function ClassDropDownInitialize(dropdown)
 	end
 end

-function ClassDropDownOnShow(dropdown)
-	UIDropDownMenu_Initialize(dropdown, ClassDropDownInitialize);
-	UIDropDownMenu_SetSelectedValue(dropdown, WeightsWatcher.playerClass)
-end
-
 function DropDownOnClick(choice, dropdown)
 	UIDropDownMenu_SetSelectedValue(dropdown, choice.value, false)
 end
diff --git a/weights.xml b/weights.xml
index 8bd7f33..b14c545 100644
--- a/weights.xml
+++ b/weights.xml
@@ -744,7 +744,8 @@
 				</Anchors>
 				<Scripts>
 					<OnShow>
-						ClassDropDownOnShow(self);
+						UIDropDownMenu_Initialize(self, ww_ClassDropDownInitialize);
+						UIDropDownMenu_SetSelectedValue(self, WeightsWatcher.playerClass)
 					</OnShow>
 				</Scripts>
 			</Button>