mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-31 16:17:19 -05:00
fix: definitions whole in a 40x12 help
The data files definition was cut in its second sentence at 40x12: the help gives both kinds in a few words when the sentences do not fit.
This commit is contained in:
1 parent
8021db632d
commit
10af16f55d
5 files changed
+32
-11
No files matched your search
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$defaultInstallUrl = "https://raw.githubusercontent.com/Abdess/retrobios/main/install.py"
|
||||
$defaultInstallSha256 = "0165a8f39265725aa70cd19a7966c1e228fd9df480fb05d7338ca24530c26762"
|
||||
$defaultInstallSha256 = "d3900f45996c1df29734403c5d15767c5fc3badcb070c93bbaf5a4f16f65140b"
|
||||
$maximumInstallerBytes = 2MB
|
||||
$installerExit = 0
|
||||
$installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null }
|
||||
|
||||
+15
-1
@@ -6166,6 +6166,13 @@ DATA_FILES_WORDS = ("data files: the files an emulator reads from a data folder
|
||||
"such as Dolphin's Sys and PPSSPP's assets")
|
||||
|
||||
|
||||
# The definitions in a few words, for a help with no room for the sentences.
|
||||
_SHORT_DEFINITIONS = (
|
||||
("Game data:", "Game data: what a game reads, of no use to other cores."),
|
||||
("Data files:", "Data files: what an emulator reads from its own data folder."),
|
||||
)
|
||||
|
||||
|
||||
def game_data_missing(names: str, count: int, folders: list[Path]) -> str:
|
||||
"""The game data a run could not supply, and the folder each goes in:
|
||||
"Copy it from your own copy of the game" named no folder."""
|
||||
@@ -18615,12 +18622,19 @@ def _view_help(state: TuiState, width: int, height: int) -> tuple:
|
||||
# Cut from its end at 40x12, the help lost Quit and This help with no
|
||||
# sign: what a list's keys also say elsewhere goes first.
|
||||
for spare in ("First, last", "All, none", "extra", "Filter by setup or device name",
|
||||
"Filter", "Options", "Choose a row, tap it again to open it", "This help"):
|
||||
"Filter", "Options", "Choose a row, tap it again to open it", "This help",
|
||||
"definitions"):
|
||||
if (len(drawn(keys)) + len(extra) + len(defined)
|
||||
+ len(_text_lines(more, width)) <= height):
|
||||
break
|
||||
if spare == "extra":
|
||||
extra = []
|
||||
elif spare == "definitions":
|
||||
# The short form at 40x12, whole: the long one was cut in the
|
||||
# middle of its second sentence.
|
||||
short = " ".join(brief for long_form, brief in _SHORT_DEFINITIONS
|
||||
if long_form in words)
|
||||
defined = ["", *textwrap.wrap(short, width)] if short else []
|
||||
else:
|
||||
keys = [entry for entry in keys if entry[1] != spare]
|
||||
return ("Keys", _compose(state, width, height, drawn(keys) + defined + extra + more, []),
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ esac
|
||||
TEMP_INSTALLER=""
|
||||
TEMP_DIRECTORY=""
|
||||
DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/install.py"
|
||||
DEFAULT_INSTALL_SHA256="0165a8f39265725aa70cd19a7966c1e228fd9df480fb05d7338ca24530c26762"
|
||||
DEFAULT_INSTALL_SHA256="d3900f45996c1df29734403c5d15767c5fc3badcb070c93bbaf5a4f16f65140b"
|
||||
MAX_INSTALLER_BYTES=2097152
|
||||
|
||||
cleanup() {
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
{
|
||||
"dest": "roms/ports/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 909943,
|
||||
"sha256": "0165a8f39265725aa70cd19a7966c1e228fd9df480fb05d7338ca24530c26762",
|
||||
"size": 910604,
|
||||
"sha256": "d3900f45996c1df29734403c5d15767c5fc3badcb070c93bbaf5a4f16f65140b",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -71,8 +71,8 @@
|
||||
"muos": {
|
||||
"archive": {
|
||||
"dest": "ARCHIVE/RetroBIOS.muxapp",
|
||||
"size": 962735,
|
||||
"sha256": "26c35ae513bf9ae770f9e0316a9f0000b57bcc24c054691143361c7f77e1f252"
|
||||
"size": 963396,
|
||||
"sha256": "adb57fcae73e5138cc204f38065557677fe32cd11888e336cd1363eb53d72b20"
|
||||
},
|
||||
"members": [
|
||||
{
|
||||
@@ -92,8 +92,8 @@
|
||||
{
|
||||
"name": "RetroBIOS/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 909943,
|
||||
"sha256": "0165a8f39265725aa70cd19a7966c1e228fd9df480fb05d7338ca24530c26762",
|
||||
"size": 910604,
|
||||
"sha256": "d3900f45996c1df29734403c5d15767c5fc3badcb070c93bbaf5a4f16f65140b",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
@@ -166,8 +166,8 @@
|
||||
{
|
||||
"dest": ".config/modules/retrobios/install.py",
|
||||
"repo_path": "install.py",
|
||||
"size": 909943,
|
||||
"sha256": "0165a8f39265725aa70cd19a7966c1e228fd9df480fb05d7338ca24530c26762",
|
||||
"size": 910604,
|
||||
"sha256": "d3900f45996c1df29734403c5d15767c5fc3badcb070c93bbaf5a4f16f65140b",
|
||||
"executable": false
|
||||
},
|
||||
{
|
||||
|
||||
@@ -11449,6 +11449,13 @@ class AuditTwentyAndThirteen(unittest.TestCase):
|
||||
with self.subTest(rows=rows):
|
||||
text = " ".join(" ".join(install.tui_view(state, 40, rows)).split())
|
||||
self.assertIn("Game data: files a game or a game engine reads", text)
|
||||
# Data files too, each said whole: in a few words at 40x12.
|
||||
state.check = {**state.check, "data_missing": 7, "data_bytes": 2048}
|
||||
text = " ".join(" ".join(install.tui_view(state, 40, 12)).split())
|
||||
self.assertIn("Game data: what a game reads, of no use to other cores. Data files: "
|
||||
"what an emulator reads from its own data folder.", text)
|
||||
text = " ".join(" ".join(install.tui_view(state, 40, 15)).split())
|
||||
self.assertIn("such as Dolphin's Sys and PPSSPP's assets.", text)
|
||||
|
||||
def test_the_40_column_bar_keeps_help_and_the_help_its_tap_line(self):
|
||||
"""code_audit_20 P3-1."""
|
||||
|
||||
Reference in new issue
Block a user