View Single Post
  #2  
Unread 05-31-2011, 04:31 PM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
Send a message via MSN to Digital_Utopia Send a message via Yahoo to Digital_Utopia
Quote:
Originally Posted by Emberleaf
Hello all,

I have a (relatively) small request for all you amazing plugin authors out there. If your plugin has a visible toggle button (or any other visible aspect, really) associated with it, could you please (if possible) make it so this disappears like the rest of the UI when F12 is pressed? It would sure make taking screenshots a lot easier. I realize that I could simply unload the plugins in question, but sometimes I'm trying to capture something in a split second and...well...you get the idea.

Thanks in advance, and please keep up the awesome work!
I think that's a fair request - and to help out, below is an example of how to do so:

Code:
self.KeyDown = function(sender,args)
     if (args.Action == 268435635)then
          if(self.myPlugin:IsVisible()==true)then
               self.myPlugin:SetVisible(false)
          else
               self.myPlugin:SetVisible(true)
          end
     end
end
In this example "myPlugin" would obviously be the main window that your plugin is displayed in, and the code would exist in whatever class you generated this window in.

Now, for both the OP and other authors, there is one caveat. The action alone only tells the author whether someone has pressed the key that shows/hides the UI, with no information pertaining to the actual state of the UI at the time. Now with this (unlike UI positioning) it isn't so bad, as it is unlikely that someone would be able to load a plugin with the UI hidden. Even still, the author should provide some option to assist the user in "syncing" the plugin with the game.
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros

Last edited by Digital_Utopia : 06-02-2011 at 11:47 AM. Reason: typos
Reply With Quote