Remove unnecessary listeners for the MiniMap

New class ToggleControl is used in place of the removed listeners.
Much cleaner code for the MiniMap chat rings.
Remove redundant debug setting: MiniMapChatRings.

-Thanks Liru for the advices.
This commit is contained in:
Salvatore La Bua
2013-09-30 22:21:11 +02:00
parent ddae988aa5
commit c0961e9760
4 changed files with 36 additions and 139 deletions

View File

@@ -21,32 +21,32 @@
</menu_item_check>
<menu_item_check bottom_delta="-18" enabled="true" height="18" label="Rotate Mini-Map"
left="0" mouse_opaque="true" name="Rotate Mini-Map" width="128">
<on_click function="MiniMap.Rotate" userdata="" />
<on_check function="MiniMap.CheckRotate" userdata="" />
<on_click function="MiniMap.ToggleControl" userdata="MiniMapRotate" />
<on_check control="MiniMapRotate" />
</menu_item_check>
<menu_item_check bottom_delta="-18" enabled="false" height="18" label="Show Objects"
left="0" mouse_opaque="true" name="Show Objects" width="128">
<on_click function="MiniMap.ShowObjects" userdata="" />
<on_check function="MiniMap.CheckShowObjects" userdata="" />
<on_click function="MiniMap.ToggleControl" userdata="ShowMiniMapObjects" />
<on_check control="ShowMiniMapObjects" />
</menu_item_check>
<menu bottom_delta="0" color="MenuDefaultBgColor" drop_shadow="true" height="175" left="0"
mouse_opaque="false" name="Chat Distance Rings" opaque="true" tear_off="false" width="125">
<menu_item_check label="Show All" name="Show All">
<on_check control="MiniMapChatRings" />
<on_check function="MiniMap.CheckChatRings" userdata="MiniMapChatRings" />
<on_click function="MiniMap.ChatRings" userdata="MiniMapChatRings" />
</menu_item_check>
<menu_item_separator />
<menu_item_check label="Show Whisper Ring" name="Show Whisper Ring">
<on_check control="MiniMapWhisperRing" />
<on_click function="MiniMap.WhisperRing" userdata="MiniMapWhisperRing" />
<on_click function="MiniMap.ToggleControl" userdata="MiniMapWhisperRing" />
</menu_item_check>
<menu_item_check label="Show Chat Ring" name="Show Chat Ring">
<on_check control="MiniMapChatRing" />
<on_click function="MiniMap.ChatRing" userdata="MiniMapChatRing" />
<on_click function="MiniMap.ToggleControl" userdata="MiniMapChatRing" />
</menu_item_check>
<menu_item_check label="Show Shout Ring" name="Show Shout Ring">
<on_check control="MiniMapShoutRing" />
<on_click function="MiniMap.ShoutRing" userdata="MiniMapShoutRing" />
<on_click function="MiniMap.ToggleControl" userdata="MiniMapShoutRing" />
</menu_item_check>
</menu>
<menu_item_separator />