Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better Multi-Language Support #390

Merged
merged 70 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
3617206
Initial setup for new resource file structure/load
UTDZac Apr 22, 2023
9db9d04
Resources: cleaned up code and autodetection
UTDZac Apr 23, 2023
3a31df4
Resources: Adding first screen resource file
UTDZac Apr 23, 2023
962fd41
Updates to TrackerScreen language resources
UTDZac Apr 23, 2023
9b36356
Resources: Properly setting up existing langs
UTDZac Apr 24, 2023
e62846f
Resources: Restored original foreign texts
UTDZac Apr 24, 2023
da62cdf
Resources: small visual adjustments
UTDZac Apr 24, 2023
3dddc70
Rework: buttons getText(); direct resource reads
UTDZac Apr 25, 2023
ba8fdb5
Adding LanguageScreen for changing lang setting
UTDZac Apr 25, 2023
93f1fe7
Resource: cleaned up logic for accessing resources
UTDZac Apr 25, 2023
842572a
Resources: adding even more resources
UTDZac Apr 26, 2023
c79e7b2
Resources: Adding even more words and phrases
UTDZac Apr 26, 2023
9748015
Merge branch 'dev' into utdzac/better-language-support
UTDZac Apr 26, 2023
92a0e7c
Removing official Japanese support
UTDZac Apr 26, 2023
9bbc929
Merge branch 'dev' into utdzac/better-language-support
UTDZac May 6, 2023
3d9e830
Resources: filling in more screens
UTDZac May 6, 2023
a8cf4e5
Resources: updating Quickload screen
UTDZac May 6, 2023
aa99fd4
Resources: Time Machine screen updates
UTDZac May 7, 2023
fe905c9
Resources: Adding Manage Tracked Data screen
UTDZac May 7, 2023
77e9763
Merge branch 'dev' into utdzac/better-language-support
UTDZac May 10, 2023
374c617
Merge branch 'main' into utdzac/better-language-support
UTDZac May 30, 2023
47a06ca
Merge branch 'dev' into utdzac/better-language-support
UTDZac May 30, 2023
72e4a32
Resources: adding theme screen texts
UTDZac May 30, 2023
5681150
Resources: Streamer and Extensions screens
UTDZac May 31, 2023
acf259f
Resources: SingleExtension, MoveHistory, TypeDefenses,
UTDZac May 31, 2023
26289b1
Merge branch 'dev' into utdzac/better-language-support
UTDZac May 31, 2023
cf0ded6
Resources: GameOverScreen and ViewLogWarningScreen
UTDZac Jun 1, 2023
ec16932
Resources: InfoScreen and TeamViewArea
UTDZac Jun 1, 2023
426abf4
Resources: Evolutions everywhere
UTDZac Jun 2, 2023
bd8cf98
Merge branch 'dev' into utdzac/better-language-support
UTDZac Jun 2, 2023
e7f1176
UpdateScreen: new look, added release notes
UTDZac Jun 16, 2023
66b84b6
UpdateScreen: finishing up adding Resources
UTDZac Jun 16, 2023
57005e2
UpdateScreen: Added release notes display
UTDZac Jun 17, 2023
177cdb3
Renaming some variables for consistency
UTDZac Jun 17, 2023
46ba742
UpdateScreen: If update ready, show release notes
UTDZac Jun 17, 2023
744ea1e
Moving Stats screen to Gameplay screen
UTDZac Jun 19, 2023
c62f799
LanguageScreen: adding a help contribute btn
UTDZac Jun 19, 2023
41882f1
Merge branch 'dev' into utdzac/better-language-support
UTDZac Jun 19, 2023
1408111
LogViewer: adding Resources to most things
UTDZac Jun 19, 2023
186eecc
LogSearchScreen: added resources and refactored
UTDZac Jun 21, 2023
6545f67
Merge branch 'dev' into utdzac/better-language-support
UTDZac Jun 23, 2023
304b901
Changing screens now refreshes buttons
UTDZac Jun 24, 2023
eed882e
MGBA: Initial set of resources added
UTDZac Jun 27, 2023
4bf68bc
MGBA: Adding Commands Resources
UTDZac Jul 2, 2023
2e7cc47
MGBA: Remaining screen resources added
UTDZac Jul 3, 2023
7053f7f
MGBA Language Screen added
UTDZac Jul 3, 2023
c9fc49b
Resources: adding names to descriptions
UTDZac Jul 3, 2023
fff2973
Resources: Adding types to game resources
UTDZac Jul 3, 2023
9088361
Resources: updating Tracked Data notes
UTDZac Jul 6, 2023
8324880
Fix autosave load file error if none exists
UTDZac Jul 6, 2023
91b32c0
Resources: Fix accented chars, LogViewer, etc
UTDZac Jul 6, 2023
9370412
LogViewer: Fix parsing Japanese logs
UTDZac Jul 7, 2023
dafa354
LogViewer: Fix trainer mons with held items
UTDZac Jul 7, 2023
f4f535c
Adding discussion url for translation help
UTDZac Jul 7, 2023
ceb914a
Resources: Add in missing prompts
UTDZac Jul 7, 2023
3d1fc73
Removing some TODOs
UTDZac Jul 7, 2023
854da22
Resources: Added LogViewer Misc resources
UTDZac Jul 7, 2023
a47b524
Resources: Don't autodetect non-supported langs
UTDZac Jul 7, 2023
0326d13
Fix move summary for Razor Wind
UTDZac Jul 11, 2023
6f81cd6
Fix inability to search for accented characters
UTDZac Jul 12, 2023
55aadca
Theme: Fix replace theme bug not working
UTDZac Jul 12, 2023
4f89287
LogParser: Fix Bizhawk 2.8 encoding stuff
UTDZac Jul 12, 2023
2aee88c
Fix: Mismatched language between Tracker & log
UTDZac Jul 12, 2023
e71e5f6
LogViewer: Fix mismatch language searching
UTDZac Jul 13, 2023
b0c14cf
Removing dupe game data and Constants.Words
UTDZac Jul 13, 2023
1c58e40
Resources: Adding placeholder entries
UTDZac Jul 13, 2023
0a889b0
LogViewer: Fix re-translating screen resources
UTDZac Jul 13, 2023
f63b9e7
Language screen cleanup and auto-detect
UTDZac Jul 13, 2023
1c235f3
Fixing Quickload bug when changing games
UTDZac Jul 13, 2023
d9e4ea2
Fixing some typos in comments
UTDZac Jul 13, 2023
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
3 changes: 0 additions & 3 deletions ironmon_tracker/Battle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ function Battle.updateBattleStatus()
Battle.endCurrentBattle()
end
if GameOverScreen.shouldDisplay(lastBattleStatus) then -- should occur exactly once per lost battle
if not Battle.isWildEncounter then
GameOverScreen.incrementLosses()
end
LogOverlay.isGameOver = true
GameOverScreen.randomizeAnnouncerQuote()
GameOverScreen.nextTeamPokemon()
Expand Down
33 changes: 26 additions & 7 deletions ironmon_tracker/ColorPicker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function ColorPicker.new(colorkey)
self.colorDisplay = nil

self.colorkey = colorkey

self.backgroundColor = 0xFF404040 -- Dark Grey
self.color = string.format("%X", Theme.COLORS[colorkey])
self.originalColor = "0x"..string.format("%X",Theme.COLORS[colorkey])

Expand Down Expand Up @@ -126,7 +126,7 @@ function ColorPicker:drawMainCanvas()
forms.clear(self.mainCanvas,0x00000000)
local wheelPath = FileManager.buildImagePath("colorPicker", "HSVwheel3.png")
local gradientPath = FileManager.buildImagePath("colorPicker", "HSVgradient.png")
forms.drawRectangle(self.mainCanvas,0,0,250,300,nil,0xFF404040)
forms.drawRectangle(self.mainCanvas,0,0,self.width+30,self.height+30,nil,self.backgroundColor)
forms.drawImage(self.mainCanvas,wheelPath,10,10,150,150)
forms.drawImage(self.mainCanvas,gradientPath,self.constants.SLIDER_X_POS,self.constants.SLIDER_Y_POS,self.constants.SLIDER_WIDTH,self.constants.SLIDER_HEIGHT)
forms.drawEllipse(self.mainCanvas,self.ellipsesPos[1]-3,self.ellipsesPos[2]-3,6,6,nil,tonumber(self.color))
Expand All @@ -135,19 +135,38 @@ function ColorPicker:drawMainCanvas()
forms.drawRectangle(self.mainCanvas,sliderX,sliderY,14,4,nil,nil)

forms.drawRectangle(self.mainCanvas,15,173,30,30,nil,tonumber(self.color))
forms.drawText(self.mainCanvas,50,179,self.colorkey,0xFFFFFFFF,0x00000000,14,"Arial")
forms.drawText(self.mainCanvas,14,221,"Hex Color:",0xFFFFFFFF,0x00000000,14,"Arial")

local colorResourceKeys = {
["Default text"] = "ColorDefaultText",
["Lower box text"] = "ColorLowerBoxText",
["Positive text"] = "ColorPositiveText",
["Negative text"] = "ColorNegativeText",
["Intermediate text"] = "ColorIntermediateText",
["Header text"] = "ColorHeaderText",
["Upper box border"] = "ColorUpperBoxBorder",
["Upper box background"] = "ColorUpperBoxBackground",
["Lower box border"] = "ColorLowerBoxBorder",
["Lower box background"] = "ColorLowerBoxBackground",
["Main background"] = "ColorMainBackground",
}

local colorKeyLabel = Resources.ThemeScreen[colorResourceKeys[self.colorkey] or ""] or "???"
forms.drawText(self.mainCanvas,50,179,colorKeyLabel,Drawing.Colors.WHITE,0x00000000,14,"Arial")

local hexLabel = string.format("%s:", Resources.ThemeScreen.PromptColorPickerHexColor)
forms.drawText(self.mainCanvas,14,221,hexLabel,Drawing.Colors.WHITE,0x00000000,14,"Arial")

forms.refresh(self.mainCanvas)
end

function ColorPicker:show()
if self.colorkey == nil then return end

self.mainForm = Utils.createBizhawkForm("Color Picker", self.width, self.height, 0, 0, function() self:onClose() end)
self.mainForm = Utils.createBizhawkForm(Resources.ThemeScreen.PromptColorPickerTitle, self.width, self.height, 0, 0, function() self:onClose() end)
self.colorTextBox = forms.textbox(self.mainForm,"",65,10,"HEX",90,218)
self.saveButton = forms.button(self.mainForm,"Save && Close", function() self:onSave() end,15,250,95,30)
self.cancelButton = forms.button(self.mainForm,"Cancel", function() self:onClose() end,125,250,65,30)
local saveAndClose = string.format("%s && %s", Resources.AllScreens.Save, Resources.AllScreens.Close)
self.saveButton = forms.button(self.mainForm,saveAndClose, function() self:onSave() end,15,250,95,30)
self.cancelButton = forms.button(self.mainForm,Resources.AllScreens.Cancel, function() self:onClose() end,125,250,65,30)
self.mainCanvas = forms.pictureBox(self.mainForm,0,0,250,300)
forms.setlocation(self.mainForm,self.xPos,self.yPos)

Expand Down
Loading