Fixing POIFinder for the custom branch
I'd like to start using the eq2ui_custom.xml file as you did gm9. But unfortunately it does not seem to be a straightforward kind of deal. Unless I'm missing something obvious (quite possible).
I deleted my old eq2ui_mainhud.xml file that was in my ProfitUI dir per your red line instructions. So I tried to add the <include>eq2ui_mainhud_poifinder.xml</include> line to your copy of the custom.xml file instead. I put it after all your other <include> lines and before the </Page> tag. But on starting the game the POI Finder window could be opened and the links would work but the background would be solid black with no graphics. I also tried putting the line in your Namespace block next to _ProfitUI_Styles.xml but that didn't work any better. So next I went back to the old way by making a copy of eq2ui_mainhud.xml out of the Default dir and placing it in the ProfitUI one with the poifinder include line added in like it was before. Upon running the game everything looked good with both the links and the background being as they should. So it doesn't seem to be an issue with my XML. Just with the way I am trying to reference it in the custom.xml file. Is there anything I'd have to change in eq2ui_mainhud_poifinder.xml or any other XML file to successfully include it using the custom.xml file? |
I thought something like that might happen which is why I temporarily removed the <include>, but I had no time to test it or even look at your code. The include itself is not the issue, but I suspect that you somehow interact with the EQ2MAP window, which is now in a different tree. Depending on how you coded your window that may or may not make a difference. Unless you figure it out before I'll try to take a look tonight (my time) and shoot you a PM.
|
You're essentially moving the poi finder window from the MainHUD branch of the UI to the Custom branch of the UI. To do this you'll need to make sure to change every single reference of MainHUD.POIFinder to Custom.POIFinder. You'll need to do that in the plugin_7.xml file too.
You'll probably want to change the file name from eq2ui_mainhud_poifinder.xml to eq2ui_custom_poifinder or something just to avoid confusion. Also, unless gm9 adds the <include> to his eq2ui_custom.xml Profit users would have to disable auto-updating that file. |
Quote:
Quote:
|
That does help explain it Othesus. I could fairly easily replace all MainHUD references with Custom references using search/replace tools. And gm9 has included the poifinder line with the mainhud file in the past so I imagine he'd be happy to include it with the custom file now.
I use Profit Reborn as my UI so I'm comfortable with the idea of working to make my mod more compatible with it. My biggest concern is that with such an update I'd have to re-explain to everyone who uses my mod, Profit users and those who don't, that the install instructions have changed. That there are now old files they should delete if I change the file name and different files that might have to be hand-edited. And gm9 can probably attest to how often people ignore even the most obvious instructions and then ask repeated questions about it :p So is there really anything gained by moving to the custom file or would it just be simpler to keep telling people to modify their mainhud.xml files? That's what I'm trying to decide now. |
Ok, gm9 explained why the window even shows up at all. I would still change the branch from MainHUD to Custom to avoid confusion.
I think your background problem is in line 75 here: <Image Location="15,28" Name="ZoneMap" NormalLocation="1,2" NormalSize="436,506" PackSize="a,a" PackSizeProp="0045/0001,0045/0001" ScrollExtent="255,380" Size="255,380" Style="Map.MapStyles.z_blank"/> should be changed to <Image Location="15,28" Name="ZoneMap" NormalLocation="1,2" NormalSize="436,506" PackSize="a,a" PackSizeProp="0045/0001,0045/0001" ScrollExtent="255,380" Size="255,380" Style="MainHUD.Map.MapStyles.z_blank"/> Since you've moved out of the MainHUD branch to the Custom branch the Style property doesn't connect to the right image. |
Quote:
And I think the fix Othesus posted may work for both users having it included in MainHUD or in Custom. If not just copy the style over to your window. Then you won't have to bother too much about people reading instructions, since it will work both ways. |
No success yet
Well with the poifinder inlcude back in the eq2ui_custom.ml file I tried Othesus' idea of adding MainHUD. to that one line, but it didn't change anything. Again the black background. I also tried putting it in front of any line beginning with RStyle=" that pointed to a Map.WindowFrame.Something but that didn't help either.
Could it possibly be a problem with RStyleDefault="WindowElements.WindowFrame.data. on lines 73 and 74? Do I need to add a MainHUD prefix there as well? |
1 Attachment(s)
Ok, see attached, I've only included the changed files. It works with both an <include> in mainhud or custom, so your users will never know.
I had to do some fancy coding in the plugin for that because I discovered a bug with the custom branch. You can /show_window MainHUD.POIFinder even if you <include> it in custom, i.e. when it technically is not in MainHUD. However, something apparently goes wrong then, because it does not correctly read the styles in that case. On the other hand, you cannot /show_window Custom.POIFinder if you include in the mainhud branch. But that just as background information. PS: I did not understand why you renamed the close button in the poifinder.xml just to add a OnPress="hide_window ..." to it. Note that I renamed the button back to close and removed the OnPress. If there is a reason why you did as you did you will need to retrieve the correct window location from the variable I store in the plugin. |
Thanks gm9 for your help :) I'll give it a look and a try, and if all goes well I'll issue an update with your changes.
As for why I did certain things... well to be honest I didn't do most of them. I just took what Mother9987 did and auto-generated the repetitive parts of it. A guy named jnils also helped me revamp a lot of the XML back in version 1.10 so the Close Button bit might have gotten added then. But I'll be the first to admit that for a lot of what "My" mod does, I have no idea why it works the way it does :o |
Hmmmm
Good news: With your changes Window appears and closes as should and has the proper background instead of the Black one!
Bad news: All the POI link text is missing |
Oh really? Works for me. Are you sure you tested in a zone that has POI links (I suppose so)?
You could also try to force the links visible by amending the ShowFinder button in the plugin_7.xml as follows: Code:
<Button Name="ShowFinder" OnPress="COND=(Parent.Parent.Parent.Parent.Parent.MainHUD.POIFinder.Name==POIFinder) |
Please update this.
|
What do you think we are doing here?
|
Quick note. I installed the fix as well and I'm getting the same behavior. Window appears with correct background, but there is no text.
|
ok, can both of you let me know the following:
With that information I'll try to reproduce it then. |
Last night I just wanted to play Kunark so I went back to using the mainhud file temporarily which still works fine. And I was in the new Kunark zones with freshly downloaded POIs and generated POI Finder files so that isn't the issue. I'll experiment some more this afternoon if I can with the custom.xml method. But if I still can't get it to work I'll just post an update using the old method until I can get the new way working.
|
I'm at work, but I added the include to the custom file.
The mainhud one is removed in profit isn't it? (Or can I put it back temporarily?) |
yes and yes (although not the old ProfitUI one, take the one from \Default) ;)
|
Ok guys, I tried my best to reproduce this. On a clean installation of ProfitUI from the updater plus a clean installation of EQ2MAP + the latest POIfinder download + the files I attached above, and having added the necessary <include> to eq2ui_custom.xml, I walked through Qeynos and had no issues getting the links to show. If it's no installation mistake on your part I simply don't know what's wrong, sorry.
|
Sorry to make you sweat for nothing there :o I tried renaming the old Profit directory and then reinstalling Profit, EQ2Map, and my POI files. Then added in your 2 changed files gm9 and edditng the custom.xml file. POI Finder now works as it should and my InfoCenter has info in it again too :) Both probably just needed the fresh Profit install.
I'll try to have a new POI Finder release up in the next hour or so. I won't bundle the custom file. I'll just explain how it should be edited in my Install instructions. I assume gm9 will change the Profit files to include the extra line shortly thereafter anyway. |
Thank you both so much for your work!!
|
Quote:
EDIT: Of course the above would only have applied if you had not renamed the file... :rolleyes: Since people will now have to edit their files anyway better take out that coding again, it's just wasted clock cycles now. |
Quote:
|
1 Attachment(s)
Since I was playing with EQ2MAP anyway, attached is a version of POIFinder with the extra code removed, placement and graphic of the icon changed, and where the links update after zoning once you mouse your mouse over the window.
Oh and for a scripting tutorial, _ProfitUI_CuresCode.xml will probably teach you most things you will ever want to know but should be easy enough to understand after a moment. |
All times are GMT -5. The time now is 03:46 AM. |
vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI