![](//www.lotrointerface.com/images/style_mmoi_lotroi/layout/clear.gif) |
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
05-31-2011, 02:38 PM
|
![Emberleaf's Avatar](images/avatars/FieryNazgul.jpg) |
The Unscathed
|
|
Join Date: Sep 2010
Posts: 17
|
|
A request for all plugin authors
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!
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
05-31-2011, 04:31 PM
|
![Digital_Utopia's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=2894&dateline=1283771272) |
The Undying
|
|
Join Date: Sep 2010
Posts: 207
|
|
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.
Last edited by Digital_Utopia : 06-02-2011 at 11:47 AM.
Reason: typos
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
05-31-2011, 04:35 PM
|
![MrJackdaw's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=1942&dateline=1286139095) |
The Undying
|
|
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
|
|
Or, if you use the Dragbar class - this seems to be automatic!
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
05-31-2011, 06:06 PM
|
![D.H1cks's Avatar](images/avatars/Fighter.jpg) |
The Undying
|
|
Join Date: Apr 2007
Posts: 162
|
|
Yup, I did this for the travel window's toggle button. It is a fair request.
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
05-31-2011, 07:09 PM
|
![Emberleaf's Avatar](images/avatars/FieryNazgul.jpg) |
The Unscathed
|
|
Join Date: Sep 2010
Posts: 17
|
|
Quote:
Originally Posted by D.H1cks
Yup, I did this for the travel window's toggle button. It is a fair request.
|
And I, for one, greatly appreciate it! Now, if we can get the MoorMap and Lotro Compendium plugins to follow suit, I will be one very happy little hobbit. =P
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
06-02-2011, 08:25 AM
|
![Fortunis's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=4087&dateline=1307181901) |
The Undying
|
|
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
|
|
Is this number/amount the same for all nationality of keyboard.
(args.Action == 268435635)
because i cant get it to acknowledge that the f12 key has been pressed.
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
06-02-2011, 10:09 AM
|
![Garan's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=3216&dateline=1315086452) |
The Undying
|
|
Join Date: Oct 2010
Posts: 341
|
|
Quote:
Originally Posted by Emberleaf
And I, for one, greatly appreciate it! Now, if we can get the MoorMap and Lotro Compendium plugins to follow suit, I will be one very happy little hobbit. =P
|
MoorMap has had this functionality for many months, as has AltInventory. Due to the fact that there is no way to detect the UI state, I've chosen not to hide the minimized button when the HUD is clear as that would innevitably lead to someone getting confused when they load their plugins with the UI already hidden (such as by binding PluginManager to a quickslot). Instead I provided the option of eliminating the minimized button and using a chat command which can be bound to a quickslot. If you go to the options and uncheck the "Show Icon When Minimized" option you can then bind the toggle command ("/moormap toggle") to a quickslot and the icon will no longer show when you use the Escape action (typically bound to Esc) or toggle the HUD (typically bound to F12). This eliminates any inconsistent behavior from the Plugin due to the fact that Turbine does not expose the state of the UI (which I really hope Turbine changes but there's MANY more important things for them to fix first).
Last edited by Garan : 06-02-2011 at 02:27 PM.
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
06-02-2011, 10:13 AM
|
![Garan's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=3216&dateline=1315086452) |
The Undying
|
|
Join Date: Oct 2010
Posts: 341
|
|
Quote:
Originally Posted by Fortunis
Is this number/amount the same for all nationality of keyboard.
(args.Action == 268435635)
because i cant get it to acknowledge that the f12 key has been pressed.
|
It's not bound to a key so keyboard and nationality are irrelevant. 268435635 is the code bound to the "toggle HUD" action which in turn is bound to a distinct keystroke in the keybindings. Go to your Options dialog (typically Ctrl+O), select "Key Mapping" on the right side, then scroll down until you see the "Toggle HUD On/Off" action entry. Whatever key is mapped to that action is what will clear your HUD and fire the KeyDown event with args.Action=268435635
Last edited by Garan : 06-02-2011 at 02:27 PM.
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
06-02-2011, 10:19 AM
|
![Fortunis's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=4087&dateline=1307181901) |
The Undying
|
|
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
|
|
Ty for your replies. I noticed the typo and tried SetVisible and IsVisible. Also im aware of the keybind and it is F12 for me, so thats not the issue, and as youve pointed out to me that its nothing to do with a keypress signature, rather the lotro code. It leaves me wondering why it aint working for me :s
I placed a Turbine.Shell.WriteLine command in its structure but got nothing.
|
![Unread](//www.lotrointerface.com/images/style_mmoi_lotroi/statusicon/post_new.gif)
06-02-2011, 10:30 AM
|
![Garan's Avatar](image.php?s=c70cd0760e119996ee15e96defd75201&u=3216&dateline=1315086452) |
The Undying
|
|
Join Date: Oct 2010
Posts: 341
|
|
Quote:
Originally Posted by Fortunis
Ty for your replies. I noticed the typo and tried SetVisible and IsVisible. Also im aware of the keybind and it is F12 for me, so thats not the issue, and as youve pointed out to me that its nothing to do with a keypress signature, rather the lotro code. It leaves me wondering why it aint working for me :s
I placed a Turbine.Shell.WriteLine command in its structure but got nothing.
|
And I gather you didn't take the "self.myPlugin" literally. That needs to be replaced by a reference to the actual window being affected.
Did you put the WriteLine inside the If statement or just inside the start of the function definition - if it's just inside the function, you should get responses from any action event, such as showing bags, hitting escape, etc. If you aren't getting that, then you need to check where you are defining the function and be sure you don't already have another .KeyDown function defined elsewhere for that control. Oh and be sure you didn't SetWantsKeyEvents(false) for that control.
Last edited by Garan : 06-02-2011 at 10:32 AM.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:43 AM.
|
![](//www.lotrointerface.com/images/style_mmoi_lotroi/layout/clear.gif) |