forked from teamnwah/openmw-tes3coop
Disable fog of war rendering on the HUD map by default
This commit is contained in:
parent
ca4e859f61
commit
ef20962fc5
4 changed files with 14 additions and 8 deletions
|
@ -69,7 +69,7 @@ namespace MWGui
|
|||
|
||||
HUD::HUD(CustomMarkerCollection &customMarkers, DragAndDrop* dragAndDrop, MWRender::LocalMap* localMapRender)
|
||||
: Layout("openmw_hud.layout")
|
||||
, LocalMapBase(customMarkers, localMapRender)
|
||||
, LocalMapBase(customMarkers, localMapRender, Settings::Manager::getBool("local map hud fog of war", "Map"))
|
||||
, mHealth(NULL)
|
||||
, mMagicka(NULL)
|
||||
, mStamina(NULL)
|
||||
|
|
|
@ -156,7 +156,7 @@ namespace MWGui
|
|||
|
||||
// ------------------------------------------------------
|
||||
|
||||
LocalMapBase::LocalMapBase(CustomMarkerCollection &markers, MWRender::LocalMap* localMapRender)
|
||||
LocalMapBase::LocalMapBase(CustomMarkerCollection &markers, MWRender::LocalMap* localMapRender, bool fogOfWarEnabled)
|
||||
: mLocalMapRender(localMapRender)
|
||||
, mCurX(0)
|
||||
, mCurY(0)
|
||||
|
@ -165,7 +165,8 @@ namespace MWGui
|
|||
, mCompass(NULL)
|
||||
, mPrefix()
|
||||
, mChanged(true)
|
||||
, mFogOfWar(true)
|
||||
, mFogOfWarToggled(true)
|
||||
, mFogOfWarEnabled(fogOfWarEnabled)
|
||||
, mMapWidgetSize(0)
|
||||
, mCustomMarkers(markers)
|
||||
, mMarkerUpdateTimer(0.0f)
|
||||
|
@ -222,9 +223,9 @@ namespace MWGui
|
|||
|
||||
bool LocalMapBase::toggleFogOfWar()
|
||||
{
|
||||
mFogOfWar = !mFogOfWar;
|
||||
mFogOfWarToggled = !mFogOfWarToggled;
|
||||
applyFogOfWar();
|
||||
return mFogOfWar;
|
||||
return mFogOfWarToggled;
|
||||
}
|
||||
|
||||
void LocalMapBase::applyFogOfWar()
|
||||
|
@ -238,7 +239,7 @@ namespace MWGui
|
|||
int y = mCurY + (-1*(my-1));
|
||||
MyGUI::ImageBox* fog = mFogWidgets[my + 3*mx];
|
||||
|
||||
if (!mFogOfWar)
|
||||
if (!mFogOfWarToggled || !mFogOfWarEnabled)
|
||||
{
|
||||
fog->setImageTexture("");
|
||||
continue;
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace MWGui
|
|||
class LocalMapBase
|
||||
{
|
||||
public:
|
||||
LocalMapBase(CustomMarkerCollection& markers, MWRender::LocalMap* localMapRender);
|
||||
LocalMapBase(CustomMarkerCollection& markers, MWRender::LocalMap* localMapRender, bool fogOfWarEnabled = true);
|
||||
virtual ~LocalMapBase();
|
||||
void init(MyGUI::ScrollView* widget, MyGUI::ImageBox* compass, int mapWidgetSize);
|
||||
|
||||
|
@ -105,7 +105,8 @@ namespace MWGui
|
|||
MyGUI::ImageBox* mCompass;
|
||||
std::string mPrefix;
|
||||
bool mChanged;
|
||||
bool mFogOfWar;
|
||||
bool mFogOfWarToggled;
|
||||
bool mFogOfWarEnabled;
|
||||
|
||||
int mMapWidgetSize;
|
||||
|
||||
|
|
|
@ -47,6 +47,10 @@ global map cell size = 18
|
|||
# cell, 256 is 1/8 cell. See documentation for details. (e.g. 64 to 256).
|
||||
local map hud widget size = 256
|
||||
|
||||
# Enables Fog of War rendering on the HUD map. Default is Off since with default settings
|
||||
# the map is so small that the fog would not obscure anything, just darken the edges slightly.
|
||||
local map hud fog of war = false
|
||||
|
||||
# Resolution of local map in GUI window in pixels. See documentation
|
||||
# for details which may affect cell load performance. (e.g. 128 to 1024).
|
||||
local map resolution = 256
|
||||
|
|
Loading…
Reference in a new issue