mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
improve dialogue window performance
This commit is contained in:
parent
8feb495d17
commit
d7aa2a882d
9 changed files with 134 additions and 52 deletions
|
@ -72,6 +72,8 @@ namespace MWGui
|
||||||
ShowInDialogueMode_Only,
|
ShowInDialogueMode_Only,
|
||||||
ShowInDialogueMode_Never
|
ShowInDialogueMode_Never
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct TextColours;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace SFO
|
namespace SFO
|
||||||
|
@ -361,6 +363,8 @@ namespace MWBase
|
||||||
|
|
||||||
virtual void removeCell(MWWorld::CellStore* cell) = 0;
|
virtual void removeCell(MWWorld::CellStore* cell) = 0;
|
||||||
virtual void writeFog(MWWorld::CellStore* cell) = 0;
|
virtual void writeFog(MWWorld::CellStore* cell) = 0;
|
||||||
|
|
||||||
|
virtual const MWGui::TextColours& getTextColours() = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,22 +35,22 @@ struct TypesetBookImpl : TypesetBook
|
||||||
MyGUI::Colour mNormalColour;
|
MyGUI::Colour mNormalColour;
|
||||||
InteractiveId mInteractiveId;
|
InteractiveId mInteractiveId;
|
||||||
|
|
||||||
bool match (MyGUI::IFont* tstFont, MyGUI::Colour tstHotColour, MyGUI::Colour tstActiveColour,
|
bool match (MyGUI::IFont* tstFont, const MyGUI::Colour& tstHotColour, const MyGUI::Colour& tstActiveColour,
|
||||||
MyGUI::Colour tstNormalColour, intptr_t tstInteractiveId)
|
const MyGUI::Colour& tstNormalColour, intptr_t tstInteractiveId)
|
||||||
{
|
{
|
||||||
return (mFont == tstFont) &&
|
return (mFont == tstFont) &&
|
||||||
partal_match (tstHotColour, tstActiveColour, tstNormalColour, tstInteractiveId);
|
partal_match (tstHotColour, tstActiveColour, tstNormalColour, tstInteractiveId);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool match (char const * tstFont, MyGUI::Colour tstHotColour, MyGUI::Colour tstActiveColour,
|
bool match (char const * tstFont, const MyGUI::Colour& tstHotColour, const MyGUI::Colour& tstActiveColour,
|
||||||
MyGUI::Colour tstNormalColour, intptr_t tstInteractiveId)
|
const MyGUI::Colour& tstNormalColour, intptr_t tstInteractiveId)
|
||||||
{
|
{
|
||||||
return (mFont->getResourceName () == tstFont) &&
|
return (mFont->getResourceName () == tstFont) &&
|
||||||
partal_match (tstHotColour, tstActiveColour, tstNormalColour, tstInteractiveId);
|
partal_match (tstHotColour, tstActiveColour, tstNormalColour, tstInteractiveId);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool partal_match (MyGUI::Colour tstHotColour, MyGUI::Colour tstActiveColour,
|
bool partal_match (const MyGUI::Colour& tstHotColour, const MyGUI::Colour& tstActiveColour,
|
||||||
MyGUI::Colour tstNormalColour, intptr_t tstInteractiveId)
|
const MyGUI::Colour& tstNormalColour, intptr_t tstInteractiveId)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
(mHotColour == tstHotColour ) &&
|
(mHotColour == tstHotColour ) &&
|
||||||
|
@ -261,7 +261,7 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Style * createStyle (char const * fontName, Colour fontColour)
|
Style * createStyle (char const * fontName, const Colour& fontColour)
|
||||||
{
|
{
|
||||||
if (strcmp(fontName, "") == 0)
|
if (strcmp(fontName, "") == 0)
|
||||||
return createStyle(MyGUI::FontManager::getInstance().getDefaultFont().c_str(), fontColour);
|
return createStyle(MyGUI::FontManager::getInstance().getDefaultFont().c_str(), fontColour);
|
||||||
|
@ -284,7 +284,8 @@ struct TypesetBookImpl::Typesetter : BookTypesetter
|
||||||
return &style;
|
return &style;
|
||||||
}
|
}
|
||||||
|
|
||||||
Style* createHotStyle (Style* baseStyle, Colour normalColour, Colour hoverColour, Colour activeColour, InteractiveId id, bool unique)
|
Style* createHotStyle (Style* baseStyle, const Colour& normalColour, const Colour& hoverColour,
|
||||||
|
const Colour& activeColour, InteractiveId id, bool unique)
|
||||||
{
|
{
|
||||||
StyleImpl* BaseStyle = static_cast <StyleImpl*> (baseStyle);
|
StyleImpl* BaseStyle = static_cast <StyleImpl*> (baseStyle);
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,9 @@ namespace MWGui
|
||||||
typedef uint8_t const * Utf8Point;
|
typedef uint8_t const * Utf8Point;
|
||||||
typedef std::pair <Utf8Point, Utf8Point> Utf8Span;
|
typedef std::pair <Utf8Point, Utf8Point> Utf8Span;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
enum Alignment {
|
enum Alignment {
|
||||||
AlignLeft = -1,
|
AlignLeft = -1,
|
||||||
AlignCenter = 0,
|
AlignCenter = 0,
|
||||||
|
@ -53,12 +56,13 @@ namespace MWGui
|
||||||
static Ptr create (int pageWidth, int pageHeight);
|
static Ptr create (int pageWidth, int pageHeight);
|
||||||
|
|
||||||
/// Create a simple text style consisting of a font and a text color.
|
/// Create a simple text style consisting of a font and a text color.
|
||||||
virtual Style* createStyle (char const * Font, Colour Colour) = 0;
|
virtual Style* createStyle (char const * Font, const Colour& Colour) = 0;
|
||||||
|
|
||||||
/// Create a hyper-link style with a user-defined identifier based on an
|
/// Create a hyper-link style with a user-defined identifier based on an
|
||||||
/// existing style. The unique flag forces a new instance of this style
|
/// existing style. The unique flag forces a new instance of this style
|
||||||
/// to be created even if an existing instance is present.
|
/// to be created even if an existing instance is present.
|
||||||
virtual Style* createHotStyle (Style * BaseStyle, Colour NormalColour, Colour HoverColour, Colour ActiveColour, InteractiveId Id, bool Unique = true) = 0;
|
virtual Style* createHotStyle (Style * BaseStyle, const Colour& NormalColour, const Colour& HoverColour,
|
||||||
|
const Colour& ActiveColour, InteractiveId Id, bool Unique = true) = 0;
|
||||||
|
|
||||||
/// Insert a line break into the document. Newline characters in the input
|
/// Insert a line break into the document. Newline characters in the input
|
||||||
/// text have the same affect. The margin parameter adds additional space
|
/// text have the same affect. The margin parameter adds additional space
|
||||||
|
|
|
@ -22,19 +22,10 @@
|
||||||
|
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
#include "bookpage.hpp"
|
#include "bookpage.hpp"
|
||||||
|
#include "textcolours.hpp"
|
||||||
|
|
||||||
#include "journalbooks.hpp" // to_utf8_span
|
#include "journalbooks.hpp" // to_utf8_span
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
|
|
||||||
MyGUI::Colour getDialogueTextColour (const std::string& type)
|
|
||||||
{
|
|
||||||
return MyGUI::Colour::parse(MyGUI::LanguageManager::getInstance().replaceTags("#{fontcolour=" + type + "}"));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -116,7 +107,8 @@ namespace MWGui
|
||||||
|
|
||||||
if (mTitle != "")
|
if (mTitle != "")
|
||||||
{
|
{
|
||||||
BookTypesetter::Style* title = typesetter->createStyle("", getDialogueTextColour("header"));
|
const MyGUI::Colour& headerColour = MWBase::Environment::get().getWindowManager()->getTextColours().header;
|
||||||
|
BookTypesetter::Style* title = typesetter->createStyle("", headerColour);
|
||||||
typesetter->write(title, to_utf8_span(mTitle.c_str()));
|
typesetter->write(title, to_utf8_span(mTitle.c_str()));
|
||||||
typesetter->sectionBreak();
|
typesetter->sectionBreak();
|
||||||
}
|
}
|
||||||
|
@ -159,15 +151,16 @@ namespace MWGui
|
||||||
|
|
||||||
if (hyperLinks.size() && MWBase::Environment::get().getWindowManager()->getTranslationDataStorage().hasTranslation())
|
if (hyperLinks.size() && MWBase::Environment::get().getWindowManager()->getTranslationDataStorage().hasTranslation())
|
||||||
{
|
{
|
||||||
BookTypesetter::Style* style = typesetter->createStyle("", getDialogueTextColour("normal"));
|
const TextColours& textColours = MWBase::Environment::get().getWindowManager()->getTextColours();
|
||||||
|
|
||||||
|
BookTypesetter::Style* style = typesetter->createStyle("", textColours.normal);
|
||||||
size_t formatted = 0; // points to the first character that is not laid out yet
|
size_t formatted = 0; // points to the first character that is not laid out yet
|
||||||
for (std::map<Range, intptr_t>::iterator it = hyperLinks.begin(); it != hyperLinks.end(); ++it)
|
for (std::map<Range, intptr_t>::iterator it = hyperLinks.begin(); it != hyperLinks.end(); ++it)
|
||||||
{
|
{
|
||||||
intptr_t topicId = it->second;
|
intptr_t topicId = it->second;
|
||||||
const MyGUI::Colour linkHot(getDialogueTextColour("link_over"));
|
BookTypesetter::Style* hotStyle = typesetter->createHotStyle (style, textColours.link,
|
||||||
const MyGUI::Colour linkNormal(getDialogueTextColour("link"));
|
textColours.linkOver, textColours.linkPressed,
|
||||||
const MyGUI::Colour linkActive(getDialogueTextColour("link_pressed"));
|
topicId);
|
||||||
BookTypesetter::Style* hotStyle = typesetter->createHotStyle (style, linkNormal, linkHot, linkActive, topicId);
|
|
||||||
if (formatted < it->first.first)
|
if (formatted < it->first.first)
|
||||||
typesetter->write(style, formatted, it->first.first);
|
typesetter->write(style, formatted, it->first.first);
|
||||||
typesetter->write(hotStyle, it->first.first, it->first.second);
|
typesetter->write(hotStyle, it->first.first, it->first.second);
|
||||||
|
@ -199,14 +192,13 @@ namespace MWGui
|
||||||
|
|
||||||
void Response::addTopicLink(BookTypesetter::Ptr typesetter, intptr_t topicId, size_t begin, size_t end) const
|
void Response::addTopicLink(BookTypesetter::Ptr typesetter, intptr_t topicId, size_t begin, size_t end) const
|
||||||
{
|
{
|
||||||
BookTypesetter::Style* style = typesetter->createStyle("", getDialogueTextColour("normal"));
|
const TextColours& textColours = MWBase::Environment::get().getWindowManager()->getTextColours();
|
||||||
|
|
||||||
|
BookTypesetter::Style* style = typesetter->createStyle("", textColours.normal);
|
||||||
|
|
||||||
const MyGUI::Colour linkHot(getDialogueTextColour("link_over"));
|
|
||||||
const MyGUI::Colour linkNormal(getDialogueTextColour("link"));
|
|
||||||
const MyGUI::Colour linkActive(getDialogueTextColour("link_pressed"));
|
|
||||||
|
|
||||||
if (topicId)
|
if (topicId)
|
||||||
style = typesetter->createHotStyle (style, linkNormal, linkHot, linkActive, topicId);
|
style = typesetter->createHotStyle (style, textColours.link, textColours.linkOver, textColours.linkPressed, topicId);
|
||||||
typesetter->write (style, begin, end);
|
typesetter->write (style, begin, end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +209,8 @@ namespace MWGui
|
||||||
|
|
||||||
void Message::write(BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map<std::string, Link*>& topicLinks) const
|
void Message::write(BookTypesetter::Ptr typesetter, KeywordSearchT* keywordSearch, std::map<std::string, Link*>& topicLinks) const
|
||||||
{
|
{
|
||||||
BookTypesetter::Style* title = typesetter->createStyle("", getDialogueTextColour("notify"));
|
const MyGUI::Colour& textColour = MWBase::Environment::get().getWindowManager()->getTextColours().notify;
|
||||||
|
BookTypesetter::Style* title = typesetter->createStyle("", textColour);
|
||||||
typesetter->sectionBreak(9);
|
typesetter->sectionBreak(9);
|
||||||
typesetter->write(title, to_utf8_span(mText.c_str()));
|
typesetter->write(title, to_utf8_span(mText.c_str()));
|
||||||
}
|
}
|
||||||
|
@ -300,8 +293,12 @@ namespace MWGui
|
||||||
|
|
||||||
void DialogueWindow::onWindowResize(MyGUI::Window* _sender)
|
void DialogueWindow::onWindowResize(MyGUI::Window* _sender)
|
||||||
{
|
{
|
||||||
|
// if the window has only been moved, not resized, we don't need to update
|
||||||
|
if (mCurrentWindowSize == _sender->getSize()) return;
|
||||||
|
|
||||||
mTopicsList->adjustSize();
|
mTopicsList->adjustSize();
|
||||||
updateHistory();
|
updateHistory();
|
||||||
|
mCurrentWindowSize = _sender->getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
void DialogueWindow::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
||||||
|
@ -486,16 +483,15 @@ namespace MWGui
|
||||||
|
|
||||||
typesetter->sectionBreak(9);
|
typesetter->sectionBreak(9);
|
||||||
// choices
|
// choices
|
||||||
const MyGUI::Colour linkHot(getDialogueTextColour("answer_over"));
|
const TextColours& textColours = MWBase::Environment::get().getWindowManager()->getTextColours();
|
||||||
const MyGUI::Colour linkNormal(getDialogueTextColour("answer"));
|
|
||||||
const MyGUI::Colour linkActive(getDialogueTextColour("answer_pressed"));
|
|
||||||
for (std::vector<std::pair<std::string, int> >::iterator it = mChoices.begin(); it != mChoices.end(); ++it)
|
for (std::vector<std::pair<std::string, int> >::iterator it = mChoices.begin(); it != mChoices.end(); ++it)
|
||||||
{
|
{
|
||||||
Choice* link = new Choice(it->second);
|
Choice* link = new Choice(it->second);
|
||||||
mLinks.push_back(link);
|
mLinks.push_back(link);
|
||||||
|
|
||||||
typesetter->lineBreak();
|
typesetter->lineBreak();
|
||||||
BookTypesetter::Style* questionStyle = typesetter->createHotStyle(body, linkNormal, linkHot, linkActive,
|
BookTypesetter::Style* questionStyle = typesetter->createHotStyle(body, textColours.answer, textColours.answerOver,
|
||||||
|
textColours.answerPressed,
|
||||||
TypesetBook::InteractiveId(link));
|
TypesetBook::InteractiveId(link));
|
||||||
typesetter->write(questionStyle, to_utf8_span(it->first.c_str()));
|
typesetter->write(questionStyle, to_utf8_span(it->first.c_str()));
|
||||||
}
|
}
|
||||||
|
@ -505,7 +501,8 @@ namespace MWGui
|
||||||
Goodbye* link = new Goodbye();
|
Goodbye* link = new Goodbye();
|
||||||
mLinks.push_back(link);
|
mLinks.push_back(link);
|
||||||
std::string goodbye = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("sGoodbye")->getString();
|
std::string goodbye = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("sGoodbye")->getString();
|
||||||
BookTypesetter::Style* questionStyle = typesetter->createHotStyle(body, linkNormal, linkHot, linkActive,
|
BookTypesetter::Style* questionStyle = typesetter->createHotStyle(body, textColours.answer, textColours.answerOver,
|
||||||
|
textColours.answerPressed,
|
||||||
TypesetBook::InteractiveId(link));
|
TypesetBook::InteractiveId(link));
|
||||||
typesetter->lineBreak();
|
typesetter->lineBreak();
|
||||||
typesetter->write(questionStyle, to_utf8_span(goodbye.c_str()));
|
typesetter->write(questionStyle, to_utf8_span(goodbye.c_str()));
|
||||||
|
|
|
@ -171,6 +171,8 @@ namespace MWGui
|
||||||
MyGUI::TextBox* mDispositionText;
|
MyGUI::TextBox* mDispositionText;
|
||||||
|
|
||||||
PersuasionDialog mPersuasionDialog;
|
PersuasionDialog mPersuasionDialog;
|
||||||
|
|
||||||
|
MyGUI::IntSize mCurrentWindowSize;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2,13 +2,14 @@
|
||||||
|
|
||||||
#include <MyGUI_LanguageManager.h>
|
#include <MyGUI_LanguageManager.h>
|
||||||
|
|
||||||
|
#include "../mwbase/environment.hpp"
|
||||||
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
|
||||||
|
#include "textcolours.hpp"
|
||||||
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
MyGUI::Colour getTextColour (const std::string& type)
|
|
||||||
{
|
|
||||||
return MyGUI::Colour::parse(MyGUI::LanguageManager::getInstance().replaceTags("#{fontcolour=" + type + "}"));
|
|
||||||
}
|
|
||||||
|
|
||||||
struct AddContent
|
struct AddContent
|
||||||
{
|
{
|
||||||
MWGui::BookTypesetter::Ptr mTypesetter;
|
MWGui::BookTypesetter::Ptr mTypesetter;
|
||||||
|
@ -31,12 +32,10 @@ namespace
|
||||||
{
|
{
|
||||||
MWGui::BookTypesetter::Style* style = mBodyStyle;
|
MWGui::BookTypesetter::Style* style = mBodyStyle;
|
||||||
|
|
||||||
static const MyGUI::Colour linkHot (getTextColour("journal_link_over"));
|
const MWGui::TextColours& textColours = MWBase::Environment::get().getWindowManager()->getTextColours();
|
||||||
static const MyGUI::Colour linkNormal (getTextColour("journal_link"));
|
|
||||||
static const MyGUI::Colour linkActive (getTextColour("journal_link_pressed"));
|
|
||||||
|
|
||||||
if (topicId)
|
if (topicId)
|
||||||
style = mTypesetter->createHotStyle (mBodyStyle, linkNormal, linkHot, linkActive, topicId);
|
style = mTypesetter->createHotStyle (mBodyStyle, textColours.journalLink, textColours.journalLinkOver,
|
||||||
|
textColours.journalLinkPressed, topicId);
|
||||||
|
|
||||||
mTypesetter->write (style, begin, end);
|
mTypesetter->write (style, begin, end);
|
||||||
}
|
}
|
||||||
|
@ -233,11 +232,10 @@ book JournalBooks::createTopicIndexBook ()
|
||||||
|
|
||||||
sprintf (buffer, "( %c )", ch);
|
sprintf (buffer, "( %c )", ch);
|
||||||
|
|
||||||
MyGUI::Colour linkHot (getTextColour("journal_topic_over"));
|
const MWGui::TextColours& textColours = MWBase::Environment::get().getWindowManager()->getTextColours();
|
||||||
MyGUI::Colour linkActive (getTextColour("journal_topic_pressed"));
|
BookTypesetter::Style* style = typesetter->createHotStyle (body, textColours.journalTopic,
|
||||||
MyGUI::Colour linkNormal (getTextColour("journal_topic"));
|
textColours.journalTopicOver,
|
||||||
|
textColours.journalTopicPressed, ch);
|
||||||
BookTypesetter::Style* style = typesetter->createHotStyle (body, linkNormal, linkHot, linkActive, ch);
|
|
||||||
|
|
||||||
if (i == 13)
|
if (i == 13)
|
||||||
typesetter->sectionBreak ();
|
typesetter->sectionBreak ();
|
||||||
|
|
35
apps/openmw/mwgui/textcolours.hpp
Normal file
35
apps/openmw/mwgui/textcolours.hpp
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#ifndef MWGUI_TEXTCOLORS_H
|
||||||
|
#define MWGUI_TEXTCOLORS_H
|
||||||
|
|
||||||
|
#include <MyGUI_Colour.h>
|
||||||
|
|
||||||
|
namespace MWGui
|
||||||
|
{
|
||||||
|
|
||||||
|
struct TextColours
|
||||||
|
{
|
||||||
|
MyGUI::Colour header;
|
||||||
|
MyGUI::Colour normal;
|
||||||
|
MyGUI::Colour notify;
|
||||||
|
|
||||||
|
|
||||||
|
MyGUI::Colour link;
|
||||||
|
MyGUI::Colour linkOver;
|
||||||
|
MyGUI::Colour linkPressed;
|
||||||
|
|
||||||
|
MyGUI::Colour answer;
|
||||||
|
MyGUI::Colour answerOver;
|
||||||
|
MyGUI::Colour answerPressed;
|
||||||
|
|
||||||
|
MyGUI::Colour journalLink;
|
||||||
|
MyGUI::Colour journalLinkOver;
|
||||||
|
MyGUI::Colour journalLinkPressed;
|
||||||
|
|
||||||
|
MyGUI::Colour journalTopic;
|
||||||
|
MyGUI::Colour journalTopicOver;
|
||||||
|
MyGUI::Colour journalTopicPressed;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -113,6 +113,16 @@
|
||||||
#include "jailscreen.hpp"
|
#include "jailscreen.hpp"
|
||||||
#include "itemchargeview.hpp"
|
#include "itemchargeview.hpp"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
MyGUI::Colour getTextColour(const std::string& type)
|
||||||
|
{
|
||||||
|
return MyGUI::Colour::parse(MyGUI::LanguageManager::getInstance().replaceTags("#{fontcolour=" + type + "}"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -283,6 +293,27 @@ namespace MWGui
|
||||||
int w = MyGUI::RenderManager::getInstance().getViewSize().width;
|
int w = MyGUI::RenderManager::getInstance().getViewSize().width;
|
||||||
int h = MyGUI::RenderManager::getInstance().getViewSize().height;
|
int h = MyGUI::RenderManager::getInstance().getViewSize().height;
|
||||||
|
|
||||||
|
mTextColours.header = getTextColour("header");
|
||||||
|
mTextColours.normal = getTextColour("normal");
|
||||||
|
mTextColours.notify = getTextColour("notify");
|
||||||
|
|
||||||
|
mTextColours.link = getTextColour("link");
|
||||||
|
mTextColours.linkOver = getTextColour("link_over");
|
||||||
|
mTextColours.linkPressed = getTextColour("link_pressed");
|
||||||
|
|
||||||
|
mTextColours.answer = getTextColour("answer");
|
||||||
|
mTextColours.answerOver = getTextColour("answer_over");
|
||||||
|
mTextColours.answerPressed = getTextColour("answer_pressed");
|
||||||
|
|
||||||
|
mTextColours.journalLink = getTextColour("journal_link");
|
||||||
|
mTextColours.journalLinkOver = getTextColour("journal_link_over");
|
||||||
|
mTextColours.journalLinkPressed = getTextColour("journal_link_pressed");
|
||||||
|
|
||||||
|
mTextColours.journalTopic = getTextColour("journal_topic");
|
||||||
|
mTextColours.journalTopicOver = getTextColour("journal_topic_over");
|
||||||
|
mTextColours.journalTopicPressed = getTextColour("journal_topic_pressed");
|
||||||
|
|
||||||
|
|
||||||
mDragAndDrop = new DragAndDrop();
|
mDragAndDrop = new DragAndDrop();
|
||||||
|
|
||||||
mRecharge = new Recharge();
|
mRecharge = new Recharge();
|
||||||
|
@ -2138,4 +2169,9 @@ namespace MWGui
|
||||||
mLocalMapRender->saveFogOfWar(cell);
|
mLocalMapRender->saveFogOfWar(cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const MWGui::TextColours& WindowManager::getTextColours()
|
||||||
|
{
|
||||||
|
return mTextColours;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include <components/to_utf8/to_utf8.hpp>
|
#include <components/to_utf8/to_utf8.hpp>
|
||||||
|
|
||||||
#include "mapwindow.hpp"
|
#include "mapwindow.hpp"
|
||||||
|
#include "textcolours.hpp"
|
||||||
|
|
||||||
#include <MyGUI_KeyCode.h>
|
#include <MyGUI_KeyCode.h>
|
||||||
#include <MyGUI_Types.h>
|
#include <MyGUI_Types.h>
|
||||||
|
@ -391,6 +392,8 @@ namespace MWGui
|
||||||
void removeCell(MWWorld::CellStore* cell);
|
void removeCell(MWWorld::CellStore* cell);
|
||||||
void writeFog(MWWorld::CellStore* cell);
|
void writeFog(MWWorld::CellStore* cell);
|
||||||
|
|
||||||
|
virtual const MWGui::TextColours& getTextColours();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const MWWorld::ESMStore* mStore;
|
const MWWorld::ESMStore* mStore;
|
||||||
Resource::ResourceSystem* mResourceSystem;
|
Resource::ResourceSystem* mResourceSystem;
|
||||||
|
@ -514,6 +517,8 @@ namespace MWGui
|
||||||
|
|
||||||
std::string mVersionDescription;
|
std::string mVersionDescription;
|
||||||
|
|
||||||
|
MWGui::TextColours mTextColours;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when MyGUI tries to retrieve a tag's value. Tags must be denoted in #{tag} notation and will be replaced upon setting a user visible text/property.
|
* Called when MyGUI tries to retrieve a tag's value. Tags must be denoted in #{tag} notation and will be replaced upon setting a user visible text/property.
|
||||||
* Supported syntax:
|
* Supported syntax:
|
||||||
|
|
Loading…
Reference in a new issue