Page 4 of 4

Re: Possible to hook into mapper rightclick menu?

Posted: Mon Dec 05, 2011 3:52 am
by InTheWorks
chris wrote:For the 'cancel' action, why on earth would you need that in a right click menu? You either do something or you don't. There shouldn't be the need to cancel anything.
If it was drag and drop, then I would agree yes there's no need to cancel. However, once I start the merge I need to be able to clear the variables that I'm setting and Cancel seems to be the only way...

Re: Possible to hook into mapper rightclick menu?

Posted: Mon Dec 05, 2011 3:55 am
by InTheWorks
chris wrote:For the order, the structure for the actions/labels is a map dictionary, which has a 1:1 mapping. This is why the menu items are being moved. The displayName is unique.
Maybe the event should be the unique item and not the displayName?

Re: Possible to hook into mapper rightclick menu?

Posted: Mon Dec 05, 2011 4:09 am
by chris
I don't like that because multiple sub menus can use the same event, which is great for things like coloring (see my example). One issue that would crop up should entries be non-unique is for removing the entries, if they aren't unique you will need to provide extra information such as name + parent, or name+ index position. Behind the scenes it sort of gets messy because you have to remove your uniqueness constraint. I'll have to think about ways that can do this, whether the list should be sorted by the order they are made, uniquness, etc.

Re: Possible to hook into mapper rightclick menu?

Posted: Mon Dec 05, 2011 5:34 am
by chris
I fixed the map menu issue and added an event, setPlayerLocation you can attach to the right click for the existing entry.

Re: Possible to hook into mapper rightclick menu?

Posted: Tue Dec 06, 2011 7:38 am
by InTheWorks
chris wrote:I fixed the map menu issue and added an event, setPlayerLocation you can attach to the right click for the existing entry.
Thanks very much for adding this (and the right click menu stuff too).

edit: had posted some nonsense about something not working when I realised I hadn't merged after fetching...

edit2: just wanted to report back that everything seems to work as advertised.