Improve precision of dialogue box confirm/canceling
This commit is contained in:
parent
391b7628c9
commit
838d276820
|
@ -631,11 +631,12 @@ Strategies.functions = {
|
|||
return interact(data.dir, data.long)
|
||||
end,
|
||||
|
||||
confirm = function(data)
|
||||
dialogue = function(data)
|
||||
if Battle.handleWild() then
|
||||
if Textbox.isActive() then
|
||||
status.talked = true
|
||||
Input.cancel(data.type or "A")
|
||||
if Input.cancel(data.decline and "B" or "A") then
|
||||
status.talked = true
|
||||
end
|
||||
else
|
||||
if status.talked then
|
||||
return true
|
||||
|
@ -1981,7 +1982,7 @@ Strategies.functions = {
|
|||
end
|
||||
Bridge.chat("is taking the Center to heal for Lorelei.")
|
||||
end
|
||||
return strategyFunctions.confirm({dir="Up"})
|
||||
return strategyFunctions.dialogue({dir="Up"})
|
||||
end,
|
||||
|
||||
prepareForLance = function()
|
||||
|
|
|
@ -62,19 +62,20 @@ function Input.press(button, frames, walk)
|
|||
end
|
||||
|
||||
function Input.cancel(accept)
|
||||
if accept and Memory.value("menu", "shop_current") == 20 then
|
||||
if accept and Memory.value("menu", "option_dialogue") == 20 then
|
||||
Input.press(accept)
|
||||
else
|
||||
local button
|
||||
if bCancel then
|
||||
button = "B"
|
||||
else
|
||||
button = "A"
|
||||
end
|
||||
remainingFrames = 0
|
||||
sendButton(button, true)
|
||||
bCancel = not bCancel
|
||||
return true
|
||||
end
|
||||
|
||||
local button
|
||||
if bCancel then
|
||||
button = "B"
|
||||
else
|
||||
button = "A"
|
||||
end
|
||||
remainingFrames = 0
|
||||
sendButton(button, true)
|
||||
bCancel = not bCancel
|
||||
end
|
||||
|
||||
function Input.escape()
|
||||
|
|
|
@ -26,6 +26,7 @@ local memoryNames = {
|
|||
text_input = 0x04B6,
|
||||
text_length = 0x0EE9,
|
||||
main = 0x1FF5,
|
||||
option_dialogue = 0x1125,
|
||||
},
|
||||
player = {
|
||||
name = 0x1158,
|
||||
|
|
Loading…
Reference in New Issue