Create account / Log in

Menu Bar Button

Talk about module design ideas and techniques.

Moderators: uckelman, Tim M

Menu Bar Button

Postby jtessier » July 29th, 2013, 11:35 pm

I'm looking to add a very simple button up on the menu bar as I need a visual reminder that a + 1 modifier is in effect. It's difficult to remember these things as files get sent back and forth over many days and a big old colorful icon on the menu bar would would be very helpful.
I tried adding a symbolic die roller between two images (one greyed out "OFF" state and another bright red "ON" state) but its kind of fiddly to keep clicking till the desired image pops up. since that's random.
Any suggestions on adding a button that simply toggle back and forth between two icon images?

Jean
jtessier
 
Posts: 37
Joined: November 23rd, 2009, 6:10 am

Re: Menu Bar Button

Postby mycenae » July 31st, 2013, 11:33 pm

It's not what it's intended for, but you could use a 'Show/Hide' layers button. Just define an On icon and an Off icon; don't worry about linking it up to any actual game piece layers or having it actually do anything. All it does is toggle 2 different icons.
mycenae
 
Posts: 394
Joined: May 16th, 2008, 6:41 pm

Re: Menu Bar Button

Postby jtessier » August 2nd, 2013, 1:54 pm

Darn that almost worked (and placed the button in an appropriate space of the menu bar but unfortunately I don't think it can be disassociated from the showing/hiding pieces. The feature is hardwired into the button.

Thank you for the suggestion.

Jean
jtessier
 
Posts: 37
Joined: November 23rd, 2009, 6:10 am

Re: Menu Bar Button

Postby mycenae » August 2nd, 2013, 6:44 pm

Yeah, I realized got the functionality mixed up with the 'Game Piece Layers control' button, which toggles different layers on and off. But that doesn't include 2 button images. :(

If it doesn't have to be on the toolbar, you could just define an unmoveable game piece in an at-start stack, off to the side of the board someplace. Then use a Layer trait on the game piece to define a +0 level and a +1 level.
mycenae
 
Posts: 394
Joined: May 16th, 2008, 6:41 pm

Re: Menu Bar Button

Postby Tim M » August 2nd, 2013, 11:39 pm

I think what you were looking for is a Global property. You can add a Change
Toolbar Button to a defined GP (right click)

-----Original Message-----
From: messages [mailto:messages-bounces@vassalengine.org] On Behalf Of
mycenae
Sent: Friday, August 02, 2013 1:45 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Module Design] Menu Bar Button

Yeah, I realized got the functionality mixed up with the 'Game Piece Layers
control' button, which toggles different layers on and off. But that doesn't
include 2 button images. :(

If it doesn't have to be on the toolbar, you could just define an unmoveable
game piece in an at-start stack, off to the side of the board someplace.
Then use a Layer trait on the game piece to define a +0 level and a +1
level.

_______________________________________________
Read this topic online here:
viewtopic.php?p=41550#p41550
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Menu Bar Button

Postby jtessier » August 5th, 2013, 3:22 pm

I was hoping to keep it on the tool bar since I have have adequate space up there and there just never seems to be enough on the map. I rigged a work around by using the Symbolic Die Roller feature. It toggles between my two images but does not actually generate a number. A click or two to get by the randomness of the roller and and I have my visual Q. Not elegant but it works.
Thank you for the helpful suggestions.

Jean
jtessier
 
Posts: 37
Joined: November 23rd, 2009, 6:10 am

Re: Menu Bar Button

Postby Tim M » August 5th, 2013, 5:31 pm

jtessier wrote:I was hoping to keep it on the tool bar since I have have adequate space up there and there just never seems to be enough on the map. I rigged a work around by using the Symbolic Die Roller feature. It toggles between my two images but does not actually generate a number. A click or two to get by the randomness of the roller and and I have my visual Q. Not elegant but it works.
Thank you for the helpful suggestions.

Jean


How does a Global Property (values on/off) with the Change toolbar button option ( corresponding images to on/off) not work?
Tim,
Vassal Uber Geek/Guru

Problems? post your OS, Physical Mem, version of Vassal and Java plus the Module in question.
No developer can help with out that info, thx!
User avatar
Tim M
 
Posts: 1816
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Menu Bar Button

Postby jtessier » August 7th, 2013, 5:34 am

Hi Tim. Just recognized you as the one who designed the excellent Combat Commander modules. Can't thank you enough for that amazing work!

Alas, I tried the Global Properties function on both the module and the Main Map sub menu with no luck. I created Global property ON for the greyed out initial button with a Change Button property. Then added another Global property OFF with the red "look at me" button. Both came up on the menu bar.

Started over and added a single Global property with two "Change Button" sub properties and again two buttons with my toggling.

Methinks its a bit beyond my programming comprehension.

Jean
jtessier
 
Posts: 37
Joined: November 23rd, 2009, 6:10 am


Return to Module Design

Who is online

Users browsing this forum: No registered users and 2 guests