Fix player's info is not updated correctly when changing name

This commit is contained in:
Nguyễn Quốc Hưng
2024-08-16 09:06:43 +07:00
parent c29b97cece
commit 0647babc90

View File

@@ -161,8 +161,8 @@ function NameEntryScene:onInputPress(e)
self.name_entry[self.entry_pos] = string.upper(e.key)
self.name_entry[self.entry_pos + 1] = string.upper(e.key)
end
if self.entry_pos == 3 then self:getPlayInfo(name) end
self.entry_pos = math.min(self.entry_pos + 1, 4)
if self.entry_pos == 4 then self:getPlayInfo(string.lower(table.concat(self.name_entry, '', 1, 3))) end
end
elseif e.input == "menu_decide" or e.input == "rotate_left" or e.scancode == "return" then
if self.entry_pos == 4 then