Feature - Implemented Include "meat in closet" indicator on Main page

Bale

Minion
I suppose what I am waiting for is a groundswell of support demanding the feature in one form or another ;-)

Sorry. I put meat in my closet like... twice... maybe? Not a big feature for me. Otherwise I'd have been happy to cheer you on.
 

fronobulax

Developer
Staff member
Sorry. I put meat in my closet like... twice... maybe? Not a big feature for me. Otherwise I'd have been happy to cheer you on.

That's the curse of automation. I am constantly closeting meat because if I don't EatDrink spends whatever is left after Universal_recovery heals. I suppose there is a way to tweak them so that they will only spend "so much" but it is just much easier to closet. There was also a discoveries script that would make anything you had not made and that was also allowed to spend any meat that wasn't in the closet in order to discover the recipe. It becomes an issue when there is no meat to buy things that are needed to advance such as the abridged dictionary or forged ID documents. I also have a Sauceror who's main attack is Lunging Thrust Smack because the character is too poor to buy class specific skills.
 

Bale

Minion
I comprehend your problem, I just cannot lead the groundswell. At least your personal build of mafia handles it for you though.
 

Theraze

Active member
I don't use it often, but I can see its use. My personal vote is for either just the asterix, or asterix with tooltip showing closet meat: no explaining, just Closet Meat: <number> when you mouseover. Depends on how annoying tooltips are to code...

Putting in the tooltip removes the 'wtf is that' aspect, but makes more work for you. :)
 

Grotfang

Developer
I figured I would have a play with this. Firstly, I replicated fronobulax.

Then I added a tooltip instead. The screenshot removed the cursor (it should be hovering over my meat value) but it demonstrates the concept. What do you folk reckon?

Setting a tooltip for closeted meat:

CompactSidePane.java Line 416:

Code:
this.meatLabel.setText( KoLConstants.COMMA_FORMAT.format( KoLCharacter.getAvailableMeat() ) );

Add a new line:

Code:
this.meatLabel.setText( KoLConstants.COMMA_FORMAT.format( KoLCharacter.getAvailableMeat() ) );
this.meatLabel.setToolTipText( "Closet: " + KoLConstants.COMMA_FORMAT.format( KoLCharacter.getClosetMeat() ) );
 
Last edited:

fronobulax

Developer
Staff member
Well, You certainly found an easier way to deal with the tool tip than I did. I'll check it out.

I had decided that " +C" was a slightly more intuitive indicator than an asterisk so that's my preference if Grotfang's tool tip doesn't work. Busy weekend coming up, though so not sure it happens soon.
 

fronobulax

Developer
Staff member
I figured I would have a play with this. Firstly, I replicated fronobulax.

Then I added a tooltip instead. The screenshot removed the cursor (it should be hovering over my meat value) but it demonstrates the concept. What do you folk reckon?

Setting a tooltip for closeted meat:

CompactSidePane.java Line 416:

Code:
this.meatLabel.setText( KoLConstants.COMMA_FORMAT.format( KoLCharacter.getAvailableMeat() ) );

Add a new line:

Code:
this.meatLabel.setText( KoLConstants.COMMA_FORMAT.format( KoLCharacter.getAvailableMeat() ) );
this.meatLabel.setToolTipText( "Closet: " + KoLConstants.COMMA_FORMAT.format( KoLCharacter.getClosetMeat() ) );

Are you sure that is all you changed? I believe your screenshot but adding that line and rebuilding just is not working for me. I get the stats to next level when I hover and the enhanced modifiers table when I click so I figure something is working but when I hover over the meat, left, or right click I get nothing.

I confess, I am surprised if this works since looking at the stat code I figured I was going to have to put the meat in its own panel and attach a popup to it and listener which is why I had not tried what you did. And I freely confess that I find Java Swing too fiddly for me and have always managed to assign the Swing work to someone else on the team and both of us were happier. (In other words, I probably don't know what I am doing.)
 

Grotfang

Developer
Can I clarify that you have tried hovering your cursor over the JLabel that contains the (integer) meat value? You shouldn't have to click anything for the tooltip to appear.

EDIT: Also bear in mind that the line that handles the next level tooltip is much the same:

Code:
this.levelPanel.setToolTipText( "<html>  " + KoLCharacter.getAdvancement() + "  <br>  (" + KoLConstants.COMMA_FORMAT.format( nextLevel - totalPrime ) + " subpoints needed)  </html>" );

I'll admit it uses HTML markup and the tooltip is added to the whole panel as opposed to an individual JLabel, but the principle is the same.
 
Last edited:

fronobulax

Developer
Staff member
Can I clarify that you have tried hovering your cursor over the JLabel that contains the (integer) meat value?
Yep. That failed for me. Why don't you package your change as a patch and post so we both know that I am running the same code?

Edit: Never mind. It is probably a mouse sensitivity thing. I just rebuilt and tried it with a mouse that was on a solid surface (i.e. stationary) and saw the hover. I will check in momentarily.
 
Last edited:
Top