![]() |
Wow I just re-read all my post.. I wanted to say.. I'm still going through all this in my head (and in code).. That's probably why my post(thoughts) are all over the place..
Sorry if I try to over explain some things or don't explain other things.. The things I explain are probably on my mind at the time and it helps me think.. Everything I ask for is just asking.. So if something cannont change I understand that :) -------------------------------------------------------------------------- Goal: I'm trying to make the plugin system as modular as possible.. So that plugin system itself is seperate from the mainhud_map as much as possible.. But allows plugins to be very robust & flexible.. (Add buttons, pages, onshow options, etc) Goal: I want to make it so no plugin makers cut functionality out of the default coding (or a skins coding).. However, they will be able to add to the end of them, because, the callback events.. Goal: There should be a callback system for OnTitlebar, OnFrame, OnHide, OnShow, OnMinimize, OnRestore.. Goal: I want to get the changes in the map system down to 2 includes and a handful of lines of script in the mainhud_map.. -------------------------------------------------------------------------- Right now the way it's set up I can make plugins.xml a blank page and the plugin system is basically removed.. I want it so the whole system can be unplugged. If you change something in the mainhud_map it sits in it shouldn't break the plugin system.. Unless you remove the includes and the script support.. There are 2 reasons for me wanting to change your buttons like that. 1. I want the minimize feature to be a standard feature of eq2map.. 2. I DON'T want a modder to write there own (No reason to repeat a function) they should be able write a button that calls your fuction and add to it with the "callback event" that is called.. You would have to use on activate for all buttons you want to call in script If I recall correctly. But not 100% positive.. I came up with that Idea, tested and started using OnActivate in most of my buttons for a while.. I believe: The OnPress event is only called when the user presses the button in game.. And, not when I activate it through a script call.. OnActivate is also called when the user presses the button in game.. It's pretty much the same technique as hide/show but you can also activate with mouse.. You don't have to change The MapBorder at all.. Just give me the map underlay and it can be a blank page and hidden in the default setup.. I can't add this through a plugin because the plugins should sit on top of everything else, a tan backdrop over the map and poi's is useless.. I don't think it should be named Window_MapUnderlay then.. It should be TM_Plugins_MapUnderlay or something.. I will think of a way to change it.. I want atleast the plugins.xml to use the includes in this way.. Doing it that way makes it very robust/flexible.. Doing the minimap that way demonstrates how robust/flexible it is (I can add a whole bunch of pages right to the main map page if needed).. I can probably contain the whole minimap in one window but It actually makes the script longer in my opinion (more typing anyway).. I don't think it's any less efficient just more flexible.. If I put all the plugin# pages inside the plugins page then I add the pages I need for the minimap and the dock button to a plugin# page.. to access the MapPage from the minimap window for example I would have to type in script.. Parent.Parent.Parent.MapPage.Visible=true The way it is now I can just do: Parent.MapPage.Visible=true Deathbane: Did I offend you or something in my last reply to you? If I did I'm sorry.. I did not mean too.. I was trying to reinforce your statement not trying to be a Smarta$$, which it kinda came off as.. Haven't heard from ya since then on this subject.. Any thoughts on the subject? Edit: I'll work on it some more a little later tonight. |
Alright, I'll script the Close and Minimize buttons using OnActivate; please suggest some code for the default Minimize button(well, buttons since it's 2). I have a good idea of what I'd do with it, but want your feedback.
Why do you need an underlay? Couldn't your script just use the stuff inside of MapBorder to make an underlay (by moving/resizing it)? Quote:
Quote:
The reason I say it's inefficient, is you're calling an include which will just call 5 more includes. That's ~16% less efficient than just directly calling the 5 includes. Likewise, calling one parent plugin object that'll call all the plugins themselves (to distribute the OnEvent calls) adds a layer of calls that just doesn't need to be there. I don't mind bulking up the main page objects OnEvents with calls directly to the plugins; the main page's calls are already massive. Quib |
1 Attachment(s)
Quote:
The changes to the EQ2Map are minimal: mainhud_map: Added 3 lines of code.. You can find them by searching for TM_ .. The code is support for the callback system and the showing of the plugins page.. and the include for plugins.xml... window_titlebar.xml changes: All buttons in titlebar: (To make them pressable through script) Changed OnPress to OnActivate and added the line Activated=false as the last call in the scripts.. RestoreButton: (To support the Plugins OnEvent Callbacks) Added Parent.Parent.TM_Plugins.OnRestoreWindow.Activated=true to the second to last call in the OnActivate Script.. MinimizeButton: (To support the Plugins OnEvent Callbacks) Added Parent.Parent.TM_Plugins.OnMinimizeWindow.Activated=true to the second to last call in the OnActivate Script.. CloseButton: (To make it always close the window no matter what plugin is installed) The script looks like this now: OnActivate="Activated=false Parent.Parent.OnHide=TM_OnHideBackup Parent.Parent.Visible=false Parent.Parent.OnHide=' ' TM_OnHideBackup=Parent.Parent.OnHide" Quote:
Quote:
Quote:
Quote:
It's up to you if you want to bulk up the OnEvents code.. I perfer seperating it the way I have it now though.. I included the minimap and 3 other plugins in the zip as examples.. The minimap is now contained in one page.. But, I still have it seperated into 3 files.. The minimap plugin uses the OnRestoreWindow and OnMinimizeWindow events.. the Minimize/Restore with keyboard plugin uses the OnHideWindow callback event.. The other two use the OnShow event to make a change to the map (like the current plugin system) Edit: Updated Attachment.. made a quick change: Note: This should be installed over the same eq2map version I've been using for all attachments thus far. Edit: Updated Attachment again the min/restore with keyboard plugin wasn't working right.. |
1 Attachment(s)
Quote:
So I added both just in case.. Changes to mainhud_map: I removed the WC_Frame.OnHide=' ' that was in the onshow2 script.. Changes to window_titlebar: OnHide="Parent.TM_Plugins.OnHideTitlebar.Activated=true Parent.Size=484,597" (Read edit at bottom) OnShow="Parent.TM_Plugins.OnShowTitlebar.Activated=true"> Changes to window_frame: OnHide="Parent.TM_Plugins.OnHideFrame.Activated=true" OnShow="Parent.TM_Plugins.OnShowFrame.Activated=true" Plus the changes from previous post Edit: there was a bug with the titlebar OnHide script.. When the title bar was hidden the window was restored by resizing back to fullsize.. It didn't notify the plugin system.. I changed it so it activates the restore button instead.. So the titlebar on hide should be: OnHide="Parent.TM_Plugins.OnHideTitlebar.Activated=true QM_RestoreButton.Activated=true" ( I updated the attachment to reflect changes ) |
Our mods so cool that theres a plugin system....wow...
|
1 Attachment(s)
Ok one last version..
I polished up the minimap.. I made 1 plugin that handles, I think, all the "window options" thus far.. Except the remove fog thingie.. and it adds a few.. Allows you to change upto 4 of the default eq2map behaviours by copying files.. Full-list: (Besides default options and plugins from the old sytem) CloseOptions: Min/Restore with keyboard 'M key' Esc disabled IconOptions: Alway 50% transparent 33% transparent till mouseover ConnectionsOptions: Both Off on login City Off on login And my darkness filter: Maps 15% Darker than default (this is the one I will be using) Maps 30% Darker than default The only change to eq2ui_mainhud_map.xml this time was: I added a page above the WorldMap Image definition.. <Page AbsorbsInput="false" BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" BackgroundTint="#000000" Location="1,2" Name="TM_DarknessOverlay" Opacity="0.000" ScrollExtent="436,506" Size="436,506"/> Required for my darkness option :D I also changed the plugins.xml so that all the event buttons are not visible.. Things we will have to note to window skinners if this system is used: (I'm sure you know) The OnHide and OnShow event for the window frame and title bar have to call the plugin handlers that are present there in the default skin at the end of the event.. The Restore and Minimize OnActivate script must end with the plugin handler followed by Activated=false The CloseButton OnActivate must end with Ativated=false Edit: I reversed the order in which the callbacks in plugins.xml get called instead of 1 to 5 the now trigger backwards.. So that plugin 1 has priority over 5.. System now has priorty like the z order of the plugin windows.. This is something to tell to plugin authors I think that's it from me.. I'm out of ideas for improvements to it.. |
I was submitting a bug report last night (heh..) when it hit me.. POI!
When the bug report window is up, and your entering your message, you cannot press TAB to go from field to field. It just changes your target which is reflected on the bug report. That is when the idea hit me... Why not have a pop-out pane in EQ2Map that the user can stand in a spot, target a critter, enter a blurb, click a button and have it send it to our website for POI insertion? What do ya think? |
i will look into making a page that works with the html viewer in game where people can submit new poi's no promises though, because i remember someone said that the thing sucks pretty bad as far as displaying stuff.
|
Quote:
Quib |
Sorry, I got tied up this weekend. Just logged in for my final test of EQ2MAP with your plugin code added. You'll want to get the auto-updater Talyns, and put it in an empty folder and run it to make sure you get all of the newest files. Check eq2ui_mainhud_map.xml, window_plugins.xml (this was the only filename I changed) and everything to make sure what I've done with your work is acceptable. Very little should be different; however I added it to my newest version by hand so you might wanna make sure I didn't miss anything.
Also, I figured out the difference between OnActivate and OnPress (if you already knew this, oh well): OnActivate occurs on mousedown, OnPress occurs on mouseup; basically, I can click and hold on a button, but OnPress won't occur unless my mouse is still over the button when I let go of the mouse button. OnActivate occurs the instant you click on a button. If you used both OnActivate and OnPress on the same button, there's no guarantee OnPress would get called; the user could move the mouse off of the button before releasing. Quib |
Quote:
Looks and works right =) I found a couple minor things I need to tweak on the Minimap Plugin then I will upload both as add-ons.. Where should I upload them to when I'm done? The map AutoUpdater download? Never mind I reread two post up ;) Quote:
OnDeactivate.. I think is called when the image is changed back to normal.. It's good to know that OnPress has a "user failsafe" to it.. I wonder what's called first OnDeactivate or OnPress.. Good to know how this stuffs works in general.. Hmm... Is it bad that we're going around it? I don't think so.. They're just basic switches.. Probably not a good Idea to put script in OnActivate that could create a bad out come.. Like an autoattack button.. Don't want to accidently attack a sentry or something.. Anyhow, Thanks for adding this feature! So, When you gonna make that map selector tab plugin? :D |
| All times are GMT -5. The time now is 04:48 PM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI