New Content - Implemented Top Menu changes

Veracity

Developer
Staff member
KoL has had links/dropdowns/icons as a choice for a while now, but they just whacked the icon menu.

The main frame still requests "topmenu.php", but what you get varies depending on the top menus style.

Icons (value=fancy)

Requesting: http://www.kingdomofloathing.com/topmenu.php
-> redirect = Field: location = [awesomemenu.php]
Requesting: http://www.kingdomofloathing.com/awesomemenu.php
<img src="http://images.kingdomofloathing.com/itemimages/smoon1.gif" alt="Ronald, New" >
<img src="http://images.kingdomofloathing.com/itemimages/smoon5.gif" alt="Grimace, Full" >
<img src="http://images.kingdomofloathing.com/itemimages/sminimoon.gif" alt="a small bright moon" >

Dropdowns (value=compact):

Requesting: http://www.kingdomofloathing.com/topmenu.php
-> (no redirect)
<img src="http://images.kingdomofloathing.com/itemimages/smoon1.gif">
<img src="http://images.kingdomofloathing.com/itemimages/smoon5.gif">
<img src="http://images.kingdomofloathing.com/itemimages/sminimoon.gif">

Links (value=normal):

Requesting: http://www.kingdomofloathing.com/topmenu.php
-> (no redirect)
<img src="http://images.kingdomofloathing.com/itemimages/moon1.gif" alt="Ronald, New" title="Ronald, New" >
<img src="http://images.kingdomofloathing.com/itemimages/moon5.gif" alt="Grimace, Full" title="Grimace, Full" >
<img src="http://images.kingdomofloathing.com/itemimages/minimoon.gif" alt="a small bright moon" title="a small bright moon">

As noted in another bug report, we decide that you are in a clan if there is a link to clan_hall.php in the topmenu. I'm currently in a clan, and I see that link in the normal and compact styles - and also in "awsomemenu.php", where it appears to be in the big list of preconfigured buttons you can select from. As it happens, we do not currently follow the redirect to awesomemenu.php, so we don't see that, anyway, but that check will no longer work, if you have icons in the top menu.
 

lostcalpolydude

Developer
Staff member
Mafia does know the moon phases even with Icons. I don't understand how that happens if mafia doesn't also think that you are in a clan.
 

Veracity

Developer
Staff member
I don't understand that either.

I just added a shouldFollowRedirect override to MoonPhaseRequest and it now follows the redirect from topmenu.php to awesomemenu.php.

When I look at api.php?what=status, I see "topmenu":0 no matter which style is selected in the options, though. Apparently the new topmenu release busted that.
 

Veracity

Developer
Staff member
Revision 14308 does some of this. It follows the redirect to awesomemenu.php. It no longer depends on knowing the top menu style from api.php, deducing it, instead, from the response text of the menu itself. And it tweaks how the "quick scripts" menu is constructed, if you have the "compact" style of top menu.

There are still display issues. If you have the new tall charpane, KoL's topmenu (in particular, the moons) overlaps with KoLmafia added stuff on the right - the "quick scripts" menu and exec button, the "relay scripts" menu, and the refresh link.

And if you have the "compact" menu, the default height does not suffice for the two menus KoLmafia adds. You can pull down the bottom border and it widens, at least.

And there still is the issue of deciding if you are in a clan if you have the icon menu. At the moment, we will always conclude that you are in one, since the link to clan hall is always there, in the config section, at least.
 

Veracity

Developer
Staff member
Revision 14318 does a much better job of inserting KoLmafia's "Quick Scripts" and "Relay Scripts" menu into KoL's topmenu.
It's quite usable for the "normal" (links) style, is OK for the "compact" (dropdowns) style, but could use some love for the "fancy" (icons) style.
 

Veracity

Developer
Staff member
Revision 14320 no longer inserts the script menus in the "fancy" (icon) style of topmenu.

I won't be working any more on the icon topmenu; somebody who is actually interested in running with icons will undoubtedly have some ideas of how & where to support relay scripts with that style. I am clueless.
 

ckb

Minion
Staff member
Also related to this, because of the [strange] redirect, relay overrides do not quite work right.
That is, an override script topmenu.ash works fine.
But an override of awesomemenu.ash does not load the first time the relay browser loads. Reloading the top pane (via the [re] link or otherwise) will then force the override to work.
 

Bale

Minion
It's not really a problem. awesomemenu.ash's first line is import "topmenu.ash"; and you'll only need a minimum of redundant code.
 
Yes, the drop down menu was obscured by the new icon menu, but pulling down the bottom border of the menu frame a bit solved the issue, at least so that the scripts could be selected. So now, until this is changed, the only way to run relay scripts is to change to an older menu style, then?
 

Bale

Minion
So now, until this is changed, the only way to run relay scripts is to change to an older menu style, then?

Yup. Veracity was made aware that a poor implementation was worse than no implementation, so to avoid annoying people the iconic menu is going to remain as Jick intended until a dev appears who actually uses the iconic menu. Otherwise there's a good chance that it would annoy more iconic menu users with foolish modifications.

In the meantime you might want to try my skin of the link version topmenu. Maybe that will make it okay if you're forced to use the retro menu.
 
Last edited:

Darzil

Developer
I guess I'll start by asking what people would like to see for the relay scripts on the iconic menu?

Personally I'd like to see a drop down as it was yesterday, which works well with a double row of icons.

Edit - Increasing the size of "fixedawesome", the set of icons always on the top right, and putting the scripts dropdown in front of it is probably pretty easy. Maybe include a top/bottom preference that lets you put it bottom right instead of beside the icons. Making a script icon that drops a menu when you click on it would be pretty funky, but no idea where to start on that one!
 
Last edited:
I'll go with anything that doesn't require switching menus back & forth to get access ;-)

A thought: is there a way to tell what's in what icon position? If so, then I was thinking that a certain icon (or it's underlying action?) could be used as a placeholder for the drop down. The end user could use this to put the script drop down wherever they wanted. I was thinking it would probably take three adjacent icon positions in a row.
 

TragicMissile

New member
Anywhere on the page is better than nowhere. The drop down box on the right side is very convenient, and as stated above, works quite well with a double row of icons.
 
My preferred place for the relay dropdown would be right underneath the fixedawesome icons.

While it's not as great as a dropdown menu, you can actually add links to relay pages by using a custom macro: "goto relay_filename.php". It adds an event everytime you click on the icon (which shows up in chat and on the main pane), and you need to add an icon for each page you want to visit, but it gets the job done.
 

zekaonar

Member
Why mess with the top menu at all since it has so many options and modes. Could you put the relay droplist on the main map page? That way anyone can get to it. Or are there relay scripts people run mid-fight?
 

Veracity

Developer
Staff member
I am very happy with the relay script menu being in the "normal" top menu.

It looks ugly in the "compact" top menu, but that is primarily because KoL itself has crummy vertical alignment of its standard elements. We could fix that.

I have no opinion on the "fancy" top menu. I do not expect I will ever use that.
 

Theraze

Active member
Why mess with the top menu at all since it has so many options and modes. Could you put the relay droplist on the main map page? That way anyone can get to it. Or are there relay scripts people run mid-fight?

I run some scripts mid-fight. If it's just parsing external data and mafia's files, it's nice to be able to run those easily.
Also, I don't need to refresh the window 5 times to make the main menu come up rather than the initial screen, the start of the last fight I gCLI-ed past, the end of the last fight I gCLI-ed past, etc. Not a bug, a feature of how much I prefer the text world. But still, when I go to the relay browser, it's nice to be able to go straight to the scripts rather than needing to fight for the main map page.
 

Razorsoup

Member
My preferred place for the relay dropdown would be right underneath the fixedawesome icons.

I second this. My preference would be to expand the menu if needed (and if possible) and place the relay dropdown under the fixedawesome div. If the user has any icons under the fixedawesome div they might get covered up but if you have any icons immediately to the left of the fixedawesome div, they will also get covered by that div if you resize your window smaller.

If vanilla KoL doesn't protect your icons from getting lost behind other elements, I'm not sure KoLmafia should be too worried about it. Just my $.02.
 
Top