Add what's new in 2.0.0 to the About popup
The layout test lets the changelog grow in height with its text, and still checks its position and width.
This commit is contained in:
1 parent
d77b72159d
commit
5519afb5f6
2 files changed
+26
-1
No files matched your search
@@ -4,6 +4,19 @@ extends BasePopup
|
||||
|
||||
## What is new in each version, newest first.
|
||||
const WHATS_NEW: Dictionary = {
|
||||
"2.0.0": "Reworked all popups, they dim the background and close when clicking outside
|
||||
Fixed blurry text and the layout of the player list
|
||||
Moved Sync to the top row and Settings next to the reset buttons
|
||||
The inspiration and sync lists now show where each item starts
|
||||
The sync result now looks right with any number of columns
|
||||
Failed song downloads are now retried instead of getting stuck
|
||||
The game no longer waits forever when the server does not answer
|
||||
The song cache now fills up to the cache size in the settings
|
||||
Statistics are turned back on when a new game starts
|
||||
Fixed bugs with low winning scores and Show answer before a song is playing
|
||||
The log now shows the time on every row
|
||||
New app icon and a menu entry on Linux
|
||||
Reorganized the code and added automated tests",
|
||||
"1.9.0": "Made improvements to the Search window
|
||||
Made small changes to the inspiration list scrolling
|
||||
Made small changes to the player list
|
||||
|
||||
@@ -68,6 +68,12 @@ const RENAMED_PATHS: Dictionary = {
|
||||
SYNC_COLUMNS + "/CaughtErrorsVBox/CaughtErrorsLabel",
|
||||
}
|
||||
|
||||
## Nodes whose height follows text that changes between versions, such as the changelog.
|
||||
## Their position and width are still checked.
|
||||
const HEIGHT_FOLLOWS_TEXT: Array[String] = [
|
||||
"AboutPopup/AboutPanel/ScrollContainer/ContentVBox",
|
||||
]
|
||||
|
||||
## How far a node may be from its old place, in pixels.
|
||||
const TOLERANCE: float = 0.5
|
||||
|
||||
@@ -134,7 +140,8 @@ func test_every_node_is_where_it_was() -> void:
|
||||
problems.append("%s: %s is missing (was %s)" % [state, path, old_path])
|
||||
continue
|
||||
var rect: Array = actual[path].rect
|
||||
for i: int in 4:
|
||||
var sides: int = 3 if _height_follows_text(path) else 4
|
||||
for i: int in sides:
|
||||
if absf(rect[i] - expected.rect[i]) > TOLERANCE:
|
||||
problems.append("%s: %s is at %s, was %s"
|
||||
% [state, path, rect, expected.rect])
|
||||
@@ -145,3 +152,8 @@ func test_every_node_is_where_it_was() -> void:
|
||||
assert_array(problems).override_failure_message(
|
||||
"%d nodes moved:\n%s" % [problems.size(), "\n".join(problems.slice(0, 30))]) \
|
||||
.is_empty()
|
||||
|
||||
|
||||
static func _height_follows_text(path: String) -> bool:
|
||||
return HEIGHT_FOLLOWS_TEXT.any(func(node_path: String) -> bool:
|
||||
return path == node_path || path.begins_with(node_path + "/"))
|
||||
Reference in new issue
Block a user