LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Interface Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=3)
-   -   Having plugin addons less in the way... (https://www.lotrointerface.com/forums/showthread.php?t=1738)

Wazer95 01-23-2012 08:02 AM

Having plugin addons less in the way...
 
Often when I come upon an amazing sight in Middle Earth I stop and take a picture, but its dificult to capture the right moment when I have to go in and unload all my plugins because many of their icons dont disapear when the UI is disabled (f12). Also, plugins like LotRO Compendium, MoorMap, Songbook, and LotROPad dont go under a window when it is placed above its icons, is there a way to fix that?

Garan 01-23-2012 08:40 AM

Having Icons disappear under other windows just leads to complaints about how they can't be found. Plugins like MoorMap have an option to use chat commands (which can be bound to quickslots if desired) to control the plugin visibility and hide the icon completely. In the case of MoorMap, the chat commands are listed in the plugin description and the option to hide the minimized icon is in the Options panel.

lunarwtr 01-23-2012 08:51 AM

LoTRO Compendium as of 2 releases ago should also have a way to hide its icon in the configuration tab. It also listens for F12.

D.H1cks 01-23-2012 12:04 PM

Make sure to send your comments directly to the author of any plugins that don't behave the way you wish. They might just add the feature you want.

Wazer95 01-23-2012 03:50 PM

Thanks for the responses, and I commented on a few of them. The main question/hope of the thread was to see if there was a "universally working" line of code I could add to one of the files. Its a strech, but worth asking lol

D.H1cks 01-23-2012 06:31 PM

Quote:

Originally Posted by Wazer95 (Post 7610)
Thanks for the responses, and I commented on a few of them. The main question/hope of the thread was to see if there was a "universally working" line of code I could add to one of the files. Its a strech, but worth asking lol

Its fairly easy to implement (hiding when pressing F12), but not quite that easy. :)

Digital_Utopia 01-24-2012 07:41 AM

Code:

self.KeyDown = function(sender,args)
                if (args.Action == 268435579)then
                        if(self.doLayout==true)then
                                self.doLayout=false;
                                self.positionMode();
                                self.posWindow:SetVisible(false);
                        else
                                self.doLayout=true;
                                if(self.hideUI==false)then
                                self.positionMode();
                                self.posWindow:SetVisible(true);
                                end
                        end
                end
                if (args.Action == 268435635)then
                       
                        if(self.hideUI==true)then
                                self.hideUI=false;
                                self.hidingUI();
                                if(self.onlyInCombat==false)then
                                        self:SetVisibility("visible");
                                elseif(self.onlyInCombat==true and self.inCombat==true)then
                                        self:SetVisibility("visible");
                                end
                                if(self.doLayout==true)then
                                        self.positionMode();
                                        self.posWindow:SetVisible(true);
                                end
                                if(self.showDebuffBar==true)then
                                self.dbb:SetVisible(true);
                                end
                        else
                                self.hideUI=true;
                                self.hidingUI();
                                self:SetVisibility("hidden");
                                self.posWindow:SetVisible(false);
                                self.dbb:SetVisible(false);
                               
                        end
                end
        end

This is the chunk of code that Palantir uses to respond to layout mode (ctrl+\) and respond to hiding the UI (F12). Some of it is pretty ugly admittedly, but in essence, action 268435579 is the "action" for entering/exiting layout mode, and action 268435635 is the action for hiding/showing the UI. The general idea here was for Palantir to act as closely as possible to real UI elements, but there was some added complexity due to the ability to show/hide Palantir based on combat criteria.

There is one, potentially huge, caveat. In Lua we lack the ability to determine whether or not the player is actually in UI positioning mode, or actually has the UI hidden or not. All we can do is react to the action. While it's very unlikely, if not impossible for someone to load a plugin while their UI is hidden, the same can't be said for positioning mode. In that case, you'd end up with the annoying situation where the plugin's positioning mode would be opposite of the rest of the UI elements, so some care is required by the player.


All times are GMT -5. The time now is 06:41 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI