Skip to content

Commit

Permalink
Change the clickable zone
Browse files Browse the repository at this point in the history
  • Loading branch information
r-e-d committed Jan 7, 2023
1 parent a96482b commit 4b26ed5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion EEUITweaks/EEUITweaks.tp2
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ALWAYS
END
END

VERSION ~4.0.3~
VERSION ~4.0.4~

LANGUAGE
~English~ ~EEUITweaks/languages/english~ ~EEUITweaks/languages/english/setup.tra~
Expand Down
2 changes: 1 addition & 1 deletion EEUITweaks/Installation.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EEUITweaks - Version 4.0.3
EEUITweaks - Version 4.0.4

This mod is configured as a WeiDU mod and consists of a setup program
named setup-EEUITweaks.exe and a mod files directory named EEUITweaks.
Expand Down
21 changes: 17 additions & 4 deletions EEUITweaks/include/ClickableDialog.tpa
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
DEFINE_ACTION_MACRO ClickableDialog.PatchAction
BEGIN
LOCAL_SPRINT tempstr $UIMenuIF("Body")
LOCAL_SPRINT adder ~if(#worldPlayerDialogChoices == 0) then worldScreen:StepDialog() end~
LOCAL_SPRINT adder1 ~action%LE%%TAB%%TAB%"%LE%%TAB%%TAB%%TAB%if(#worldPlayerDialogChoices == 0) then Infinity_PlaySound('GAM_09') worldScreen:StepDialog() end%LE%%TAB%%TAB%"~
LOCAL_SPRINT adder2 ~if(#worldPlayerDialogChoices == 0) then worldScreen:StepDialog() end~
LOCAL_SET found = 0

// Put current menu definition into inline file
Expand All @@ -16,15 +17,27 @@ BEGIN

OUTER_SPRINT tempstr ~~

// Look for and patch onopen followed by double quoted code block
// Look for the worldNPCDialog text box and add a clickable action
COPY - ~.../CounterInLine~ ~.../CounterInLine~
REPLACE_EVALUATE CASE_INSENSITIVE ~action%MWHITE%%MDQUOTE%\(%MNOTDQUOTE%*OnDialogReplyClick%MNOTDQUOTE%*\)%MDQUOTE%~
REPLACE_EVALUATE CASE_INSENSITIVE ~text%MWHITE%{\(%MNOBRACE%*name %MDQUOTE%worldNPCDialog%MDQUOTE%%MNOBRACE%*\)}~
BEGIN
SPRINT tempstr ~action%LE%%TAB%%TAB%"%LE%%TAB%%TAB%%TAB%%adder%%MATCH1%"~
SPRINT tempstr ~text%LE%%TAB%{%MATCH1%%TAB%%adder1%%LE%%TAB%}~
SET found = 1
END
~%tempstr%~

// If not found, make the whole text box clickable
ACTION_IF NOT %found% THEN
BEGIN
COPY - ~.../CounterInLine~ ~.../CounterInLine~
REPLACE_EVALUATE CASE_INSENSITIVE ~action%MWHITE%%MDQUOTE%\(%MNOTDQUOTE%*OnDialogReplyClick%MNOTDQUOTE%*\)%MDQUOTE%~
BEGIN
SPRINT tempstr ~action%LE%%TAB%%TAB%"%LE%%TAB%%TAB%%TAB%%adder2%%MATCH1%"~
SET found = 1
END
~%tempstr%~
END

// Not found - give up
ACTION_IF NOT %found% THEN
BEGIN
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# EEUITweaks User Interface Mods Collection Version 4.0.3
# EEUITweaks User Interface Mods Collection Version 4.0.4

The goal of EEUITweaks is to be a collection of the individual UI.MENU (i.e. Extended Edition 2.x+) mods/patches/tweaks from the BeamDog UI Modding forum; packaged as a single WeiDU collection. The advantages are to automate the tedious manual editing of UI.MENU, simplify multiple mod installations (particularly after an update), and to provide a single source from which many EE GUI mods can be accessed. It does NOT install the full UI replacement environments, although it does support modding them.

Expand Down

0 comments on commit 4b26ed5

Please sign in to comment.