02-13-13, 03:11 PM | #21 | |
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
|
||
02-13-13, 06:42 PM | #22 |
Zork your code is really cool but surely too much complex for a newbie programmer like me :-)
Slowly I have finished my alpha version of the addons, but I am plenty of questions. So I try to ask for finding more help. I upload a picture which represent a ganklist. I'd like to click on a name, this set the text in the text input and then I can press del to delete it from the list or add a new name to it. Now I'd like to ask. 1) in the frame I have created I have the button text that are "centered" ... I am trying to let them left justify but none of the methods I used till now seems to work. 2) Is possible to let the buttons to react to the OnClick event ? Something like: button:SetScript("OnClick", function() ... bla bla 3) Is possible to have the scrollframe "bordered" like the input box below ? 4) How can I make a orizontal bar for divide the zones of a frame ? The code is now: Lua Code:
Thanks again to all for your attention
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot. |
|
02-14-13, 05:41 PM | #23 | ||
Hi all,
continuing with experiment I have fixed some of the previous iussues.
Lua Code:
from the scrollframe definition.
3) and 4) are still under investigation :-) but now not are so important now :-) But now I have a different problem. The scrollframe seems to loose the first (or the last) position. I'll explain better with a picture. The same iussue happens for the last item. Is it intended that the slider works in this way (it seems to me inverse) ?? Thanks very much for attention to everyone. EDIT: I attach also a picture and the code of the (almost) finished addon.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot. |
|||
02-14-13, 09:50 PM | #24 | |
Code:
button:GetFontString():SetJustifyH("LEFT") Code:
local fontstring = button:GetFontString() fontstring:ClearAllPoints() fontstring:SetPoint("LEFT", button, 8, 0) fontstring:SetPoint("RIGHT", button, -8, 0) fontstring:SetJustifyH("LEFT")
__________________
Retired author of too many addons. Message me if you're interested in taking over one of my addons. Dont message me about addon bugs or programming questions. |
||
02-14-13, 10:08 PM | #25 |
Not if the fontstring has a width set, iirc.
|
|
02-15-13, 01:58 AM | #26 | |
Thanks Phanx and Seerah for answers.
I have checked the Phanx code and it works nicely (the 2nd bigger one) but I think I'll leave the button as they are now, because it doesn't work with all buttons templates or with no template at all. Btw finally I understood how it works. As usual it was a little bit more complicated then I thought :-) Ok. In the meantime I have solved also the question nr.3 I asked:
Now I am investigating why the scrollframe works nicely in the test addon I make following the Lombra suggestion/code posted at the beginning of this thread, while it have the problem I have pointed out with the picture when I build the scrollist array from my data. If I used something like: Lua Code:
It works as expected and I don't have the iussue shown in the picture. But I have a table in this way saved: Lua Code:
So to use a number reference to the records for the scrollframe I was not able to find a better solution of doing something like this: Lua Code:
And everything works but the slider have the problem I show. Someone have an idea on why it happens or if the problem is the dumping how to call this code : Lua Code:
without the need of dumping the first table RemGankDB (referenced by name) to RemGankLS (indexed by numbers) ? Thanks for patience and sorry again about all these questions.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot. Last edited by gmarco : 02-15-13 at 02:10 AM. |
||
02-15-13, 02:57 AM | #27 | |
Next to Slider, Button, ScrollFrame templates there are "Frame" template.
You are probably looking for sth like a DialogBoxTemplate. Check: http://www.wowinterface.com/forums/s...54&postcount=1 You will find a pretty deep list of Frame templates. Try them out. I would start with "UIPanelDialogTemplate". You can actually combine templates. Thus you can do this: Lua Code:
That works for all templates that do not counterfit each other. One template my do artwork, the other may do functional stuff etc.
__________________
| Simple is beautiful. | WoWI AddOns | GitHub | Zork (WoW)
|
||
03-02-13, 09:31 PM | #28 |
I'm having a similar issue where the first action after the scroll frame is shown isn't updating the offset correctly. I'll show the frame, scroll, the slider will move, but the offset will stay at zero. If I hide the frame and re-show it, the offset updates correctly.
Example: Offset at zero (slider is at the top) scroll down Offset at zero scroll down Offset at 15 scroll up Offset at 30 scroll up Offset at 15 (slider is at the top) scroll down Offset at zero In the middle of my list you can do this: scroll down Offset at 75 scroll up Offset at 90 scroll down Offset at 75 scroll up Offset at 90 I copied the code from another addon I wrote and it works correctly there, but in the new addon I'm getting this very very weird behavior. It appears the slider is following the mouse movement, but the offset is one cycle behind. Any ideas how this is happening? Last edited by Kharthus : 03-02-13 at 10:07 PM. Reason: updated |
|
03-03-13, 11:40 AM | #29 |
Well I found a solution, but I still don't understand why it's doing this. Ended up doubling up the function calls in the OnVerticalScroll handler.
Lua Code:
Lua Code:
|
|
03-03-13, 05:25 PM | #30 |
Thanks very much for you clues.
Lua Code:
It works and fixes the wrong offset problem. It is not a beautifull solution, but at least it is a working one :-) Thanks again.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot. |
|
03-04-13, 02:39 PM | #31 |
To FauxScrollFrame_OnVerticalScroll you should pass your update function, not its return value. (which is nil)
Code:
FauxScrollFrame_OnVerticalScroll(self, offset, BUTTON_HEIGHT, RemGank_ListFrame_Update(self)) Code:
FauxScrollFrame_OnVerticalScroll(self, offset, BUTTON_HEIGHT, RemGank_ListFrame_Update)
__________________
Grab your sword and fight the Horde! |
|
03-04-13, 08:37 PM | #32 |
In my case I was actually trying to pass a value to another function, but it looks like FauxScrollFrame doesn't like that. I changed the code to this and it's working correctly again.
Lua Code:
Lua Code:
|
|
03-05-13, 12:33 AM | #33 | |
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot. |
||
03-09-13, 03:50 AM | #34 | |
Tutorials & Other Helpful Info I hope you find it as useful as was intended Aanson
__________________
__________________ |
||
WoWInterface » Developer Discussions » Lua/XML Help » Help on ScrollFrame with LUA |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|