Game Piece Inventory Window

Hello,

there is a way to show/hide a Game Piece Inventory Window?

Thanks

Panther 2010 :question:

Only the “Close” button inside it. The Inventory Window is a bit “Old School” :slight_smile:

Mmm, It was what I feared!

Well, maybe there is another way to get what I want anyway.

I see to explain myself in more detail.

In this module it is possible to create stacks in a given hex that contain numerous counters; now, the way you can handle stacks in Vassal is anything but simple and easy.

To try to solve this problem, I added an action button on the counters that opens a Game Piece Inventory Window, called Hex Inventory, that allows me to view all the pieces that are in a given hex and to easily interact with them with the right-click commands. Everything works perfectly.

The only problem, however purely aesthetic, is the presence on the toolbar of the Game Piece Inventory Window button, (completely useless, because if a hexagon is not yet selected, it does not display anything) that it is not possible in any way to make it disappear and I will not like to have an object that serves no purpose in the tollbar.

Any suggestion?

Thank you again.

Panther 2010 :slight_smile:

If you JUST want the button to be invisible on the toolbar, then you could un-assign the image from it – then it wouldn’t appear on the toolbar at all, and only when its Global Hotkey was pressed. Of course the player could still close it with button that’s on it, and then it could only be re-opened with the hotkey. BUT you could conceivably fire that hotkey at startup (with a Startup Global Key Command which told some invisible piece on the map to execute a Global Hotkey trait), and/or you could provide a button somewhere that had a Global Hotkey trait to turn it (back) on.

To make it actually hide itself w/ the hotkey would unfortunately require writing a java custom class (which is a very heavy lift if you haven’t done that kind of thing).

Brian

Hello Brian,

I have already tried to hide the Game Piece Inventory Window button, un-assigning the image from it and leaving empty the button text, but the only result was the appearance of a white square in the toolbar.

I have already used the Startup Global Key Command which told some invisible piece on the map to execute a Global Hotkey trait successfully in other contexts, but in this case it is completely useless.

What I want to do is open a window (not necessarily a Game Piece Inventory Window ) using a action button on a counter that is in a given hex, so that I can interact via right-click with all the pieces that are in that hex using this window.

Basically what I want to do is a sort of enhanced Mouse Over Stack Viewer. A long time ago I asked to add the possibility to interact with the pieces displayed in the Mouse Over Stack Viewer and I hope this will happen at least in the “phantom” version 4 of Vassal.

I am not a programmer and I am not able to use the Java Language to write a java custom class, but only the commands currently available in Vassal

Be well.

John.
:confused:

The workaround I came up with for those annoying white squares was to create a single generic Game Piece Inventory Window “prototype”. Basically, the “Show only pieces matching these properties” field for my GPIW has an expression with a bunch of Global Properties:

{Power==Active_Power&&Trait1==Active_Trait1&&Trait2==Active_Trait2} etc…

This allows me to show any game pieces I want in a single window in a context-sensitive manner by constantly updating those Global Properties. I wish the GPIW wasn’t so “old-school”, because it’s actually incredibly powerful and just needs a little “polish” to be even better…

Hello m3tan,

I apologize for the delay, but I have only just now noticed your reply dated June 24th.
I didn’t understand how you make the white square disappear using a protoype.
I use an action button to activate the GPIW, but in any case, the GPIW, before being activated, must first be defined at the editor level and this creates the white square that I cannot eliminate in any way. Any information in this regard will be very welcome.

Cheers!

:slight_smile:

I didn’t eliminate the white sqaure. What I did was combine about 10 GPIWs into a single window with a generic image and text “Active Window”. I used expressions to dynamically update what appears in that GPIW. It’s not ideal, but it was better than 10 little white sqaures…

Well, it’s a pity. I hoped to finally be able to eliminate that damn white square… I will try another way to simulate the GPIW with a window that can be hiden, if possible.

Be well.

Panther 2010.
:frowning:

You can always name the button, and hide it under a Toolbar Menu.
I use a dented gear as icon for settings menu. It contains important 2ry options.
And an additional settings menu … made of things I want to hide from the main toolbar.
I was bothered by the white square too before I did that.

1 Like

Hello kerkael,

sorry to be so late in reply to your answer to my problem, but I have been very busy in this last period of time.

Unfortunately, I wasn’t able to understand what you have done. How can I hide the GPIW button in a Toolbar Menu?

Thank you for your help on that matter.

Be well.

Panther 2010 :question:

In the editor, right-click the module, “Add Toolbar Menu” call it Hidden Buttons or whatever. Do not assign a button text or icon to it. Add any buttons you want to hide to this menu as Menu Entries.

Using this method you can hide any toolbar buttons.

Hello Benkyo,

What I want to do is not hide a button in the toolbar, I know how to do it and it works. I’m interested in hiding a map window, in particular a GPIW and I don’t know if that’s possible or not.

So far, all attempts in this direction have failed.

Be well.

Panther 2010

Earlier you wrote:

“The only problem, however purely aesthetic, is the presence on the toolbar of the Game Piece Inventory Window button, (completely useless, because if a hexagon is not yet selected, it does not display anything) that it is not possible in any way to make it disappear and I will not like to have an object that serves no purpose in the tollbar.”

“I have already tried to hide the Game Piece Inventory Window button, un-assigning the image from it and leaving empty the button text, but the only result was the appearance of a white square in the toolbar.”

"Well, it’s a pity. I hoped to finally be able to eliminate that damn white square… "

I was resolving this issue for you. Apparently, between then and now you figured out the answer yourself?

Hotkeys to make windows open and close is trivial, so I’m guessing that’s not what you are asking about.

Earlier you spoke about expanding a hex into a window, but if that means what I think it means, I don’t think there’s any practical way to do that, except through use of a GPIW… but you already seem to know this.

Hello Benkyo,

I am currently using an action button that opens a GPIW to be able to interact more easily with a stack of units. Everything works perfectly.
The problem, which is only aesthetic, is that a GPIW must be defined at the editor level and it is not possible to make the related button disappear from the toolbar in any way.
The button in the toolbar is useless, since the GPIW is activated only by an action button present on any counter.

In practice, a white square appears in the toolbar; if one clicks on it, an empty GPIW opens, since no hex has been defined.

I intended to replace the GPIW with a public window where to copy all the units present in a given hex, in order to then interact individually with each of them, but then the problem arises of deleting them before closing the window itself. Better to keep using the GPIW and keep the useless white square in the toolbar!

Cheers.

:slight_smile:

Ah, the problem is with GPIWs. I didn’t realize that GPIWs, unlike all(?) other toolbar buttons, can’t be hidden. That is odd. Map window buttons can be hidden.

So I booted up the Editor on one of my modules, removed the “button text” and “button image” from the Game Piece Inventory Window, and looked on my toolbar – didn’t see any tiny nubby unwanted small square?

I may need repro steps and/or a specific module file to repro this with?

Brian

Hello Brian,

I just did the same (removed button text and button image), but the tiny nubby unwanted small square is still there.
I’m using version 3.5.7 of Vassal.

Be well.

Panther 2010

:question:

I don’t see one either. What OS are you using? Would you post a screenshot of the problem?

Hi uckleman,

OS is Windows 10, Vassal 3.5.8.

Attached are screenshots of the problem.

Thank you for your support.

Panther_2010





:wink: