Feature - Implemented replace some buttons in daily deeds with JComboBox [patch]

Sentrion

Member
Condensed Summons in Daily Deeds

I was just wondering if it'd be possible to condense all the demon summons in the DD panel into one button with a dropdown menu, instead of X number of buttons for all the demon names.
 

roippi

Developer
This replaces 5 shower buttons and.. some number of demon summoning buttons with more compact comboboxen and execute button pairs. It also hides (instead of just disabling) the [spade] button unless we have spading data to submit.

DisabledItemsComboBox is a widget that extends JComboBox. It allows for disabling individual list elements and setting element tooltips.

The only thing that I'm not sure on in this patch right now: all the demons 1 through 10 are included in the Summoning Chamber dropdown. Tatter and Existential Torment don't really need to be in the list.

Patch attached.
 

Attachments

  • ddpolish7.patch
    19.3 KB · Views: 26

Bale

Minion
It also hides (instead of just disabling) the [spade] button unless we have spading data to submit.

Thas' nice. It gets annoying when people start asking how to submit their spade data in the KoL forum's discussion thread.
 

Veracity

Developer
Staff member
I like this - especially since I personally complained when one of the Demons was removed in order to make room for another and said they should all be there in a Combo Box.

I think your Disabled Item Combo Box is cool. I could have used something like it in the Gear Changer for the Familiar list in Beecore. In its absence, I ended up using a different approach to filter out B familiars.

I cleaned up some of your formatting and submitted it in Revision 9460. Thanks.
 

roippi

Developer
Thas' nice. It gets annoying when people start asking how to submit their spade data in the KoL forum's discussion thread.

Yeah. One such post popped up in the GD (yeah, I know) thread while I was working on this. Might as well change it while I'm in there.

I cleaned up some of your formatting and submitted it in Revision 9460. Thanks.

Cheers.

Minor future-proofing bug that I didn't catch in time: right now, there need to be at least as many tooltips as there are list elements, otherwise there is an out-of-bounds exception in DisabledItemsComboBox at runtime when the box is clicked, as it tries to access an array element that doesn't exist.

DisabledItemsComboBox.java line 193:
Code:
					list.setToolTipText( (String)getTooltips().get( index ) );

should be

Code:
if( index < this.getTooltips().size() )
				{
					list.setToolTipText( (String)getTooltips().get( index ) );
				}
				else
				{
					list.setToolTipText( null );
				}

So if new demon names are added without adding new tooltips, the combobox won't blow up.
 
Top