feat: add active domains serialization and UI integration
- Implemented `serialize_active_domains` function to gather and format active hidden domains from the game world. - Updated `game_loop` to include active domains in the broadcast state. - Enhanced `StatusBar` component to display active domains with a new `StatusWidget`, including dynamic labels and colors based on the number of active domains. - Added localization support for hidden domain messages in both English and Chinese. - Updated the world store to manage active domains state and synchronize with the backend.
This commit is contained in:
@@ -230,7 +230,15 @@
|
||||
"change_success": "Phenomenon changed to: {name}",
|
||||
"click_to_change": "(Click to change phenomenon)",
|
||||
"author_bilibili": "Bilibili",
|
||||
"author_github": "Github"
|
||||
"author_github": "Github",
|
||||
"hidden_domain": {
|
||||
"label": "[Hidden Domain]",
|
||||
"label_active": "[Domain Opened: {count}]",
|
||||
"title": "Opened Hidden Domains",
|
||||
"empty": "No hidden domains currently open",
|
||||
"danger": "Danger",
|
||||
"drop": "Fortune"
|
||||
}
|
||||
},
|
||||
"controls": {
|
||||
"resume": "Resume Game",
|
||||
|
||||
@@ -230,7 +230,15 @@
|
||||
"change_success": "天象已更易为:{name}",
|
||||
"click_to_change": "(点击可更易天象)",
|
||||
"author_bilibili": "B站空间",
|
||||
"author_github": "Github仓库"
|
||||
"author_github": "Github仓库",
|
||||
"hidden_domain": {
|
||||
"label": "[秘境]",
|
||||
"label_active": "[秘境开启: {count}]",
|
||||
"title": "当前开启秘境",
|
||||
"empty": "当前暂无秘境开启",
|
||||
"danger": "凶险",
|
||||
"drop": "机缘"
|
||||
}
|
||||
},
|
||||
"controls": {
|
||||
"resume": "继续游戏",
|
||||
|
||||
Reference in New Issue
Block a user