Create account / Log in

Anybody know a way to have a rightclick menu for Map itself?

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

Anybody know a way to have a rightclick menu for Map itself?

Postby Cattlesquat » March 2nd, 2020, 3:54 pm

I would love to have it be possible to right click on the map itself and, assuming it's just an empty part of the map with no pieces on it, have it bring up a menu to allow placement of common markers (e.g. control markers, etc) in that space.

Anybody found a good system for doing that?

Brian
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Anybody know a way to have a rightclick menu for Map its

Postby Tim M » March 2nd, 2020, 10:50 pm

Simple enough to do. Depends on your map. You put a hidden unmovable piece in every location on the most bottom layer that no other piece uses. When you right click the alleged empty space - voila
On Monday, March 2, 2020, 09:54:48 AM CST, Cattlesquat wrote:

I would love to have it be possible to right click on the map itself
and, assuming it's just an empty part of the map with no pieces on it,
have it bring up a menu to allow placement of common markers (e.g.
control markers, etc) in that space.

Anybody found a good system for doing that?

Brian

_______________________________________________
Read this topic online here:
viewtopic.php?p=58677#p58677
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: 1799
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Anybody know a way to have a rightclick menu for Map its

Postby Cattlesquat » March 3rd, 2020, 12:47 am

Oh, cool!

How do I make it "Hidden"? (Invisible doesn't appear to be what is needed). I'm thinking I need to give it some art so that it will have a size & "take up space" on the map, so I'm assuming you don't mean just leave the art blank entirely?
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Anybody know a way to have a rightclick menu for Map its

Postby Tim M » March 3rd, 2020, 12:50 am

well yes - im talking about making a transparent piece. Yopu make it the shape of your grid/hex location whatever and use the vassal shape trait as the definition/mask...
On Monday, March 2, 2020, 06:48:00 PM CST, Cattlesquat wrote:

Oh, cool!

How do I make it "Hidden"? (Invisible doesn't appear to be what is
needed). I'm thinking I need to give it some art so that it will have a
size & "take up space" on the map, so I'm assuming you don't mean just
leave the art blank entirely?

_______________________________________________
Read this topic online here:
viewtopic.php?p=58680#p58680
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: 1799
Joined: December 8th, 2007, 12:22 pm
Location: Earth

Re: Anybody know a way to have a rightclick menu for Map its

Postby Cattlesquat » March 3rd, 2020, 1:32 am

I can't seem to find what you mean by the "Vassal Shape" Trait. I tried making a piece the correct pixel dimensions and filling it all with transparent color, but that seems to make it not receive mouse clicks in the transparent area.

I found the "Area of Effect" trait and tried adding that, but that doesn't seem to be selectable either.

My "Empty Space" prototype currently contains:
Marker - Layer (to put it on the bottom)
Does Not Stack (unmoveable, but normally selectable)
and then "Place Marker" traits to make the right+click menu

What I am missing is which trait to add from the "Available Traits" menu that will make it take up space and allow the menu items to be activated. Sorry if I'm missing something really obvious.

Brian
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Anybody know a way to have a rightclick menu for Map its

Postby Cattlesquat » March 3rd, 2020, 1:51 am

Whoops - typo error on that last. Piece image "filled entirely with transparent color" works just fine (I mean that obviously makes a rectangular shape since that's what shape PNG/JPG files are, but my spaces in Paths of Glory are rectangular anyway -- if there's a way to make it a "circle" or a "hex", then I still don't know what that way is).

Note to any who follow... working with transparent piece is tricky - I had mis-specified the prototype and since I was expecting an "invisible" piece anyway, didn't notice it wasn't getting placed.

Anyway, thanks very much for the help! If you stop by again and want to make clear what Trait to add if one wants to make a piece of a different shape, then I'm sure posterity will appreciate :-) I know I've learned about 1000 things from finding 10-year-old threads...

Brian
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Anybody know a way to have a rightclick menu for Map its

Postby JoelCFC25 » March 3rd, 2020, 2:40 am

The Non-Rectangular trait should work: http://www.vassalengine.org/wiki/NonRectangular
JoelCFC25
 
Posts: 689
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Anybody know a way to have a rightclick menu for Map its

Postby Cattlesquat » March 3rd, 2020, 3:34 am

Ah! Why there it is! Never had a need for that, so never knew it even existed! Yay, capabilities!

Brian
User avatar
Cattlesquat
 
Posts: 327
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Anybody know a way to have a rightclick menu for Map its

Postby Tim M » March 3rd, 2020, 1:54 pm

Yes this is the shape trait I was thinking of. Just forgot its name
On Monday, March 2, 2020, 08:40:28 PM CST, JoelCFC25 via messages wrote:

The Non-Rectangular trait should work:
http://www.vassalengine.org/wiki/NonRectangular[1]

[1] http://www.vassalengine.org/wiki/NonRectangular


_______________________________________________
Read this topic online here:
viewtopic.php?p=58684#p58684
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: 1799
Joined: December 8th, 2007, 12:22 pm
Location: Earth


Return to Module Design

Who is online

Users browsing this forum: No registered users and 4 guests

cron