Port statistics and the news tablet to the Modern UI (by Codex)

This commit is contained in:
Codex committed 2026-10-25 20:10:57 +01:00
1 parent 349c416f3a
commit a45217c362
32 files changed
+2493 -23

No files matched your search

+12 -3
View File
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-only
add_library(bmh_modern_ui_core STATIC catalog.cpp model.cpp gui_assets.cpp desktop.cpp demo_sports.cpp demo_calendar.cpp demo_reports.cpp demo_almanac.cpp demo_finance.cpp demo_environment.cpp demo_advertising.cpp demo_toto.cpp demo_lineup.cpp demo_transfer.cpp demo_career_reports.cpp demo_rankings.cpp demo_stadium.cpp)
add_library(bmh_modern_ui_core STATIC catalog.cpp model.cpp gui_assets.cpp desktop.cpp demo_sports.cpp demo_calendar.cpp demo_reports.cpp demo_almanac.cpp demo_finance.cpp demo_environment.cpp demo_advertising.cpp demo_toto.cpp demo_lineup.cpp demo_transfer.cpp demo_career_reports.cpp demo_rankings.cpp demo_stadium.cpp demo_statistics.cpp demo_news.cpp)
target_include_directories(bmh_modern_ui_core PUBLIC ../..)
target_link_libraries(bmh_modern_ui_core PUBLIC bmh_asset_io)
add_library(bmh_modern_ui STATIC view.cpp ticket_popover.cpp)
@@ -14,7 +14,7 @@ endif()
set(modern_assets "${CMAKE_BINARY_DIR}/assets/modern")
FetchContent_GetProperties(rmlui)
file(MAKE_DIRECTORY "${modern_assets}")
foreach(asset modern.rml theme.rcss ticket.rcss sports.rcss calendar.rcss reports.rcss report_details.rcss report_pickers.rcss indoor.rcss planning.rcss almanac.rcss finance.rcss bank.rcss contracts.rcss amount.rcss environment.rcss advertising.rcss toto.rcss lineup.rcss transfer.rcss career_reports.rcss rankings.rcss stadium.rcss)
foreach(asset modern.rml theme.rcss ticket.rcss sports.rcss calendar.rcss reports.rcss report_details.rcss report_pickers.rcss indoor.rcss planning.rcss almanac.rcss finance.rcss bank.rcss contracts.rcss amount.rcss environment.rcss advertising.rcss toto.rcss lineup.rcss transfer.rcss career_reports.rcss rankings.rcss stadium.rcss statistics.rcss news.rcss)
configure_file("${CMAKE_SOURCE_DIR}/assets/modern/${asset}" "${modern_assets}/${asset}" COPYONLY)
endforeach()
@@ -34,7 +34,7 @@ foreach(icon ${modern_icons})
get_filename_component(icon_name "${icon}" NAME)
configure_file("${icon}" "${modern_assets}/icons/${icon_name}" COPYONLY)
endforeach()
foreach(weight Regular Bold)
foreach(weight Regular Bold Italic BoldItalic)
configure_file("${rmlui_SOURCE_DIR}/Samples/assets/LatoLatin-${weight}.ttf"
"${modern_assets}/LatoLatin-${weight}.ttf" COPYONLY)
endforeach()
@@ -99,3 +99,12 @@ foreach(component environment advertising toto lineup transfer stadium)
endif()
add_test(NAME modern_${component}_ui_tests COMMAND modern_${component}_ui_tests)
endforeach()
foreach(component statistics news)
add_executable(modern_${component}_ui_tests ../../../tests/modern_${component}_ui_tests.cpp)
target_link_libraries(modern_${component}_ui_tests PRIVATE bmh_modern_ui_core)
if(MSVC)
target_compile_options(modern_${component}_ui_tests PRIVATE /utf-8)
endif()
add_test(NAME modern_${component}_ui_tests COMMAND modern_${component}_ui_tests)
endforeach()