XP-Bar modifications with problems (newbie)
2 Attachment(s)
Hi,
I'm new to EQ2 and wanted to get deeper into the interface by changing and perhaps even a bit of understanding. I know, it will not be easy. So I parsed several XP-bar mods and tried to create my own. But I have still problems which I can't solve, because I don't understand some of the things behind. 1st: What is the precise difference between Packsize absolut and prop? 2nd: How does this thing with layers work? First declared is most top or the other way around? How does it work with Page within page-object? One of my current problems is, that the tooltip for the XP-bar doesn't work but for the AA and Tradeskill bars. 3rd: The values of objects like .Left and .Width seems not to correspond with the values needed on the screen. With wich values I can deal or do I have to usae special commands? The reason: I put a calculation in the OnShow and OnSize part of the XP-Bar. The Result was not what I expected. It was more or less the same like now without event-calculation. 4th: When does the OnShow event fire? Also after loading? Does a OnLoad event exist? The calc above worked only after resizing. So, that should be enough for the first posting. Wish you a good stumble into the NEW YEAR. |
In the uibuilder folder in your eq2 directory there is a file labeled EQ2_UI_Customization that will give you some explanation though it is a little outdated.
OR look at the different stickies here: http://www.eq2interface.com/forums/f...splay.php?f=22 Silat |
Instead of seeing myself if the old UI docs mention any of this stuff, I'll at least answer some things off the top of my head.
As I recall, the first XML node is the bottom-most. The last peer will be above its other peers. XML files should have only one root level node, which is usually a Page in UI mods. Each child uses their parent's bounds as their local coordinates. So if the first Page is at 10,10 on the screen and the first child is at 10,10 for its local coordinates, it will appear at 20,20 on the screen. The entire UI is comprised of a parent/child relationship. Not just your UI file. The experience window is a child of the main hud... as can be seen in the filename. To be honest, setting size and location programmatically isn't really what you should be doing to get resizing to work. The proper way is with the things in your first question. PackLocation and PackSize. You use these to describe to EQ2 how it should reposition or resize a child element when its parent resizes. For that you should really check the afore-mentioned manual as it has pictures and stuff. OnShow happens when the element is shown but only if it was not shown previously. This could be while your character is still loading or any time... it's not when you're given control of your character. Or it could be never because the game considers the element always visible. Setting an element from Visible=true to Visible=true will not trigger the OnShow event. Quote:
|
1 Attachment(s)
Happy New Year!
Many thanks to EQAditu. The few tips you gave me were very useful. Finally I produced a working XP-Bar. :nana::nana::nana: I did find easily the settings for width of the 3 XP-bars by calulation, but the values for location and packlocation in combination with the size-values of the parent page of the bar are still a secret for me. I solved with try, log in and adjust the values. A few words to TalTa: Your post was not helpful in any way. The English language is still a challenge. I am a German. The stickys were not helpful too for the problems I had to understand what I am doing. The word file presented is a good introduction, but not for learning XML or interface-code. I read both and so I was in the position to ask my question. And I did poke already in the code of other interface made by modder, but with not knowing what to do you will not recognize precisly what I changed or the effects there of. But to come to the end: Your work you are presenting is great and I raise my hat. |
Nevermind.
Silat |
Thanks for your (prior edited) words TalTal.
I didn't want to attack you, neither personally nor general. My problem is, most of time I think to much and I seek sometimes problems where no are. On the other hand answers produces questions. Also I really miss LUA and its advantages to refer to objects with scripting. I did read the documentation, espacially the chapter packsize and packlocation. So I have still questions. For example: packlocation="cfc,top To center the widget it should result to location="0,0". But it doesn't! :confused: My AA-bar were not centered at all. Why do I have to specify a location for that? The answer is most likely: because it is. Or: Is there a command to print some values ingame into the chat like /say object.Width and getting the value instead of the second command? So I try to learn modding with small but continuous steps. Some ideas flying in my head about things to change. Greetings |
This is my understanding:
cfc is center of object fixed to center of container. So if your container is 250 wide and your object is 120 wide and your location is 0,0 you are telling it that you want pixel 60 of your object to stay fixed in relation to the center of the container (container center is 125, Object center is 60, so fixed distance is 125-60, or 65). If you were to resize the container to 300 wide it would move your object from 0,0 to 25,0(container center is now 150, 150-65 = 85, half object size is 60 so to make its center be at 85 the object has to reposition to 25). To center the object via cfc You would want the object above to have a start location of 65,0. This would put the center of the object at the center of the container. When you resized it would still be at the center. The way I echo stuff in game is by including a button that updates text via onpress. Or through the interface that gm9 so kindly built into the profit controlcenter. Something like Onpress="Parent.Displaytext.Text=Parent.Object.Width" where Displaytext is a field I have somewhere set up for that purpose. Silat |
Quote:
Other question: Does the widget has to be always within the parent location/ sizes to be displayed or is it possible to show a widget outside of predefined dimensions (to show development datas without desturbing the layout of object in work)? Alderway |
All times are GMT -5. The time now is 02:01 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI