LoTROInterface

LoTROInterface (https://www.lotrointerface.com/forums/index.php)
-   Lua Programming Help (L) (https://www.lotrointerface.com/forums/forumdisplay.php?f=50)
-   -   Need help fixing a plugin (https://www.lotrointerface.com/forums/showthread.php?t=1201)

The Old One 11-08-2010 05:18 PM

Need help fixing a plugin
 
1 Attachment(s)
I've been using FX bar to track buffs since the f2p beta.

It stopped saving it's position when moved some time ago and I don't know why but I was ok with that as I had already moved it where I wanted it and I could edit the save file to move it but would like it fixed and hopefully so it will work after the coming November patch.

I have tried to find the author but it was only ever posted on the F2P closed Beta forums witch have been purged and can't I find them anywhere using google. The only reference google gave me was an old post in one players blog and that player switch to using buff bars.

To say I'm not good with Lua would be to say King Kong is a big monkey (I just don't get it) so I can't fix it myself.

Can anyone help me fix this or more likely fix it for me?

D.H1cks 11-08-2010 08:17 PM

I took a look at it, and at first glance, everything seems correct. This is the section of code that should save after a move:

Code:

function FXWindow:MouseUp( arguments )
        if ( arguments.Button ~= Turbine.UI.MouseButton.Left ) then return; end
        if ( self.dragging ) then
                Settings.WindowPosition.Left = self:GetLeft();
                Settings.WindowPosition.Top = self:GetTop();
                Turbine.PluginData.Save( Turbine.DataScope.Character , "FXSettings" , Settings );
        end
        self.dragging = false;
end

Stick in a Turbine.Shell.WriteLine("I saved"); after the actual save line is a good spot to start checking. I will try myself in a while and see what is happening, but have other stuff to attend to.

The Old One 11-08-2010 08:48 PM

I feel stupid for not trying this before but I moved the setting file and tried having it create a new setup file and it saved but moved up the screen when I reloaded the game so it is saving but when it loads it does not load the same place as it was when it saved.

D.H1cks 11-08-2010 09:27 PM

Ya, for me it keeps moving it up a bit. I think it has to do with this section:

Code:

        -- adjust so the label stays fixed on the screen
        self:SetPosition( self:GetLeft() + oldIconPosition - newIconPosition ,
                          self:GetTop() + oldLabelPosition - newLabelPosition );



All times are GMT -5. The time now is 06:42 PM.

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