draw the scrap of a debris card as an icon, not a word
The debris card's row now reads "Remaining" with the amount and the bare scrap icon after it, and the count summary's indented sub-row states its total the same way; both fall back to naming the item in words when no scrap icon file exists. StatRow gained the value-plus-icon form: a label draws either text or a pixmap, so the two are composed into one via renderCaptionWithIcon, with the color passed in because a pixmap does not follow the palette. That also closes a gap in the building multi-selection, whose "Total cost" was specified to carry the building_block icon and showed the bare number. ItemIconCache::getInlineIcon() packages the sizing rule of the bare inline icon. It sits on the cache rather than in IconCaption so StatRow keeps pulling in nothing but the caption helper: StatRow.cpp is compiled into DotaFactory_balancing, which links neither the ui library nor QtSvg, and that target now compiles IconCaption.cpp along with it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
This commit is contained in:
@@ -13,6 +13,9 @@ SET(HDRS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/selection/BarRow.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/selection/SectionBox.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/selection/SelectionNames.h
|
||||
# A stat row states a value with an inline item icon (REQ-UI-ITEM-ICON), which this
|
||||
# composes; it needs nothing but Qt's painting.
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/IconCaption.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/VisualsConfig.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/VisualsLoader.h
|
||||
# Shared world-space shapes so the arena keeps looking like the game
|
||||
@@ -36,6 +39,7 @@ SET(SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/selection/BarRow.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/selection/SectionBox.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/selection/SelectionNames.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/IconCaption.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/VisualsLoader.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../ui/WorldPrimitives.cpp
|
||||
PARENT_SCOPE
|
||||
|
||||
Reference in New Issue
Block a user