Quantcast LoTROInterface - View Single Post - Lua Beginner has some questions
View Single Post
Unread 06-13-2016, 07:22 PM
Hamkaas Hamkaas is offline
The Wary
Join Date: Jun 2016
Posts: 3
Question Lua Beginner has some questions

I just started messing around with creating lua lotro plugins and i have quite a lot of questions. Please feel free to answer just a couple instead of all if you don't know all answers or you don't feel like it.

I've just started and i don't have a lot of experience with programming and have a lot of questions. I'll start with the questions most important to me.

1. Is there a way to disable the tooltip that pops up when you hover over a alias shortcut. the "alias: bla bla bla" popup?

2. When i make a quickslot and bind an alias shortcut to it, can i somehow make it do something extra when you click it? like do the alias shortcut and perform commands. If i try to catch the mouseclick event it does not seem to be willing to do both. At the moment i'm using a workaround by catching the message it sends in the chat and then run the commands from that but it is too slow for what i want to use it for and also not very elegant.

3. When i create a quickslot and drag an item to it ingame and then try to unload the plugin my client crashes 100% of the time. Is this because i do not handle the unloading properly? i've read the "writing plugins for noobs" post from garan on lotro forums (https://www.lotro.com/forums/showthr...gins-for-Noobs) but i didn't really understand the part about unloading right. How should i write the unload section for my plugin?

4. What is the max size image i can load? I was trying to make an animation by making 2 Turbine.UI.Control() things, then making control 1 parent of control 2 and setting a size for control 1 and then setting a image with the whole animation (like 10 frames) as background for control 2 and then moving control 2's relative position to control 1 so it gets cropped.
When trying this it worked for really small images but it didn't when my images were larger then around 50x50 pixels. Would you advice me to not use animations or load 10 different pictures?

5. Then finally i have a couple of questions about what i saw in this thread:
Here in the 2nd post Garan gives tips on hiding quickslots.

Garan says you should make your quickslot 34 pixels higher and wider and then crop it by making another control with a smaller size the parent to hide the alias text. But in the example code Garan also makes a black window in front of the quickslot to hide the icon boundry when you hover.
But why make the extra control and crop the quickslot? the black window hides the text as well right?
Or let me ask it like this: What extra functionality do you get making your quickslot part of a different control like this?

Also Garan says you should write code to prevent people from dragging your shortcut out of the quickslot, but somehow for me this behavior is default? i cannot drag the shortcut out of there even if i wanted to.

Did an update change these things or do i miss the point of these things altogether?

Thanks in advance.
Reply With Quote