EQ2Interface

EQ2Interface (https://www.eq2interface.com/forums/index.php)
-   Pre-Beta (https://www.eq2interface.com/forums/forumdisplay.php?f=30)
-   -   Drop in startmenu mod (https://www.eq2interface.com/forums/showthread.php?t=10491)

pooka 03-02-2008 10:40 PM

Drop in startmenu mod
 
1 Attachment(s)
Well, based on a suggestion from the wish list post I made, I've been tinkering with a startmenu mod that would allow authors to include a menuitem_#.xml file with their mod to add an entry.

It uses a Composite so all the menuitems will slide up to the top. Up to 18 can be accommodated. I figure that will likely be more than anybody will ever need. (Otherwise, another column can be added for an additional 18 without too much effort).

Is this something that others would be interested in? Would you as an author want to include a file in your .zip that would add it to the startmenu? If so, any suggestions on the best way to package this? Mods will need to be given specific entry numbers just like the eq2map plugin system. How is that administered?

Thanks in advance for the suggestions, I've attached a picture of the progress.

A couple sample drop ins below. All that needs to be changed is the Name, the OnPress, and the Icon.

This would open the Spires popup mod:
Code:

<?xml version="1.0" encoding="utf-8"?>
    <Page Name="Spires" ScrollExtent="166,28" Size="166,28">
        <Button Location="28,0" Margin="10,0,0,0" Name="menuButton" OnPress="show_window Custom.Pooka_Spires ;togglestartmenu" PressSound=" " ScrollExtent="138,28" Size="138,28" Style="/ButtonStyles.start_menu">Spires</Button>
        <Page BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" Name="IconFrame" Opacity="0.500" RStyleDefault="/FrameStyles.single_pixel" ScrollExtent="28,28" Size="28,28" />
        <Image Name="icon" ScrollExtent="28,28" Size="28,28" SourceRect="209,84,250,126" SourceResource="images/icons/icon_ss21.dds" />
    </Page>

This would cast whatever call you have:
Code:

<?xml version="1.0" encoding="utf-8"?>
    <Page Name="CallHome" ScrollExtent="166,28" Size="166,28">
        <Button Location="28,0" Margin="10,0,0,0" Name="menuButton" OnPress="useability Call of the Overlord ; useability Call of Kelethin ;useability Call of Qeynos ;useability Call of Neriak ;useability Call of Gorowyn ;useability Call of Haven ;togglestartmenu" PressSound=" " ScrollExtent="138,28" Size="138,28" Style="/ButtonStyles.start_menu">Call Home</Button>
        <Page BackgroundColor="#FFFFFF" BackgroundOpacity="1.000" Name="IconFrame" Opacity="0.500" RStyleDefault="/FrameStyles.single_pixel" ScrollExtent="28,28" Size="28,28" />
        <Image Name="icon" ScrollExtent="28,28" Size="28,28" SourceRect="83,85,124,127" SourceResource="images/icons/icon_as11.dds" />
    </Page>


dragowulf 03-02-2008 11:11 PM

I for one think this is a very unique idea. I haven't looked at the code yet, but from what you've said it sounds like something I personally would use if I had custom windows like such.

I'll check it out and tell you what I think.

dragowulf 03-02-2008 11:24 PM

I like it. Very easy, anyone could use it.

I suggest looking at some of the EQ2Map plugin code to get more of a glimpse to see how some of it works.

gm9 03-03-2008 02:52 AM

Nice pooka, this is what I was suggesting. If it becomes necessary I think you could even add more than 18 includes for the same column and just assume that no user is really going to install more than 18 different start menu mods, which I think is a pretty safe assumption.

I will support this plugin format if I ever add a startmenu mod. Maybe call the plugin files eq2ui_custom_startmenu_plugin_#.xml?

Regarding administration, the eq2map plugins are self administered, ie mod authors checked which plugins are out there and used a free number. For the present system you could make a post attaching sample files and a section listing the plugin numbers and "registering" them to specific mods. I would not mind stickying that in UI Developer Discussion.

Drumstix42 03-03-2008 03:37 AM

Looks good. I'd suggest only formatting the text to not be so close to the icons (like default).

/perfectionist off

pooka 03-03-2008 07:09 AM

GM9: Great! I'll clean it up and submit it tonight. As far as more than 18 includes, that makes a lot of sense. I'll try it and see what happens if someone happens to run over.

Drumstix42: LOL I noticed that too. I have to thank Valdacil as his startmenu mod for infocenter is part of what got me thinking about this. I grabbed his code and there was a margin= line left out. It's fixed now.

Valdacil 03-03-2008 09:37 AM

I appreciate the shout out on the credit, however, I don't want to take credit where credit is due. "My" startmenu mod is really Milquetowst with a single word edited to make DrumsUI Infocenter come up instead of Milquetowst's. DBurgdorf is the original author of the code. ;)

pooka 03-03-2008 12:26 PM

I'll just have to thank everyone, at length. :D Think thanking Blackguard is going too far?

...

On another note, should the release package be just the modded eq2ui_startmenu.xml file and each menu item be a seperate downloadable addon? I can easily include 3 or 4 sample drop-ins. Should they be included in the zip? I'm trying to figure out what will be best in general.

The startmenu file itself is tiny, so long as its format isn't changed overly much, it could actually be included in any mod that wanted to use the functionality. Overwriting the previous version won't matter because the individual drop-ins are seperate. Would that be better than making users find and download a seperate mod to have the functionality available?

Suggestions please. :)

gm9 03-03-2008 12:50 PM

Hmm, what I wanted to sticky was the info for the plugin system we are trying to "standardize" here. It will not be necessary to use your modded startmenu.xml or specific plugins, eg. if I modded the start menu I would probably make my own startmenu, but provide the includes for additional plugins according to the standard.

I was thinking more of a post like the first post in this thread, only that you also explained the startmenu format (ie. that it has to have the <include> lines), possibly by just posting your mod as an example.

Anybody including you that wants to make plugins available should then upload them as normal downloads and either also put a compatible startmenu.xml in the package or maybe just link to yours (assuming you will upload yours as well).

So the sticky post remains for ui authors only, while functioning plugins remain in userspace with their separate support threads. Acceptable?

Drumstix42 03-03-2008 03:30 PM

We should request a property to be set in the top level page that would auto put a window in the start menu :rolleyes:

pooka 03-03-2008 04:17 PM

Hmm. I may need to rework this some with the goal in mind to make a standard, the formatting should come from the startmenu more than the menuitems. I may be able to trim it down so the menuitem files only need the name, icon, and effect text. This would allow wildly different layouts to accomodate the same menuitems.

Drumstix42: LOL That was how this whole thing got started. :)

Landiin 03-03-2008 04:20 PM

Good Idea but really it clutters up the start menu. What you need to do is, make it like program files menu for windows start button.

Make one button that shows up on the menu as "custom buttons" or what ever. When you hover over this it opens a window that is included in the eq2_custom.xml file that holds all the custom buttons.

Thats just my opinion if your going to go forward with this project.

gm9 03-03-2008 04:52 PM

Quote:

Originally Posted by pooka (Post 70165)
Hmm. I may need to rework this some with the goal in mind to make a standard, the formatting should come from the startmenu more than the menuitems. I may be able to trim it down so the menuitem files only need the name, icon, and effect text. This would allow wildly different layouts to accomodate the same menuitems.

Yes I had thought about that but I fear this would make it rather complex. If mod authors really want to change the layout they could always script that OnShow of their start menu.

Alternatively you can require mod authors to use scripting and strip the plugins down to the bare minimum, namely something like this:

<Data MenuText="gm9's plugin" MenuAction="camp desktop" IconSource="cool_image.dds" IconSourceRect="1,10,1,10"/>

Makes it more difficult than most people will care though I guess.

pooka 03-05-2008 07:51 PM

1 Attachment(s)
Some part of me likes the idea of the simpler style. I redid the mod to accommodate, and you're absolutely right, GM9. It is complicated, perhaps overly so. :o I'm attaching what I've got so far.

While it works, there are likely easier ways to do it. Some explanations:
1. The visible=false visible=true lines are my current best attempt to force the variables from the plugins to load. It's not necessary with the other drop in style.
2. The odd conditional is to hide missing menu entries.
3. It seems that semi-colon ";" breaks the variables so they're on different lines in the drop-ins.

Is it worth it to go with this method or better to revert to the other style?

I appreciate everybody's help and suggestions thus far. You're a great bunch. :nana:

Oh, and Landiin, it'll be possible to do exactly what you're suggesting.

dragowulf 03-05-2008 08:12 PM

Landiin's idea is good because he is right, we don't want an overly huge, and cluttered start menu.

Quote:

Originally Posted by pooka (Post 70402)
Some part of me likes the idea of the simpler style. I redid the mod to accommodate, and you're absolutely right, GM9. It is complicated, perhaps overly so. :o I'm attaching what I've got so far.

While it works, there are likely easier ways to do it. Some explanations:
1. The visible=false visible=true lines are my current best attempt to force the variables from the plugins to load. It's not necessary with the other drop in style.
2. The odd conditional is to hide missing menu entries.
3. It seems that semi-colon ";" breaks the variables so they're on different lines in the drop-ins.

Is it worth it to go with this method or better to revert to the other style?

I appreciate everybody's help and suggestions thus far. You're a great bunch. :nana:

Oh, and Landiin, it'll be possible to do exactly what you're suggesting.


pooka 03-05-2008 08:32 PM

I don't disagree with either of you. :)

Part of this process is to come up with a standard format for a startmenu entry drop in. Authors will be able to create their own versions of the startmenu that use those entries as well as create entries of their own.

The final look of the startmenu will be up to the individual mod author. I don't mind a double row startmenu myself, but once we've got the underlying code format down, I'll make sure to do a version that can be shown via an extra button in the startmenu.

gm9 03-06-2008 02:49 AM

After a very quick look at your code, the following comments:

- No reason to put the "togglestartmenu" into every plugin, just add that to the startmenu xml itself.
- Your visible=false/true code can be discarded if you control the visibility of the menuitems from the OnShow of the startmenu's root page

pooka 03-06-2008 07:20 AM

I think I need help with both these points. LOL Thank you for all your help with this.

To add togglestartmenu to each entry, I've tried variations of the following, but apparently not the right one. Everything I've tried breaks it in one way or another. Is there a way to escape a semi-colon?
Code:

menuButton.OnPress=('togglestartmenu')##(' ')##(MenuEntry.menuaction)
I'm not sure I understand the second part either (see what happens when you let a non-programmer near code?). I am using OnShow in startmenu's root page, to force all the menuitems to update their variables. Then I have a conditional in each one to actual show/hide them if there exists a plugin for their #'d slot. The conditional (and the variable substitution) won't fire without the first part.

Quote:

Originally Posted by gm9 (Post 70415)
- No reason to put the "togglestartmenu" into every plugin, just add that to the startmenu xml itself.
- Your visible=false/true code can be discarded if you control the visibility of the menuitems from the OnShow of the startmenu's root page


gm9 03-06-2008 07:48 AM

I'll have to admit my second point was rather unclear. I meant you should put the conditional code directly into the OnShow of the root.

There is no need to escape a semi-colon, I do not think it has any reserved meaning in a value (which also means you have no need to use it). I usually separate commands via line breaks. This should work:

menuButton.OnPress=(MenuEntry.menuaction) ## '&#xA;togglestartmenu'


All times are GMT -5. The time now is 12:15 AM.

vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI