Regarding making the toolbar configurable:
There are several kinds of buttons:
- Those that open a Frame of the sort that you can put into a tab (most of them)
- Those that open a Frame that displays a response to a KoL request (Council)
- Those that open the Relay Browser with a request (Relay Browser, Read Kmail. Radio KoL)
Which are the frames you can put in tabs? KoLCionstants.FRAME_NAMES lists them:
Code:
public static final String[][] FRAME_NAMES =
{
{
"Adventure",
"AdventureFrame"
},
{
"Mini-Browser",
"RequestFrame"
},
{
"Relay Server",
"LocalRelayServer"
},
{
"Purchases",
"MallSearchFrame"
},
{
"Graphical CLI",
"CommandDisplayFrame"
},
{
"Daily Deeds",
"CharSheetFrame"
},
{
"Item Manager",
"ItemManageFrame"
},
{
"Gear Changer",
"GearChangeFrame"
},
{
"Store Manager",
"StoreManageFrame"
},
{
"Coin Masters",
"CoinmastersFrame"
},
{
"Museum Display",
"MuseumFrame"
},
{
"Hall of Legends",
"MeatManageFrame"
},
{
"Skill Casting",
"SkillBuffFrame"
},
{
"Contact List",
"ContactListFrame"
},
{
"Buffbot Manager",
"BuffBotFrame"
},
{
"Purchase Buffs",
"BuffRequestFrame"
},
{
"Request a Fax",
"FaxRequestFrame"
},
{
"Mushroom Plot",
"MushroomFrame"
},
{
"Familiar Trainer",
"FamiliarTrainingFrame"
},
{
"Loathing Chat",
"ChatManager"
},
{
"Clan Management",
"ClanManageFrame"
},
{
"Farmer's Almanac",
"CalendarFrame"
},
{
"Encyclopedia",
"DatabaseFrame"
},
{
"Coin Toss Game",
"MoneyMakingGameFrame"
},
{
"Preferences",
"OptionsFrame"
},
{
"Sweet Synthesis",
"SynthesisFrame"
},
{
"Modifier Maximizer",
"MaximizerFrame"
}
};
Observations:
"Mini-Browser" -> "RequestFrame"
Is this still useful? KoL itself is so dependent on Javascript that this is a very deficient version of the Browser experience
"Relay Server" -> "LocalRelayServer"
This is not really a "Frame". It is a directive to start the Relay Browser on startup. Does it work?
"Contact List" -> "ContactListFrame"
Is this one available on the Menu?
"Buffbot Manager" -> "BuffBotFrame"
This one is. It is for those handful of users who are actually running a buffbot
"Coin Toss Game" -> "MoneyMakingGameFrame"
Seriously? This still exists? Is it available on the Menu?
If we support putting a Frame in a tab or opening it on startup, it MUST be on the menu somewhere.
KoLDesktop says that these are the buttons:
Code:
toolbarPanel.add( new DisplayFrameButton( "Council", "council.gif", "CouncilFrame" ) );
toolbarPanel.add( new RelayBrowserButton( "Load in Web Browser", "browser.gif", null ) );
toolbarPanel.add( new DisplayFrameButton( "Graphical CLI", "command.gif", "CommandDisplayFrame" ) );
toolbarPanel.add( Box.createHorizontalStrut( 10 ) );
toolbarPanel.add( new RelayBrowserButton( "Read KoLmail", "mail.gif", "game.php?mainpane=messages" ) );
toolbarPanel.add( new DisplayFrameButton( "KoLmafia Chat", "chat.gif", "ChatManager" ) );
toolbarPanel.add( new DisplayFrameButton( "Clan Manager", "clan.gif", "ClanManageFrame" ) );
toolbarPanel.add( Box.createHorizontalStrut( 10 ) );
toolbarPanel.add( new DisplayFrameButton( "Daily Deeds", "hp.gif", "CharSheetFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Item Manager", "inventory.gif", "ItemManageFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Equipment Manager", "equipment.gif", "GearChangeFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Store Manager", "mall.gif", "StoreManageFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Coin Masters", "coin.gif", "CoinmastersFrame" ) );
toolbarPanel.add( Box.createHorizontalStrut( 10 ) );
toolbarPanel.add( new DisplayFrameButton( "Purchase Buffs", "buff.gif", "BuffRequestFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Familiar Trainer", "arena.gif", "FamiliarTrainingFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Mushroom Plot", "mushroom.gif", "MushroomFrame" ) );
toolbarPanel.add( Box.createHorizontalStrut( 10 ) );
toolbarPanel.add( new RelayBrowserButton( "Radio KoL", "radsword.gif", "http://209.9.238.5:8794/listen.pls" ) );
toolbarPanel.add( new DisplayFrameButton( "Farmer's Almanac", "calendar.gif", "CalendarFrame" ) );
toolbarPanel.add( new DisplayFrameButton( "Preferences", "preferences.gif", "OptionsFrame" ) );
Observations:
As noted, Relay Browser and Read Mail and Radio KoL go to the Relay Browser.
Everything else opens a Frame. All of those frames - except Council - can be set up as a tab. Council would make no sense for that, since it visits the Council and tells you what they say right now; there is no interaction, and it does not update.
I suggest:
Every frame that can be in a tab or opened at startup should have an icon to be used on the toolbar, should you choose to place it there.
Relay Browser requests - Relay Browser, Read Mail, Radio KoL (does it still exist? It seems so - but we should use radio-kol.com, rather than a raw IP address) - should have icons and also be in the Menu.
RequestFrames - things that show the current result of a KoL request, like Council Frame - should have icons and also be in the Menu.
We have the following instances of RequestFrames:
CouncilFrame.java:39: extends RequestFrame
DescriptionFrame.java:44: extends RequestFrame
ProfileFrame.java:39: extends RequestFrame
RequestSynchFrame.java:41: extends RequestFrame
CouncilFrame shows a visit to council.php
DescriptionFrame is how we show desc_xxx.php
ProfileFrame shows a user profile from chat, clan manager, ...
RequestSynchFrame is used if you have "showAllRequests" set to true. It lets you watch, round by round, as you automate. I remember wanting that many years ago - and hola did it - but I have long since lost interest. I wouldn't mind simplifying our code and trashing it.
So, for configuring the toolbar:
It could/should work in combination with how you configure tabs.
Provide a palette of icons, each associated with a frame, with a Relay Browser link, or with a request frame (currently only Council)
You can drag a button to your set of Tabs - if it is a standalone Frame
You can drag a button of any sort to the toolbar.
If a button is in the Tabs, it doesn't need to be on the Toolbar (right?)
You can reorder Tabs to suit your fancy.
You can reorder the Toolbar to suit your fancy.
Restart KoLmafia to see your new tabs and toolbar buttons.
Short of a configurable toolbar:
We could move some buttons to the menu: Radio KoL, Read Mail, Council
We could add some default toolbar buttons: Modifier Maximizer, Sweet Synthesis
We could suppress adding a toolbar button if you have the corresponding Frame in a tab, although that might be controversial: you can press a button to switch tabs, currently, and perhaps people depend on that. We could make that UI decision configurable.