Page 1 of 1

How do I keep the minimap hidden by default? version 0.0.24

Posted: 19 Feb 2008, 05:09
by bigglesworth
Hi! Each time I walk onto a different map, the minimap pops up.

I know I can turn it off with the "F6" key, but how do I turn it off and make it appear only when I want it to?

In the 0.0.24 source, within the file "minimap.cpp", is all I have to do is change...

Code: Select all

void Minimap::setMapImage(Image *img)
{
    if (mMapImage)
    {
        mMapImage->decRef();
    }

    mMapImage = img;

    if (mMapImage)
    {
        setVisible(true);
        mMapImage->setAlpha(0.7);
    }
    else
    {
        setVisible(false);
    }
}
to...

Code: Select all

void Minimap::setMapImage(Image *img)
{
    if (mMapImage)
    {
        mMapImage->decRef();
    }

    mMapImage = img;

    if (mMapImage)
    {
        setVisible(false);
    }
    else
    {
        setVisible(true);
        mMapImage->setAlpha(0.7);
    }
}
to have the minimap off by default?

Re: How do I keep the minimap hidden by default? version 0.0.24

Posted: 19 Feb 2008, 08:12
by ElvenProgrammer
Doesn't seem to be the right way, you could create a mantis ticket and work on a patch

Re: How do I keep the minimap hidden by default? version 0.0.24

Posted: 19 Feb 2008, 12:08
by Crush
When no map image exists you make the nonexisten map image visible and transparent? This should cause a crash when you go to a map without a minimap image.

When you really want to disable the minimap permanently you should just insert the line

Code: Select all

return;
between the lines 71 and 72 of minimap.cpp.

Re: How do I keep the minimap hidden by default? version 0.0.24

Posted: 20 Feb 2008, 08:29
by bigglesworth
I don't think I want to permanently disable the minimap.

ElvenProgrammer, I'll request this through mantis and follow what happens.

Crush, I will try your suggestion, only to see if I desire a minimap at all. If eventually the minimap shows a location that is hidden on the map itself, I will regret it! ;)

Thank you.

Edit: This has mantis id #222. http://mantis.themanaworld.org/view.php?id=222
Right click to open in a new window or tab.

Re: How do I keep the minimap hidden by default? version 0.0.24

Posted: 25 Feb 2008, 04:42
by knivey
I would suggest changing the following in minimap.cpp

Code: Select all

    if (mMapImage)
    {
        setVisible(true);
        mMapImage->setAlpha(0.7);
    }
    else
    {
        setVisible(false);
    }
to this...

Code: Select all

    if (mMapImage)
    {
        mMapImage->setAlpha(0.7);
    }
this should keep the map from reappearing when a new mapimage loads and shouldn't affect users who prefer to see the minimap
if you're on a map that has no minimap image then it just shows the map square with no map

if you want to make it real sophisticated you could use the configuration class to store your preference on it being shown

Re: How do I keep the minimap hidden by default? version 0.0.24

Posted: 25 Feb 2008, 10:14
by ElvenProgrammer
@knivey: could you make your changes in the from of a patch and submit it to our bug tracker? http://mantis.themanaworld.org/view.php?id=222

Actually some base code for keeping the status of gui windows is there, whoever wants to improve it and apply it also to the minimap window is welcome.