Skip to content

Commit

Permalink
- add modify trophy unlock status
Browse files Browse the repository at this point in the history
- change unlock status in trophy list
- sort by unlock time
- add confirm when exit
- add force rebuild database
- fix some cancle backward problem
  • Loading branch information
indefined committed Oct 27, 2024
1 parent 788a988 commit dd94f0e
Show file tree
Hide file tree
Showing 16 changed files with 771 additions and 87 deletions.
Binary file added ONETROPHY/font/font.pgf
Binary file not shown.
43 changes: 29 additions & 14 deletions ONETROPHY/lang/Chinese_S.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ STRINGS_MARK_TROPHIES = "标记/取消标记 奖杯"
STRINGS_DEL_TROPHIES = "删除奖杯"
STRINGS_SHOW_DETAILS = "显示详情"
STRINGS_EMPTY = "没有奖杯!!!"
STRINGS_SORT = "Sort: "
STRINGS_SORT = "排序: "

STRINGS_RELOAD_TROPHIES = "需要先与奖杯气泡同步\n\n(非联网上传)"
STRINGS_RELOAD_TROPHIES = "需要先打开奖杯应用气泡刷新奖杯数据库\n\n(非联网上传)"
STRINGS_GAME_NOT_INSTALLED = "游戏还没安装!!!"
STRINGS_SUB_TROPHIES = "Sub-奖杯:"
STRINGS_SUB_TROPHIES = "奖杯组:"

STRINGS_TROPHY_TYPE = "奖杯"
STRINGS_TROPHY_STATUS = "数据:"
STRINGS_TROPHY_HIDDEN = "隐藏"
STRINGS_TROPHY_TYPE = "奖杯:"
STRINGS_TROPHY_STATUS = "状态:"
STRINGS_TROPHY_HIDDEN = "隐藏:"
STRINGS_TROPHY_UNLOCKED = "已解锁"
STRINGS_TROPHY_LOCKED = "锁定"

Expand All @@ -22,12 +22,12 @@ STRINGS_TROPHY_SILVER = "白银"
STRINGS_TROPHY_BRONZE = "青铜"

--Sort
STRING_SORT_ID = "Trophy id"
STRING_SORT_UNLOCKED = "Unlocked"
STRING_SORT_HIDDEN = "Hidden"
STRING_SORT_GROUP = "Group"
STRING_SORT_TITLE = "Title"
STRING_SORT_PROGRESS = "Progress"
STRING_SORT_ID = "奖杯ID"
STRING_SORT_UNLOCKED = "解锁状态"
STRING_SORT_HIDDEN = "隐藏状态"
STRING_SORT_GROUP = "分组"
STRING_SORT_TITLE = "标题"
STRING_SORT_PROGRESS = "进度"

STRINGS_DELETE_QUESTION = "你确定要消除这些奖杯吗?"
STRINGS_HIDDEN_YES = "是"
Expand All @@ -36,6 +36,21 @@ STRINGS_HIDDEN_NO = "否"
--color yellow
STRINGS_TROPHY_WARNING_HIDDEN = "隐藏"

--Wifi is on
--Trophies App
STRINGS_TROPHY_OPENAPP = "奖杯应用"
STRINGS_TROPHY_WIFI_ON = "记得关闭WI-FI,以防止上传奖杯"
STRINGS_TROPHY_REBUILD = "重构奖杯数据库"
STRINGS_TROPHY_WIFI_ON = "记得关闭WI-FI,以防止上传奖杯"

--Confirm
STRING_CONFIRM_EXIT = "你确定要退出软件吗?"
STRING_CONFIRM_UNLOCK = "是否确认修改该奖杯解锁状态?\n注意已经同步到PSN的奖杯将不会被修改影响\n修改时间戳将不会很精准"
STRING_CONFIRM_LOCK = "是否确认锁定该奖杯?\n注意已经同步到PSN的奖杯将不会被修改影响"
STRING_UNLOCKED = "修改成功"
STRING_LOCKED = "锁定成功"

--Modify menu
STRINGS_MODIFY_TROPHY = "修改解锁状态"
STRINGS_APPLY_MODIFY = "应用修改"
STRINGS_CANCLE_MODIFY = "取消修改"
STRINGS_SWITCH_MODIFY = "切换修改部分"
STRINGS_MODIFY_VALUE = "修改数据"
43 changes: 29 additions & 14 deletions ONETROPHY/lang/Chinese_T.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ STRINGS_MARK_TROPHIES = "標記/取消標記 獎杯"
STRINGS_DEL_TROPHIES = "刪除獎杯"
STRINGS_SHOW_DETAILS = "顯示詳情"
STRINGS_EMPTY = "沒有獎杯!!!"
STRINGS_SORT = "Sort: "
STRINGS_SORT = "排序: "

STRINGS_RELOAD_TROPHIES = "需要先與獎杯氣泡同歩\n\n(非聯網上傳)"
STRINGS_RELOAD_TROPHIES = "需要先打開奬杯應用氣泡刷新奬杯數據庫\n\n(非聯網上傳)"
STRINGS_GAME_NOT_INSTALLED = "遊戲还沒安裝!!!"
STRINGS_SUB_TROPHIES = "Sub-獎杯:"
STRINGS_SUB_TROPHIES = "奬杯組:"

STRINGS_TROPHY_TYPE = "獎杯"
STRINGS_TROPHY_STATUS = "數據:"
STRINGS_TROPHY_HIDDEN = "隱藏"
STRINGS_TROPHY_TYPE = "獎杯:"
STRINGS_TROPHY_STATUS = "狀態:"
STRINGS_TROPHY_HIDDEN = "隱藏:"
STRINGS_TROPHY_UNLOCKED = "已解鎖"
STRINGS_TROPHY_LOCKED = "鎖定"

Expand All @@ -22,12 +22,12 @@ STRINGS_TROPHY_SILVER = "白銀"
STRINGS_TROPHY_BRONZE = "青銅"

--Sort
STRING_SORT_ID = "Trophy id"
STRING_SORT_UNLOCKED = "Unlocked"
STRING_SORT_HIDDEN = "Hidden"
STRING_SORT_GROUP = "Group"
STRING_SORT_TITLE = "Title"
STRING_SORT_PROGRESS = "Progress"
STRING_SORT_ID = "奬杯ID"
STRING_SORT_UNLOCKED = "解鎖狀態"
STRING_SORT_HIDDEN = "隱藏狀態"
STRING_SORT_GROUP = "分組"
STRING_SORT_TITLE = "標題"
STRING_SORT_PROGRESS = "進度"

STRINGS_DELETE_QUESTION = "你確定要消除這些獎杯嗎?"
STRINGS_HIDDEN_YES = "是"
Expand All @@ -36,6 +36,21 @@ STRINGS_HIDDEN_NO = "否"
--color yellow
STRINGS_TROPHY_WARNING_HIDDEN = "隱藏"

--Wifi is on
--Trophies App
STRINGS_TROPHY_OPENAPP = "獎杯應用"
STRINGS_TROPHY_WIFI_ON = "記得關閉WI-FI,以防止上傳獎杯"
STRINGS_TROPHY_REBUILD = "重構奬杯數據庫"
STRINGS_TROPHY_WIFI_ON = "記得關閉WI-FI,以防止上傳獎杯"

--Confirm
STRING_CONFIRM_EXIT = "你確定要退出應用嗎?"
STRING_CONFIRM_UNLOCK = "是否確認修改該奬杯解鎖狀態?\n注意已經同步到PSN的奬杯將不會被修改影響\n修改時間戳將不會很精準"
STRING_CONFIRM_LOCK = "是否確認鎖定該奬杯?\n注意已經同步到PSN的奬杯將不會被修改影響"
STRING_UNLOCKED = "修改成功"
STRING_LOCKED = "鎖定成功"

--Modify menu
STRINGS_MODIFY_TROPHY = "修改解鎖狀態"
STRINGS_APPLY_MODIFY = "應用修改"
STRINGS_CANCLE_MODIFY = "取消修改"
STRINGS_SWITCH_MODIFY = "切換修改部分"
STRINGS_MODIFY_VALUE = "修改數據"
26 changes: 25 additions & 1 deletion ONETROPHY/lang/RUSSIAN.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,37 @@ STRINGS_TROPHY_GOLD = "Золото"
STRINGS_TROPHY_SILVER = "Серебро"
STRINGS_TROPHY_BRONZE = "Бронза"

--Sort
STRING_SORT_ID = "Trophy id"
STRING_SORT_UNLOCKED = "Unlocked"
STRING_SORT_HIDDEN = "Hidden"
STRING_SORT_GROUP = "Group"
STRING_SORT_TITLE = "Title"
STRING_SORT_PROGRESS = "Progress"

STRINGS_DELETE_QUESTION = "Хочешь удалить эти трофеи?"
STRINGS_HIDDEN_YES = "Да"
STRINGS_HIDDEN_NO = "Нет"

--color yellow
STRINGS_TROPHY_WARNING_HIDDEN = "СКРЫТЫЙ"

--Wifi is on
--Trophies App
STRINGS_TROPHY_OPENAPP = "Трофеи"
STRINGS_TROPHY_REBUILD = "Rebuild Trohhy Database"
STRINGS_TROPHY_WIFI_ON = "Не забудь отключить Wi-Fi, чтобы не синхронизировать трофеи"


--Confirm
STRING_CONFIRM_EXIT = "Are you sure want to exit the app?"
STRING_CONFIRM_UNLOCK = "Are you sure want to modify the unlock status of this trophy?\nNote this will not affect the trophies which already synced to PSN\nThe timestamp may not that accurate"
STRING_CONFIRM_LOCK = "Are you sure want to lock this trophy?\nNote this will not affect the trophies which already synced to PSN"
STRING_UNLOCKED = "Unlock success"
STRING_LOCKED = "Lock success"

--Modify menu
STRINGS_MODIFY_TROPHY = "Modify Trophy"
STRINGS_APPLY_MODIFY = "Apply Modify"
STRINGS_CANCLE_MODIFY = "Cancle Modify"
STRINGS_SWITCH_MODIFY = "Switch Modify Section"
STRINGS_MODIFY_VALUE = "Modify Value"
21 changes: 18 additions & 3 deletions ONETROPHY/lang/english_us.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
STRINGS_MARK_TROPHIES = "Mark/Unmark Trophies"
STRINGS_DEL_TROPHIES = "Delete Trophies"
STRINGS_SHOW_DETAILS = "Show Details"
STRINGS_EMPTY = "Not Trophies !!!"
STRINGS_EMPTY = "No Trophies !!!"
STRINGS_SORT = "Sort: "

STRINGS_RELOAD_TROPHIES = "It is necessary to first synchronize the Trophies\n\nfrom the APP Trophies."
Expand Down Expand Up @@ -36,6 +36,21 @@ STRINGS_HIDDEN_NO = "No"
--color yellow
STRINGS_TROPHY_WARNING_HIDDEN = "HIDDEN"

--Wifi is on
--Trophies App
STRINGS_TROPHY_OPENAPP = "Trophies App"
STRINGS_TROPHY_WIFI_ON = "Remember To disable WI-FI to prevent synching trophies"
STRINGS_TROPHY_REBUILD = "Rebuild Trohhy Database"
STRINGS_TROPHY_WIFI_ON = "Remember To disable WI-FI to prevent synching trophies"

--Confirm
STRING_CONFIRM_EXIT = "Are you sure want to exit the app?"
STRING_CONFIRM_UNLOCK = "Are you sure want to modify the unlock status of this trophy?\nNote this will not affect the trophies which already synced to PSN\nThe timestamp may not that accurate"
STRING_CONFIRM_LOCK = "Are you sure want to lock this trophy?\nNote this will not affect the trophies which already synced to PSN"
STRING_UNLOCKED = "Unlock success"
STRING_LOCKED = "Lock success"

--Modify menu
STRINGS_MODIFY_TROPHY = "Modify Status"
STRINGS_APPLY_MODIFY = "Apply Modify"
STRINGS_CANCLE_MODIFY = "Cancle Modify"
STRINGS_SWITCH_MODIFY = "Switch Modify Section"
STRINGS_MODIFY_VALUE = "Modify Value"
Binary file added ONETROPHY/resources/buttons3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions ONETROPHY/script.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ game.close()

dofile("system/commons.lua")
dofile("system/scroll.lua")
dofile("system/trophies_helper.lua")
dofile("system/trophies_modify.lua")
dofile("system/trophies_title.lua")
dofile("system/trophies_group.lua")
dofile("system/trophies_list.lua")
Expand Down
12 changes: 8 additions & 4 deletions ONETROPHY/system/commons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,28 @@ __LANG = os.language()

-- Loading language file
dofile("lang/english_us.txt")
if not files.exists(__PATH_LANG.."english_us.txt") then files.copy("lang/english_us.txt",__PATH_LANG) end
if files.exists(__PATH_LANG..__LANG..".txt") then dofile(__PATH_LANG..__LANG..".txt") end

if files.exists(__PATH_LANG..__LANG..".txt") then dofile(__PATH_LANG..__LANG..".txt")
elseif files.exists("lang/"..__LANG..".txt") then dofile("lang/"..__LANG..".txt") end

-- Loading custom font
fnt = font.load(__PATH_FONT.."font.ttf") or font.load(__PATH_FONT.."font.pgf") or font.load(__PATH_FONT.."font.pvf")
fnt = font.load(__PATH_FONT.."font.ttf") or font.load(__PATH_FONT.."font.pgf") or font.load(__PATH_FONT.."font.pvf") or font.load("font/font.ttf") or font.load("font/font.pgf") or font.load("font/font.pvf")
if fnt then font.setdefault(fnt) end

--buttons asignation
accept,cancel = "cross","circle"
accept_p,cancle_p = 0, 3
if buttons.assign()==0 then
accept,cancel = "circle","cross"
accept_p,cancle_p = 3, 0
end

--Load resources
back = image.load("resources/background.png")
img_trophies = image.load("resources/trophies.png",60,60)
buttonskey = image.load("resources/buttons.png",20,20)
buttonskey2 = image.load("resources/buttons2.png",30,20)
buttonskey3 = image.load("resources/buttons3.png",20,20)

--sorts
_SORT_L = { STRING_SORT_ID, STRING_SORT_UNLOCKED, STRING_SORT_HIDDEN }
Expand All @@ -70,4 +74,4 @@ function draw.offsetgradrect(x,y,sx,sy,c1,c2,c3,c4,offset)
local sizey = sy/2
draw.gradrect(x,y,sx,sizey + offset,c1,c2,c3,c4)
draw.gradrect(x,y + sizey - offset,sx,sizey + offset,c3,c4,c1,c2)
end
end
3 changes: 2 additions & 1 deletion ONETROPHY/system/trophies_group.lua
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ function trophies_group(obj)
collectgarbage("collect")
os.delay(250)

return true
buttons.read()
break
end

end
Expand Down
Loading

0 comments on commit dd94f0e

Please sign in to comment.