mapper background image

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

mapper background image

Post by Nyyrazzilyss »

There was a screenshot in the mapper instructions that showed use of a png as a background image for an entire mapper area. http://wiki.mudlet.org/w/File:MapBackgr ... eLabel.PNG

What would the command be to do that?

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

Re: mapper background image

Post by SlySven »

You want the createMapImageLabel(...) command which has slightly few arguments compared to the textual one createMapLabel(...) or you can use the 2D mapper context menu to create either type of map label "interactively" - though the UI is - IMHO - pretty c**p at present and has very little functionality to modify an existing label if you don't get it right the first time. It is on my to-do list - but not near the top I'm afraid. :(

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

Re: mapper background image

Post by Nyyrazzilyss »

I've tried createMapImageLabel, but it doesn't seem to want to work. The 2D mapper menu on the other hand did properly create a window, so i've got to be doing something wrong with the arguments i'm providing.

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

Re: mapper background image

Post by SlySven »

Yeah, neither of those Lua commands have been touched-up by yours truly and the error information they return is not very helpful - they may not even say which argument was a problem - or give an indication of actually working by returning a true... :shock:

Use the source, Luke, err, Nyyrazzilyss :P - if you have it, looking at the code starting at something like:
int TLuaInterpreter::createMapImageLabel( lua_state * L ) {my spacing my not exactly match but the function name WILL match} in the ./src/TLuaInterpreter.cpp file in the source code (or browse the file on-line in the current development branch at GitHub - the release_30 code will likely be identical in that region - and for compatibility will be functionally at least take the same arguments...)

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

Re: mapper background image

Post by Vadi »

I've tried the example command provided in the wiki for createMapImageLabel() and it did work. Are you trying this with a png?
Attachments
Selection_008.png

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

Re: mapper background image

Post by Nyyrazzilyss »

Thanks, got it to work. I think it had to do with the size I was creating the image. I'd put sizes of 200x200, I took a look at the image and went with actual size/10 (and then it displayed properly) - Now I just have to find correct images/room colours / sizes to use.
Attachments
mapback.png

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

Re: mapper background image

Post by Vadi »

Glad you got it to work.

Makes you think the mapper should have an option of drawing a black text outline around rooms, similar to how you do a black outline around text to make it stand out from the background.

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

Re: mapper background image

Post by Nyyrazzilyss »

I'd just assumed once I find the correct images I was going to need to run them through photoshop filters to make them usable / recolour the rooms to a noticably different colour.

The option to draw a border around rooms would be great.Preferably with a matching set of lua calls that it could be enabled by script.

Oh yes - The room info window. It's white lettering with grey background. Do I have an option to change the colours used?

(edit)

Still playing with attaching images, and something else that should probably go with that is a get/set pairs for zoom level/room size/etc: I'd need to photoshop photos to the 'ideal' size, which is also going to match up with room size/zoom level on the map being at a specific value - The problem though is it's likely to be different area by area.

These are all cosmetic changes though. While it would be nice to see them since they do pair up well with using images with the mapper, they're also not of major short term importance.

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

Re: mapper background image

Post by SlySven »

You do not have the option to change the colours of the room info window - it is put up on a translucent background to allow it to be more clearly seen - it may be that it might want to be a bit more opaque I suppose. As it happens the colour/style of text in the info box in recent code is dependent on:
  • The map background colour (dark backgrounds have white/light orange text, light backgrounds are black/dark orange text)
  • Whether any rooms is/are selected (text is white or black if none is selected - so information is about "current"/player room or light/dark orange if it is about a selected room, and if multiple rooms are selected then it is about the one indicated by the yellow "cross-hairs")
  • Whether the current/selected room is in the currently showing area (the text is bold if it is or italic if it is not, i.e. in a different area).
You might want to try the round room option: the shape used for rooms in that style already have the black edge I think you want - oh, you ARE, humm, I could have sworn they have black edges - or perhaps they do not really show much unless the rooms are a bigger size (5 is around half the full size so the area is only a quarter of the maximum size and if anti-aliasing is being used the effect may be being lost in the blending/compositing).

Are you using the "scaled" option for the image label and does that make a useful difference?

As for getters/setters for zoom/room/exit sizes I can see they might be useful - but you also need to be sure you are in 2D map mode - and I haven't release the code I had put aside somewhere to get/set the map mode and view centre coordinates but those could usefully be combined with them... {Some one eventually might be able to script a map fly-by to show a route or some such things 8-)}

Post Reply