Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion game/ui/dialogmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ DialogMenu::~DialogMenu() {
void DialogMenu::setupSettings() {
dlgAnimation = Gothic::settingsGetI("GAME","animatedWindows");
showSubtitles = Gothic::settingsGetI("GAME","subTitles");
showSubtitlesAmbient = Gothic::settingsGetI("GAME","subTitlesAmbient");
showSubtitlesPlayer = Gothic::settingsGetI("GAME","subTitlesPlayer");
showSubtitlesNoise = Gothic::settingsGetI("GAME","subTitlesNoise");
}

void DialogMenu::tick(uint64_t dt) {
Expand Down Expand Up @@ -374,7 +376,30 @@ bool DialogMenu::haveToWaitOutput() const {
}

bool DialogMenu::haveToShowSubtitles(bool isPl) const {
return showSubtitles && (showSubtitlesPlayer || !isPl);
if(!showSubtitles){
return false;
}
if(isPl){
return showSubtitlesPlayer;
} else if(other != nullptr) {
switch (other.processPolicy()) {
case(ProcessPolicy::AiNormal):
return showSubtitlesAmbient;

case(ProcessPolicy::AiFar):
case(ProcessPolicy::AiFar2):
return showSubtitlesNoise;

case(ProcessPolicy::Player):
// since other is the player, this is considered player subtitles again
return showSubtitlesPlayer;

case default:
return false;
}
} else {
return false;
}
}

void DialogMenu::startTrade() {
Expand Down
10 changes: 6 additions & 4 deletions game/ui/dialogmenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ class DialogMenu : public Tempest::Widget {
PScreen printMsg[MAX_PRINT];
uint64_t remPrint=0;

bool dlgAnimation = true;
bool showSubtitles = true;
bool showSubtitlesPlayer = true;
uint64_t choiceAnimTime = 0;
bool dlgAnimation = true;
bool showSubtitles = true;
bool showSubtitlesAmbient = true;
bool showSubtitlesPlayer = true;
bool showSubtitlesNoise = false;
uint64_t choiceAnimTime = 0;
};