Update area in dropdown?

All and any discussion and development of the Mudlet Mapper.
Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Update area in dropdown?

Post by Nyyrazzilyss » Mon Jun 22, 2015 7:22 pm

If I move to another location that is in a different area on the map, I can get the room information to change accordingly. centerview updates the map itself properly to the new location.

However: The dropdown list of possible areas doesn't change to match the new area name i'm now located in. Is there a command to do so?

User avatar
Vadi
Posts: 4703
Joined: Sat Mar 14, 2009 3:13 pm

Re: Update area in dropdown?

Post by Vadi » Tue Jun 23, 2015 8:17 am

I don't think so yet. This might be something SlySven is covering in his mapper fixes, but I'm not certain.

User avatar
SlySven
Posts: 919
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Update area in dropdown?

Post by SlySven » Tue Jun 23, 2015 11:04 pm

I just put out a PR that does other things that touch upon that area widget (involving adding, removing and renaming areas) but no, it is not updated for that. IIRC we also had a brief discussion a while back about whether centerview should also only move the view point WITHOUT changing the player's position, and possibly proving a way for the user and their scripts to know what the player's position IS.

Would a separate (boolean result[, string errMsg])setViewCenter( (number)roomId, [(bool)isToMovePlayerPosition - optional - default=true if absent] ) and a (number roomId[, string errMsg])getViewCenter() be the cleanest way to do this Vadim? Or should I tack the additional functionality of the first onto centerview()?

If we are working in this area I guess a (number roomId[, string errMsg])resetViewCenter() to re-centre the map view on the current player location WITHOUT changing the latter would also be welcomed! Obviously the ones that change the view would be revised to do what the OP suggests and update the area names widget... ;)

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Update area in dropdown?

Post by Nyyrazzilyss » Sat Jul 04, 2015 3:50 am

If you wouldn't mind considering at the same time you're looking at the code related to the areas listed in the dropdown:

Would it be possible to hide any areas from the list that don't contain any rooms? This would be somewhat related to my hiding (setting area to -1) the majority of the map until discovered, when I move the room to the correct zone. It would still be possible to obtain the information by using getAreaTable().

User avatar
SlySven
Posts: 919
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Update area in dropdown?

Post by SlySven » Sat Jul 04, 2015 1:15 pm

That could be doable, in my opinion, and do you mean just the area selection widget on the mapper control panel or also the widget that comes up when you use the GUI context menu "area" item on a selection of rooms to move them to another area?

I suppose it might be possible to provide a "hide empty areas (on Mapper Area Selector)" check-box on the profile preference dialog - defaulting to SHOW the empty areas. I guess you as a script writer would want to be able to control that via a lua command but we must provide the user the control to change it back to showing if they wanted to (for debugging or any other reason).

I note in passing that I had previously come up with an unpublished modification that put up an icon alongside each area in the mapper area selector that showed whether the area had any rooms and as it ALSO included the default area (which whilst Chris's code that made it into the code base used '-1' as an Id, mine used '0' for that) with a modified icon that also marked it as NOT being deletable as well as whether it had any rooms or not - which could be useful for some users to know if they still have rooms to 'place'. I could drag it back out of the bin and reuse it to hide instead of put a different icon on empty areas...

Raise a bug if this is something that you really, really want and quote this topic - that way we can track this.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Update area in dropdown?

Post by Nyyrazzilyss » Sun Jul 05, 2015 12:52 am

https://bugs.launchpad.net/mudlet/+bug/1471491

Submitted a bug report, though i'm unsure whether it should be considered a bug rather then a cosmetic change.

To be honest I hadn't even considered anything past what the user sees at the top level. Once you're actually going a couple menus down, i'm going to assume you know what you're doing, and if your goal was just to expose the entire map you'll figure out how to do that fairly quickly. I'm more concerned about what you see without clicking on anything.

Thanks :) It's something that would make (my package at least) look much nicer that's (hopefully) relatively minor.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Update area in dropdown?

Post by Nyyrazzilyss » Mon Aug 17, 2015 5:07 pm

I found a way with the existing codebase to hide areas from the dropdown list.

Technically, I hold all rooms in the -1 area until the room is 'discovered'. This means that areas that have never been entered consist entirely of 'undiscovered' rooms, and the area itself has no rooms held in it. That means I don't actually need the area, and if I just delete it, it's not shown in the list by the mapper.

At such time as a room in the area is entered, I can just have the function that moves it from the unassigned area to the 'real' area check that the ''real' area exists, and if not create it (which also adds it to the dropdown list)

Avaloniac
Posts: 13
Joined: Wed Nov 18, 2009 8:40 pm
Location: avalon.mud.de
Contact:

Re: Update area in dropdown?

Post by Avaloniac » Fri Mar 25, 2016 5:37 pm

Progress on the Subject ?

User avatar
SlySven
Posts: 919
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Update area in dropdown?

Post by SlySven » Mon Mar 28, 2016 3:45 am

I'm working in this area at the moment and want to get something into the main repos soon.

Nyyrazzilyss
Posts: 334
Joined: Thu Mar 05, 2015 2:53 am

Re: Update area in dropdown?

Post by Nyyrazzilyss » Mon Apr 25, 2016 10:16 pm

Somewhat related to this one, a question:

When I use the mapper widget to change areas, how does it decide where to center the new display? I'll select some areas and everything centers nicely. Others, it might center the map off at the edge, or off in the middle of empty space.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests