Skip to content

Commit

Permalink
WINTERMUTE: Add FoxTail dialogues UI hack
Browse files Browse the repository at this point in the history
FoxTail fork of WME seems to have hard-coded modifications for dialogue UI.
Buttons are ignoring hover-font and pressed-font settings.
Buttons also have hard-coded-path scripts attached to them.
  • Loading branch information
lolbot-iichan committed Aug 26, 2018
1 parent 547a756 commit a4f0b65
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions engines/wintermute/ad/ad_response_box.cpp
Expand Up @@ -29,6 +29,7 @@
#include "engines/wintermute/ad/ad_game.h" #include "engines/wintermute/ad/ad_game.h"
#include "engines/wintermute/ad/ad_response.h" #include "engines/wintermute/ad/ad_response.h"
#include "engines/wintermute/ad/ad_response_box.h" #include "engines/wintermute/ad/ad_response_box.h"
#include "engines/wintermute/base/base_engine.h"
#include "engines/wintermute/base/base_dynamic_buffer.h" #include "engines/wintermute/base/base_dynamic_buffer.h"
#include "engines/wintermute/base/base_file_manager.h" #include "engines/wintermute/base/base_file_manager.h"
#include "engines/wintermute/base/base_parser.h" #include "engines/wintermute/base/base_parser.h"
Expand Down Expand Up @@ -143,6 +144,11 @@ bool AdResponseBox::createButtons() {
btn->_parent = _window; btn->_parent = _window;
btn->setSharedFonts(true); btn->setSharedFonts(true);
btn->setSharedImages(true); btn->setSharedImages(true);
#ifdef ENABLE_FOXTAIL
if (BaseEngine::instance().getGameId() == "foxtail") {
btn->addScript("interface/scripts/dialogue_button.script");
}
#endif
btn->_sharedCursors = true; btn->_sharedCursors = true;
// iconic // iconic
if (_responses[i]->getIcon()) { if (_responses[i]->getIcon()) {
Expand Down Expand Up @@ -182,6 +188,13 @@ bool AdResponseBox::createButtons() {
btn->setFont(_responses[i]->getFont()); btn->setFont(_responses[i]->getFont());
} }


#ifdef ENABLE_FOXTAIL
if (BaseEngine::instance().getGameId() == "foxtail") {
btn->setFontHover(btn->getFont());
btn->setFontPress(btn->getFont());
}
#endif

int width = _responseArea.right - _responseArea.left; int width = _responseArea.right - _responseArea.left;


if (width <= 0) { if (width <= 0) {
Expand Down

0 comments on commit a4f0b65

Please sign in to comment.