added key bind for toggling frame.

Pawkette [03-13-14 - 08:28]
added key bind for toggling frame.
Filename
Bindings.xml
_framerate.lua
_framerate.txt
diff --git a/Bindings.xml b/Bindings.xml
new file mode 100644
index 0000000..ab8f03e
--- /dev/null
+++ b/Bindings.xml
@@ -0,0 +1,9 @@
+<Bindings>
+  <Layer name="General">
+    <Category name="User Interface">
+      <Action name="TOGGLE_FPS">
+        <Down>ToggleFramerate()</Down>
+      </Action>
+    </Category>
+  </Layer>
+</Bindings>
diff --git a/_framerate.lua b/_framerate.lua
index db916a2..4079bb4 100644
--- a/_framerate.lua
+++ b/_framerate.lua
@@ -78,4 +78,13 @@ end

 function Initialized( self )
     _FRAMERATE = _framerate:New( self )
+
+    ZO_CreateStringId("SI_BINDING_NAME_TOGGLE_FPS", "Toggle _framerate")
+end
+
+function ToggleFramerate()
+    if ( _FRAMERATE ) then
+        local visible = _FRAMERATE.control:IsHidden()
+        _FRAMERATE.control:SetHidden( not visible )
+    end
 end
\ No newline at end of file
diff --git a/_framerate.txt b/_framerate.txt
index a6626aa..33a35b9 100644
--- a/_framerate.txt
+++ b/_framerate.txt
@@ -2,4 +2,5 @@
 ## APIVersion: 100000

 _framerate.lua
-_framerate.xml
\ No newline at end of file
+_framerate.xml
+Bindings.xml
\ No newline at end of file