Permalink
Browse files

WINTERMUTE: Add FoxTail dialogues UI hack

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 a4f0b65b550d8e4ffa3e8a885e955d8a582c1ba1
Showing with 13 additions and 0 deletions.
  1. +13 −0 engines/wintermute/ad/ad_response_box.cpp
@@ -29,6 +29,7 @@
#include "engines/wintermute/ad/ad_game.h"
#include "engines/wintermute/ad/ad_response.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_file_manager.h"
#include "engines/wintermute/base/base_parser.h"
@@ -143,6 +144,11 @@ bool AdResponseBox::createButtons() {
btn->_parent = _window;
btn->setSharedFonts(true);
btn->setSharedImages(true);
#ifdef ENABLE_FOXTAIL
if (BaseEngine::instance().getGameId() == "foxtail") {
btn->addScript("interface/scripts/dialogue_button.script");
}
#endif
btn->_sharedCursors = true;
// iconic
if (_responses[i]->getIcon()) {
@@ -182,6 +188,13 @@ bool AdResponseBox::createButtons() {
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;

if (width <= 0) {

0 comments on commit a4f0b65

Please sign in to comment.