From ca2eec45b96fe5e89e1838a879f8fac231c7cbbc Mon Sep 17 00:00:00 2001 From: fendrin Date: Thu, 27 Feb 2014 23:29:03 +0100 Subject: [PATCH] Update to the default and editor themes. Reintroduced the alignment and side. --- changelog | 4 + data/themes/default.cfg | 395 ++++++++++++--------------- data/themes/editor.cfg | 583 +++------------------------------------- players_changelog | 4 + src/reports.cpp | 63 +++-- 5 files changed, 249 insertions(+), 800 deletions(-) diff --git a/changelog b/changelog index 7ea974dcf08a..ab40cff419cb 100644 --- a/changelog +++ b/changelog @@ -11,6 +11,10 @@ Version 1.11.10+dev: * WML files whose names contain spaces are ignored. * Bug #21722: Event handlers with multiple names never fired. * User interface: + * Corrected most of the issues left with the new default theme. + * Reintroduced the alignment, race and side being shown in the sidebar. + * Adjusted the theme to the size and shape of the new minimap frame images. + * Certain changes to the used text colors, sizes and alignment. * Non-team labels no longer remove team labels that were present in the same hex. * New colors for the Light Red and Dark Red minimap markers. diff --git a/data/themes/default.cfg b/data/themes/default.cfg index 1ceea9ad0131..1f5cdf701346 100644 --- a/data/themes/default.cfg +++ b/data/themes/default.cfg @@ -6,22 +6,31 @@ # defined with rect=): # http://www.wesnoth.org/forum/viewtopic.php?p=213708#213708 -[theme] - id=Default - name= _ "theme^Default" - description= _ "Default theme." - #define DEFAULT_FONT_NORMAL - 14 #enddef +14#enddef #define DEFAULT_FONT_SMALL - 12 #enddef +12#enddef #define DEFAULT_FONT_TINY - 10 #enddef +10#enddef #define DEFAULT_FONT_REALLYTINY - 9 #enddef +9#enddef + +#define DEFAULT_FONT_NORMAL_HEIGHT +18#enddef +#define DEFAULT_FONT_SMALL_HEIGHT +16#enddef +#define DEFAULT_FONT_TINY_HEIGHT +14#enddef +#define DEFAULT_FONT_REALLYTINY_HEIGHT +13#enddef - {themes/macros.cfg} +{themes/macros.cfg} +[theme] + id=Default + name= _ "theme^Default" + description= _ "Default theme." + [resolution] id=1024x768 width=1024 @@ -32,27 +41,27 @@ id=screen rect="0,0,1024,768" [/screen] - + [panel] id=top-panel image=themes/classic/menubar.png ref=screen - rect="=,=,=,+26" + rect="=,=,=,+27" xanchor=top yanchor=fixed [/panel] - + [main_map] id=main-map rect="=,+0,+842,768" xanchor=left yanchor=top [/main_map] - + {MAIN_MAP_BORDER} - + # rightside panel - + [panel] id=sidebar-panel image=themes/classic/sidebar.png @@ -60,14 +69,11 @@ xanchor=right yanchor=top [/panel] - + {MINIMAP_THEME} - - - {STATUS_BOX =+3 +3 +122 +36 tod terrain-description-box-botleft right fixed} - + {STATUS_BOX =+0 +3 +122 +36 tod terrain-description-box-botleft right fixed} {STATUS_BOX =+0 +5 +72 +72 unit tod-box-botleft right fixed} - + [menu] id=menu-main title= _ "Menu" @@ -78,14 +84,14 @@ xanchor=fixed yanchor=fixed [/menu] - + [menu] title= _ "Back to..." id=menu-autosaves button=false items=AUTOSAVES [/menu] - + [menu] id=actions-menu title= _ "Actions" @@ -95,16 +101,16 @@ xanchor=fixed yanchor=fixed [/menu] - {STATUS_BOX +5 =+0 +80 +15 turn actions-menu fixed fixed} - {STATUS_BOX +3 =+0 +76 +15 gold turn-box-topright fixed fixed} - {STATUS_BOX +3 =+0 +71 +15 villages gold-box-topright fixed fixed} - {STATUS_BOX +3 =+0 +71 +15 units villages-box-topright fixed fixed} - {STATUS_BOX +3 =+0 +90 +15 upkeep units-box-topright fixed fixed} + {STATUS_BOX +5 =+0 +75 +15 turn actions-menu fixed fixed} + {STATUS_BOX +3 =+0 +75 +15 gold turn-box-topright fixed fixed} + {STATUS_BOX +3 =+0 +70 +15 villages gold-box-topright fixed fixed} + {STATUS_BOX +3 =+0 +65 +15 units villages-box-topright fixed fixed} + {STATUS_BOX +3 =+0 +85 +15 upkeep units-box-topright fixed fixed} {STATUS_BOX +3 =+0 +85 +15 income upkeep-box-topright fixed fixed} {COUNTDOWN_THEME} [menu] is_context_menu=true - items=wml,undo,redo,wbexecuteaction,wbdeleteaction,wbbumpupaction,wbbumpdownaction,wbsupposedead,describeunit,renameunit,createunit,changeside,killunit,describeterrain,labelteamterrain,labelterrain,clearlabels,speak,continue,recruit,recall,wbtoggle,delayshroud,updateshroud,cycle,endturn + items=wml,undo,redo,wbexecuteaction,wbdeleteaction,wbbumpupaction,wbbumpdownaction,wbsupposedead,describeterrain,describeunit,renameunit,createunit,changeside,killunit,labelteamterrain,labelterrain,clearlabels,speak,continue,recruit,recall,wbtoggle,delayshroud,updateshroud,cycle,endturn [/menu] [action] id=button-endturn @@ -113,7 +119,7 @@ title2= _ "End Scenario" items=endturn ref=sidebar-panel - rect="-172,-50,+168,+44" + rect="-173,-50,+168,+44" xanchor=right yanchor=bottom [/action] @@ -124,7 +130,7 @@ font_size={DEFAULT_FONT_TINY} text= _ "HP" ref=unit-box-topright - rect="+4,=-1,1022,+12" + rect="+4,=-1,+30,+12" xanchor=right yanchor=fixed [/label] @@ -133,7 +139,7 @@ font_size={DEFAULT_FONT_TINY} text= _ "XP" # FIXME: should be ref=unit-hp - rect="=,+14,=,+12" + rect="=,+14,+60,+12" xanchor=right yanchor=fixed [/label] @@ -141,8 +147,8 @@ id=label-mp font_size={DEFAULT_FONT_TINY} text= _ "MP" - # FIXME: should be ref=unit-hp - rect="=,+14,=-30,+12" + # FIXME: should be ref=unit-xp + rect="=,+14,=,+12" xanchor=right yanchor=fixed [/label] @@ -150,7 +156,7 @@ id=label-def font_size={DEFAULT_FONT_TINY} text= _ "def" - # FIXME: should be ref=unit-hp + # FIXME: should be ref=unit-mp rect="+1,=,=,+12" xanchor=right yanchor=fixed @@ -160,6 +166,7 @@ id=gold-icon icon=themes/gold.png text= _ "gold" + font_rgb=160,160,160 ref=gold-box-center rect="=+1,=-1,+17,+17" xanchor=fixed @@ -247,24 +254,25 @@ [/time_of_day] [tod_stats] id=tod-stats - font_size={DEFAULT_FONT_SMALL} - rect="+3,=-1,+64,+17" + font_size={DEFAULT_FONT_NORMAL} + rect="+3,=+8,+64,+{DEFAULT_FONT_NORMAL_HEIGHT}" xanchor=right yanchor=fixed [/tod_stats] - [unit_alignment] - ref=tod-stats - id=unit-alignment - font_size={DEFAULT_FONT_SMALL} - rect="=,+0,=,+16" - xanchor=right - yanchor=fixed - [/unit_alignment] + # TODO think about alignment right of tod image + # [unit_alignment] + # ref=tod-stats + # id=unit-alignment + # font_size={DEFAULT_FONT_SMALL} + # rect="=,+0,=,+16" + # xanchor=right + # yanchor=fixed + # [/unit_alignment] [unit_status] id=unit-status font_size={DEFAULT_FONT_SMALL} - #ref=label-hp - rect="=-25,+10,1022,+16" + ref=label-hp + rect="+10,=-2,1022,+16" xanchor=right yanchor=fixed [/unit_status] @@ -372,11 +380,19 @@ id=unit-description font_size={DEFAULT_FONT_NORMAL} ref=unit-box-botleft - rect="=+3,+5,+200,+18" + rect="=+3,+5,+135,+18" xanchor=right yanchor=fixed [/unit_name] + [unit_side] + id=unit-side + font_size={DEFAULT_FONT_SMALL} + rect="+0,=,+35,+16" + xanchor=right + yanchor=fixed + [/unit_side] [unit_type] + ref=unit-description id=unit-type font_size={DEFAULT_FONT_SMALL} rect="=,+0,+140,+16" @@ -392,35 +408,49 @@ xanchor=right yanchor=fixed [/unit_level] - #[unit_race] - # id=unit-race - # font_size={DEFAULT_FONT_SMALL} - # rect="=,+0,=,+16" - # prefix= " " - # xanchor=right - # yanchor=fixed - #[/unit_race] - [unit_traits] + [unit_alignment] + prefix= " " + #font_rgb=200,200,300 + font_rgb=145,130,93 + #, 255 ref=unit-type - id=unit-traits + id=unit-alignment font_size={DEFAULT_FONT_SMALL} - rect="=,+0,1022,+16" + rect="=,+0,=,+16" xanchor=right yanchor=fixed - [/unit_traits] + [/unit_alignment] [unit_abilities] + prefix= " " + # prefix_literal=" " + font_rgb=245,230,193 id=unit-abilities font_size={DEFAULT_FONT_SMALL} rect="=,+0,=,+16" xanchor=right yanchor=fixed [/unit_abilities] + [unit_race] + id=unit-race + font_size={DEFAULT_FONT_SMALL} + rect="=,+0,=,+16" + xanchor=right + yanchor=fixed + [/unit_race] + [unit_traits] + #ref=unit-type + id=unit-traits + prefix= " " + font_size={DEFAULT_FONT_SMALL} + rect="=,+0,1022,+16" + xanchor=right + yanchor=fixed + [/unit_traits] [unit_vision] id=unit-vision - font_size={DEFAULT_FONT_SMALL} - rect="=,+0,=+2,+16" - #prefix= _ "statuspanel^vision" - #prefix_literal=": " + font_size={DEFAULT_FONT_TINY} + ref=label-xp + rect="+0,=,=+60,+40" xanchor=right yanchor=fixed [/unit_vision] @@ -429,8 +459,7 @@ font_size={DEFAULT_FONT_SMALL} ref=label-hp rect="=,+0,+94,+14" - #prefix=hp - #prefix_literal=" " + prefix_literal=" " xanchor=right yanchor=fixed [/unit_hp] @@ -439,8 +468,7 @@ font_size={DEFAULT_FONT_SMALL} ref=label-xp rect="=,+0,=,+14" - #prefix=xp - #prefix_literal=" " + prefix_literal=" " xanchor=right yanchor=fixed [/unit_xp] @@ -449,8 +477,7 @@ id=unit-moves font_size={DEFAULT_FONT_SMALL} rect="=,+0,=,+16" - #prefix= _ "statuspanel^moves" - #prefix_literal=": " + prefix_literal=" " xanchor=right yanchor=fixed [/unit_moves] @@ -467,19 +494,11 @@ # current position not usable, overlays with the status indication (like slow) # please find a better place (yes, I know that this is barely possible...) - # [unit_side] - # id=unit-side - # font_size={DEFAULT_FONT_SMALL} - # ref=unit-xp - # rect="=,+0,=,+16" - # xanchor=right - # yanchor=fixed - # [/unit_side] [unit_weapons] id=unit-weapons font_size={DEFAULT_FONT_SMALL} - ref=unit-vision - rect="=+0,+0,=,710" + ref=unit-traits + rect="=+0,+12,=,705" xanchor=right yanchor=top [/unit_weapons] @@ -494,127 +513,62 @@ width=1024 height=600 - # use right pane with a smaller minimap + {MINIMAP_THEME_600} + [change] - id=minimap-panel - image=themes/classic/minimap-800.png - rect="843,=+2,+181,+155" + id=unit-description + font_size={DEFAULT_FONT_SMALL} + rect="=,+0,+140,+{DEFAULT_FONT_SMALL_HEIGHT}" [/change] - # increase size in middle panel since minimap is smaller - - # reduce size of minimap [change] - id=mini-map - rect="=+51,=+10,=-14,+131" + id=unit-type + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,+{DEFAULT_FONT_TINY_HEIGHT}" + [/change] + # # # placing the unit level right of the alignment + # # # doing it the other way around leads to a strange problem sometimes having the alingment not being displayed + # # # this does not happen with this order + [change] + id=unit-level + font_size={DEFAULT_FONT_TINY} + rect="+0,=+0,+50,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] - [remove] - id=map-zoom-slider - [/remove] [change] - id=minimap-button-1 - ref=minimap-panel - rect="=+15,=+5,+25,+25" + id=unit-alignment + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] [change] - id=minimap-button-2 - #ref=zoom_default_button_editor - rect="=,-1,25,+25" + id=unit-traits + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] [change] - id=minimap-button-3 - #ref=zoom_in_button_editor - rect="=,-1,+25,+25" + id=unit-abilities + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] [change] - id=minimap-button-4 - rect="=,-1,+25,+25" + id=unit-vision + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] [change] - id=minimap-button-5 - # id=flip_map_button_editor - rect="=,-1,+25,+25" + id=unit-race + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] [change] - id=minimap-button-6 - # id=flip_map_button_editor - rect="=,-1,+25,+25" + id=unit-weapons + font_size={DEFAULT_FONT_TINY} + rect="=,+0,=,740" [/change] - [change] - id=terrain-info-box-topleft - ref=minimap-panel - rect="=+4,+1,+3,+3" + id=button-endturn + image=button_normal/button_H22 + rect="-140,-24,+80,+22" [/change] - - # {CHANGE_STATUS_BOX =+9 +1 +122 +36 tod} - # {CHANGE_STATUS_BOX =-125 +2 +72 +72 unit} - - # [change] - # id=unit-description - # font_size={DEFAULT_FONT_SMALL} - # rect="=+9,=+3,=-2,+16" - # [/change] - # [change] - # id=unit-type - # font_size={DEFAULT_FONT_TINY} - # rect="=,+0,=,+11" - # [/change] - # # placing the unit level right of the alignment - # # doing it the other way around leads to a strange problem sometimes having the alingment not being displayed - # # this does not happen with this order - # [change] - # id=unit-level - # font_size={DEFAULT_FONT_TINY} - # rect="=+72,+0,=,+11" - # [/change] - # [change] - # id=unit-alignment - # font_size={DEFAULT_FONT_TINY} - # rect="=-72,=,=,+11" - # [/change] - # [change] - # id=unit-traits - # font_size={DEFAULT_FONT_TINY} - # rect="=,+0,=,+11" - # [/change] - # [change] - # id=unit-abilities - # font_size={DEFAULT_FONT_TINY} - # rect="=,+0,=,+11" - # [/change] - # [change] - # id=unit-moves - # font_size={DEFAULT_FONT_TINY} - # rect="=,+0,=,+11" - # [/change] - # [change] - # id=unit-defense - # font_size={DEFAULT_FONT_TINY} - # rect="=,+0,=,+11" - # [/change] - # [change] - # id=unit-race - # font_size={DEFAULT_FONT_TINY} - # rect="=,+0,=,+11" - # [/change] - - # # [change] - # # id=unit-description - # # rect="=+3,+2,+200,+18" - # # [/change] - - # [change] - # id=button-endturn - # image=button_normal/button_H22 - # rect="-140,-24,+80,+20" - # [/change] - # # adjust allowed heigth for displaying weapon stuff - # [change] - # id=unit-weapons - # ref=unit-defense - # font_size={DEFAULT_FONT_TINY} - # rect="=+0,+0,=,738" - # [/change] + [/partialresolution] [partialresolution] @@ -645,32 +599,32 @@ [change] id=turn - rect="+4,=+1,+55,+16" + rect="+4,=+1,+55,+{DEFAULT_FONT_TINY_HEIGHT}" font_size={DEFAULT_FONT_TINY} [/change] [change] id=gold - rect="+4,=+1,+45,+16" + rect="+4,=+1,+45,+{DEFAULT_FONT_TINY_HEIGHT}" font_size={DEFAULT_FONT_TINY} [/change] [change] id=villages - rect="+4,=+1,+45,+16" + rect="+4,=+1,+45,+{DEFAULT_FONT_TINY_HEIGHT}" font_size={DEFAULT_FONT_TINY} [/change] [change] id=num-units - rect="+4,=+1,+45,+16" + rect="+4,=+1,+45,+{DEFAULT_FONT_TINY_HEIGHT}" font_size={DEFAULT_FONT_TINY} [/change] [change] id=status-upkeep - rect="+4,=+1,+40,+16" + rect="+4,=+1,+40,+{DEFAULT_FONT_TINY_HEIGHT}" font_size={DEFAULT_FONT_TINY} [/change] [change] id=status-income - rect="+4,=+1,+50,+16" + rect="+4,=+1,+50,+{DEFAULT_FONT_TINY_HEIGHT}" font_size={DEFAULT_FONT_TINY} [/change] [change] @@ -680,13 +634,8 @@ [change] id=report_timeout font_size={DEFAULT_FONT_TINY} - rect="+0,=,+55,+20" + rect="+0,=,+55,+{DEFAULT_FONT_TINY_HEIGHT}" [/change] - #[change] - # id=status-position - # rect="=+5,=,+80,=" - # font_size={DEFAULT_FONT_TINY} - #[/change] [/partialresolution] [partialresolution] @@ -694,69 +643,54 @@ inherits=800x600 width=800 height=480 - #[remove] - # id=unit-race - #[/remove] {REMOVE_STATUS_BOX tod} - {CHANGE_STATUS_BOX =+5 +5 +72 +72 unit terrain-description-box-botleft} - - # [change] - # id=unit-box-topleft - # ref=terrain-description-box-botleft - # rect="=+4,+1,+3,+3" - # [/change] + {CHANGE_STATUS_BOX = +5 +72 +72 unit terrain-description-box-botleft} # use smaller fonts to display things correctly when using a vertical resolution smaller than 600px [change] id=unit-description font_size={DEFAULT_FONT_SMALL} - # rect="=+9,=+3,=-2,+16" + rect="=+3,=+3,1022,+{DEFAULT_FONT_SMALL_HEIGHT}" [/change] [change] id=unit-type font_size={DEFAULT_FONT_REALLYTINY} - # rect="=,+0,=,+11" + rect="=,+0,=,+{DEFAULT_FONT_REALLYTINY_HEIGHT}" [/change] - # # placing the unit level right of the alignment - # # doing it the other way around leads to a strange problem sometimes having the alingment not being displayed - # # this does not happen with this order + # # # placing the unit level right of the alignment + # # # doing it the other way around leads to a strange problem sometimes having the alingment not being displayed + # # # this does not happen with this order [change] id=unit-level font_size={DEFAULT_FONT_REALLYTINY} - # rect="=+72,+0,=,+11" + rect="+0,+0,=,+{DEFAULT_FONT_REALLYTINY_HEIGHT}" [/change] [change] - id=unit-alignment + id=unit-race font_size={DEFAULT_FONT_REALLYTINY} - # rect="=-72,=,=,+11" + rect="=,+0,=,+{DEFAULT_FONT_REALLYTINY_HEIGHT}" [/change] [change] - id=unit-traits + id=unit-alignment font_size={DEFAULT_FONT_REALLYTINY} - # rect="=,+0,=,+11" + rect="=,+0,=,+{DEFAULT_FONT_REALLYTINY_HEIGHT}" [/change] [change] - id=unit-abilities + id=unit-traits font_size={DEFAULT_FONT_REALLYTINY} - # rect="=,+0,=,+11" + rect="=,+0,=,+{DEFAULT_FONT_REALLYTINY_HEIGHT}" [/change] [change] - id=unit-moves + id=unit-abilities font_size={DEFAULT_FONT_REALLYTINY} - # rect="=,+0,=,+11" + rect="=,+0,=,+{DEFAULT_FONT_REALLYTINY_HEIGHT}" [/change] - # [remove] - # id=unit-defense - # [/remove] - # [remove] - # id=unit-weapons - # [/remove] [change] id=unit-weapons - # ref=unit-moves font_size={DEFAULT_FONT_REALLYTINY} - # rect="=+0,+0,=,504" + rect="=,+0,=,740" + #rect="=+0,+0,=,504" [/change] [/partialresolution] [/theme] @@ -765,3 +699,8 @@ #undef DEFAULT_FONT_SMALL #undef DEFAULT_FONT_TINY #undef DEFAULT_FONT_REALLYTINY + +#undef DEFAULT_FONT_NORMAL_HEIGHT +#undef DEFAULT_FONT_SMALL_HEIGHT +#undef DEFAULT_FONT_TINY_HEIGHT +#undef DEFAULT_FONT_REALLYTINY_HEIGHT diff --git a/data/themes/editor.cfg b/data/themes/editor.cfg index 14697b8a0947..2798e31b75ee 100644 --- a/data/themes/editor.cfg +++ b/data/themes/editor.cfg @@ -46,7 +46,6 @@ id=top-panel image=themes/classic/menubar.png ref=screen - # rect="=,=,833,+27" rect="=,=,1024,+27" xanchor=top yanchor=fixed @@ -63,24 +62,19 @@ id=menu-editor-file title= _ "File" type=turbo - #image=button_menu/menu_button_small_copper_H18 - #image=lite font_size=9 items=editor-scenario-edit,statustable,unitlist,editor-map-new,editor-scenario-new,editor-map-load,editor-map-revert,editor-map-save,editor-map-save-as,editor-scenario-save-as,editor-map-save-all,preferences,help,editor-close-map,quit-editor,editor-quit-to-desktop ref=top-panel rect="=+1,=+1,+100,+20" - #rect="=+3,=+1,+55,=-4" xanchor=fixed yanchor=fixed [/menu] # [menu] # id=menu-editor-edit # title= _ "Edit" - # #image=button_menu/menu_button_small_copper_H18 # image=lite # font_size={DEFAULT_EDITOR_FONT_SMALL} # items=undo,redo,editor-cut,editor-copy,editor-paste,editor-selection-name,editor-export-selection-coords,editor-select-all,editor-select-inverse,editor-select-none, editor-selection-fill,editor-selection-rotate,editor-selection-flip, editor-selection-generate,editor-selection-randomize - # #rect="+2,=,+55,=" # rect="+2,=,+100,=" # xanchor=fixed # yanchor=fixed @@ -90,7 +84,7 @@ title= _ "Map" image=button_menu/menu_button_copper_H20 items=editor-map-resize,editor-map-rotate,editor-map-generate, editor-map-apply-mask,editor-map-create-mask-to,menu-editor-transitions,editor-refresh,editor-refresh-image-cache,togglegrid,editor-draw-coordinates,editor-draw-terrain-codes - rect="+1,=,+100,=" + rect="+1,=,+100,+20" xanchor=fixed yanchor=fixed [/menu] @@ -134,7 +128,6 @@ [menu] id=menu-editor-side title= _ "Side" - #image=lite image=button_menu/menu_button_copper_H20 font_size={DEFAULT_EDITOR_FONT_SMALL} items=editor-switch-side,editor-side-new,editor-side-edit,editor-side-remove @@ -205,7 +198,6 @@ [action] id=top_button_file1 items=editor-map-load - #type= image=button_square/button_square_30 auto_tooltip=yes tooltip_name_prepend=yes @@ -218,7 +210,6 @@ id=top_button_file2 items=editor-map-save image=button_square/button_square_30 - #tooltip= _ "" auto_tooltip=yes tooltip_name_prepend=yes rect="+1,=,+30,+30" @@ -229,7 +220,6 @@ id=top_button_file3 items=editor-close-map image=button_square/button_square_30 - #tooltip= _ "" auto_tooltip=yes tooltip_name_prepend=yes rect="+1,=,+30,+30" @@ -238,7 +228,6 @@ [/action] [panel] id=top_separator1 - #image=themes/editor/classic/menubar_rightside.png rect="+1,=,+10,+27" xanchor=fixed yanchor=fixed @@ -277,8 +266,6 @@ [/action] [panel] id=top_separator2 - # image=themes/editor/classic/menubar_rightside.png - # ref=replay-panel rect="+1,=,+10,+27" xanchor=fixed yanchor=fixed @@ -289,7 +276,6 @@ items=editor-select-all type=radiobox image=button_square/button_square_30 - #tooltip= _ "" tooltip_name_prepend=yes rect="+1,=,+30,+30" xanchor=fixed @@ -300,7 +286,6 @@ items=editor-select-none type=radiobox image=button_square/button_square_30 - #tooltip= _ "" auto_tooltip=yes tooltip_name_prepend=yes rect="+1,=,+30,+30" @@ -310,9 +295,7 @@ [action] id=top_button_select3 items=editor-select-inverse - #type=radiobox image=button_square/button_square_30 - #tooltip= _ "" auto_tooltip=yes tooltip_name_prepend=yes rect="+1,=,+30,+30" @@ -322,9 +305,7 @@ [action] id=top_button_select4 items=editor-selection-fill - #type=radiobox image=button_square/button_square_30 - #tooltip= _ "" auto_tooltip=yes tooltip_name_prepend=yes rect="+1,=,+30,+30" @@ -336,7 +317,6 @@ items=editor-selection-randomize type=radiobox image=button_square/button_square_30 - #tooltip= _ "" auto_tooltip=yes tooltip_name_prepend=yes rect="+1,=,+30,+30" @@ -358,7 +338,6 @@ [panel] id=top_separator3 - #image=themes/editor/classic/menubar_rightside.png rect="+1,=,+10,+27" xanchor=fixed yanchor=fixed @@ -405,8 +384,6 @@ ## others, not yet determined [panel] id=top_seperator3 - # image=themes/editor/classic/menubar_rightside.png - # ref=replay-panel rect="+1,=,+10,+27" xanchor=fixed yanchor=fixed @@ -414,45 +391,7 @@ # [action] # id=top_button13 # items=null - # type=radiobox - # image=button_square/button_square_30 - # #tooltip= _ "" - # auto_tooltip=yes - # tooltip_name_prepend=yes - # rect="+1,=,+30,+30" - # xanchor=fixed - # yanchor=fixed - # [/action] - # [action] - # id=top_button14 - # items=null - # type=radiobox - # image=button_square/button_square_30 - # #tooltip= _ "" - # auto_tooltip=yes - # tooltip_name_prepend=yes - # rect="+1,=,+30,+30" - # xanchor=fixed - # yanchor=fixed - # [/action] - # [action] - # id=top_button15 - # items=null - # type=radiobox - # image=button_square/button_square_30 - # #tooltip= _ "" - # auto_tooltip=yes - # tooltip_name_prepend=yes - # rect="+1,=,+30,+30" - # xanchor=fixed - # yanchor=fixed - # [/action] - # [action] - # id=top_button16 - # items=null - # type=radiobox # image=button_square/button_square_30 - # #tooltip= _ "" # auto_tooltip=yes # tooltip_name_prepend=yes # rect="+1,=,+30,+30" @@ -466,7 +405,6 @@ items=togglegrid type=checkbox image=button_square/button_square_30 - #overlay=editor/tool/editor_tools_icons_toggle-grid tooltip_name_prepend=yes rect="810,=,+30,+30" xanchor=right @@ -477,7 +415,6 @@ items=editor-draw-coordinates type=checkbox image=button_square/button_square_30 - #overlay=editor/tool/editor_tools_icons_toggle-grid tooltip_name_prepend=yes rect="=-31,=,+30,+30" xanchor=right @@ -488,7 +425,6 @@ items=editor-draw-terrain-codes type=checkbox image=button_square/button_square_30 - #overlay=editor/tool/editor_tools_icons_toggle-grid tooltip_name_prepend=yes rect="=-31,=,+30,+30" xanchor=right @@ -496,8 +432,6 @@ [/action] [panel] id=top_separator4 - # image=themes/editor/classic/menubar_rightside.png - # ref=replay-panel rect="=-11,=,+10,+27" xanchor=fixed yanchor=fixed @@ -552,35 +486,9 @@ xanchor=left yanchor=top [/main_map] - [main_map_border] - border_size = 0.5 - background_image = "terrain/off-map/background.png" - - # this image is processed by the terrain matching code so should be - # in the terrains directory and should ommit the 'terrain/' prefix - # and the '.png' suffix - tile_image = "off-map/alpha.png" - corner_image_top_left = "terrain/off-map/fade_corner_top_left_editor.png" - corner_image_bottom_left = "terrain/off-map/fade_corner_bottom_left_editor.png" + {MAIN_MAP_BORDER} - # odd means the corner is on a tile with an odd x value, - # the tile is the ingame tile not the odd in C++ - corner_image_top_right_odd = "terrain/off-map/fade_corner_top_right_odd_editor.png" - corner_image_top_right_even = "terrain/off-map/fade_corner_top_right_even_editor.png" - - corner_image_bottom_right_odd = "terrain/off-map/fade_corner_bottom_right_odd_editor.png" - corner_image_bottom_right_even = "terrain/off-map/fade_corner_bottom_right_even_editor.png" - - border_image_left = "terrain/off-map/fade_border_left_editor.png" - border_image_right = "terrain/off-map/fade_border_right_editor.png" - - border_image_top_odd = "terrain/off-map/fade_border_top_odd_editor.png" - border_image_top_even = "terrain/off-map/fade_border_top_even_editor.png" - - border_image_bottom_odd = "terrain/off-map/fade_border_bottom_odd_editor.png" - border_image_bottom_even = "terrain/off-map/fade_border_bottom_even_editor.png" - [/main_map_border] [panel] id=border-right image=themes/editor/classic/mapframe_rightside.png @@ -588,6 +496,7 @@ xanchor=right yanchor=top [/panel] + #[panel] # id=mapframe-corner # image=themes/editor/classic/mapframe_corner.png @@ -602,224 +511,18 @@ id=top-right-panel image=themes/classic/sidebar.png ref=screen - #ref=top-panel rect="843,0,1024,768" xanchor=right yanchor=top [/panel] - # [panel] - # id=terrain-panel - # image=themes/status_box/status_box_H20W168.png - # rect="=+9,=+1,+168,+20" - # xanchor=right - # yanchor=fixed - # [/panel] - # [label] - # id=terrain-icon - # icon=icons/terrain/terrain_type_info.png - # text= _ "terrain" - # rect="=+5,=+2,+20,+16" - # xanchor=right - # yanchor=fixed - # [/label] - - ####### MiniMap - [panel] - id=minimap-panel - image=themes/classic/minimap.png - #ref=screen - #ref=top-panel - rect="843,=+6,+181,+214" - xanchor=right - yanchor=fixed - [/panel] - - {STATUS_BOX =+6 +25 +165 +15 terrain-info minimap-panel right fixed} - #[label] - # id=terrain-icon - # icon=icons/terrain/terrain_type_info.png - # text= _ "terrain" - # ref=terrain-info-box-center - # rect="=-1,=-1,+20,+16" - # xanchor=right - # yanchor=fixed - #[/label] - {STATUS_BOX =+0 -2 +165 +15 terrain-description terrain-info-box-botleft right fixed} - [terrain] - id=terrain-description - ref=terrain-description-box-center - rect="=-1,=-1,+20,+16" - xanchor=right - yanchor=fixed - [/terrain] - - [mini_map] - id=mini-map - ref=minimap-panel - rect="=+16,=+9,=-17,+182" - xanchor=right - yanchor=fixed - [/mini_map] - [action] - id=minimap-button-1 - ref=minimap-panel - type=checkbox - image=button_square/button_square_25 - items=zoomdefault - auto_tooltip=yes - rect="=+11,-3,+25,+25" - xanchor=right - yanchor=fixed - [/action] - [action] - id=minimap-button-2 - items=minimap-draw-terrain - overlay=icons/action/togglegrid_25 - type=checkbox - image=button_square/button_square_25 - auto_tooltip=yes - rect="+1,=,+25,+25" - xanchor=right - yanchor=fixed - [/action] - [action] - id=minimap-button-3 - items=minimap-draw-units - type=checkbox - overlay=icons/action/editor-tool-unit_25 - image=button_square/button_square_25 - auto_tooltip=yes - rect="+1,=,+25,+25" - xanchor=right - yanchor=fixed - [/action] - [action] - id=minimap-button-4 - items=minimap-draw-villages - overlay=icons/action/editor-tool-village_25 - type=checkbox - image=button_square/button_square_25 - tooltip_name_prepend=yes - rect="+1,=,+25,+25" - xanchor=right - yanchor=fixed - [/action] - [action] - id=minimap-button-5 - items=minimap-unit-coding - type=checkbox - image=button_square/button_square_25 - auto_tooltip=yes - rect="+1,=,+25,+25" - xanchor=right - yanchor=fixed - [/action] - [action] - id=minimap-button-6 - type=checkbox - items=minimap-terrain-coding - image=button_square/button_square_25 - auto_tooltip=yes - rect="+1,=,+25,+25" - xanchor=right - yanchor=fixed - [/action] - - [slider] - image=buttons/sliders/slider_arrow_gold - id=map-zoom-slider - black_line=yes - ref=mini-map - rect="=+32,+1,+117,+18" - xanchor=right - yanchor=fixed - [/slider] - - # [panel] - # id=terrain-info-panel - # ref=top-panel - # image=themes/status_box/status_box_H20W145.png - # rect="-138,=+1,+145,+20" - # xanchor=fixed - # yanchor=fixed - # [/panel] - - # [mini_map] - # id=mini-map - # #ref=top-right-panel - # rect="=+51,=+9,=-14,+158" - # xanchor=right - # yanchor=fixed - # [/mini_map] - - # [action] - # id=zoom_default_button_editor - # items=zoomdefault - # type=checkbox - # image=button_square/button_square_30 - # auto_tooltip=yes - # rect="=-33,=-1,+30,+30" - # xanchor=right - # yanchor=fixed - # [/action] - # [action] - # id=zoom_in_button_editor - # items=zoomin - # type=turbo - # image=button_square/button_square_30 - # auto_tooltip=yes - # rect="=,+2,+30,+30" - # xanchor=right - # yanchor=fixed - # [/action] - # [action] - # id=zoom_out_button_editor - # items=zoomout - # type=turbo - # image=button_square/button_square_30 - # auto_tooltip=yes - # rect="=,+2,+30,+30" - # xanchor=right - # yanchor=fixed - # [/action] - # [action] - # id=resize_button_editor - # items=editor-map-resize - # #type=press - # image=button_square/button_square_30 - # tooltip_name_prepend=yes - # rect="=,+2,+30,+30" - # xanchor=right - # yanchor=fixed - # [/action] - # [action] - # id=flip_map_button_editor - # type=checkbox - # image=button_square/button_square_30 - # items=editor-map-flip - # tooltip= _ "Not implemented yet." - # tooltip_name_prepend=yes - # rect="=,+2,+30,+30" - # xanchor=right - # yanchor=fixed - # [/action] - - # [slider] - # image=buttons/sliders/slider_arrow_gold - # id=map-zoom-slider - # black_line=yes - # ref=mini-map - # rect="=,+1,+117,+18" - # xanchor=right - # yanchor=fixed - # [/slider] + {MINIMAP_THEME} ####### Main Toolbar [panel] id=tools-panel image=themes/editor/classic/tools.png - ref=terrain-description-box-botleft #minimap-panel + ref=terrain-description-box-botleft rect="=-7,+3,+181,+155" xanchor=right yanchor=fixed @@ -938,19 +641,10 @@ yanchor=fixed [/action] - # [panel] - # id=tools-options-panel - # image=themes/editor/classic/tools_options.png - # ref=tools-panel - # rect="=,+0,=,+75" - # xanchor=right - # yanchor=fixed - # [/panel] ####### 3rd row [action] id=tool-button11 items=editor-clipboard-flip-horizontal - #type=radiobox image=button_square/button_square_30 auto_tooltip=yes tooltip_name_prepend=yes @@ -962,7 +656,6 @@ [action] id=tool-button12 items=editor-clipboard-flip-vertical - #type=radiobox image=button_square/button_square_30 auto_tooltip=yes tooltip_name_prepend=yes @@ -973,7 +666,6 @@ [action] id=tool-button13 items=editor-clipboard-rotate-cw - #type=radiobox image=button_square/button_square_30 auto_tooltip=yes tooltip_name_prepend=yes @@ -984,7 +676,6 @@ [action] id=tool-button14 items=editor-clipboard-rotate-ccw - type=radiobox image=button_square/button_square_30 auto_tooltip=yes tooltip_name_prepend=yes @@ -995,8 +686,6 @@ [action] id=tool-button15 items=null - #type=radiobox - #auto_tooltip=yes image=button_square/button_square_30 rect="+2,=,+30,+30" xanchor=right @@ -1109,7 +798,6 @@ [panel] id=palette-panel image=themes/editor/classic/palette.png - #ref=tools-options-panel rect="=,+0,=,768" xanchor=right yanchor=top @@ -1155,18 +843,10 @@ ref=terrain-description-box-center rect="=+1,=+1,+165,+16" font_size={DEFAULT_EDITOR_FONT_REALLYTINY} - #font_size={DEFAULT_FONT_ xanchor=right yanchor=fixed [/terrain] - # [terrain_image] - # id=terrain_image - # ref=menu-editor-terrain - # rect="+4,=-2,+25,+25" - # xanchor=right - # yanchor=fixed - # [/terrain_image] # [side_playing] # id=icon-sideplaying # ref=turn-panel @@ -1213,41 +893,7 @@ prefix="" #wmllint: ignore prefix_literal="" [/num_units] - # This panel encloses the location information displays and the - # observer icon. This separate container is used so that we can - # make the terrain name display stretch to fill all available space - # so that the long strings don't get cut off as easily. - # The size of these rectangles only accommodates hex coordinates - # up to 99. If either is over that maximum the movement cost will - # be pushed off the right end. - # [position] - # id=status-position - # #font_size={DEFAULT_EDITOR_FONT_SMALL} - # #font_size={DEFAULT_EDITOR_FONT_NORMAL} - # ref=terrain-icon - # #ref=top-panel - # rect="+4,=,+60,+16" - # #rect="-65,=+4,=-5,=" - # xanchor=right - # yanchor=fixed - # [/position] - # [terrain_info] - # id=status-terrain - # rect="+2,=,+70,+16" - # xanchor=right - # yanchor=fixed - # [/terrain_info] - # [terrain] - # id=status-terrain - # ref=terrain-panel - # font_size={DEFAULT_EDITOR_FONT_REALLYTINY} - #font_size={DEFAULT_EDITOR_FONT_SMALL} - #rect="=+115,=,=-24,=" - # rect="=+3,=+6,1024,+16" - # xanchor=right - # yanchor=fixed - # [/terrain] [/status] [/resolution] @@ -1258,64 +904,13 @@ width=1024 height=600 - # some changes to the display to have stuff look better on 800x600 - # using a right pane with a smaller minimap to achieve this - # use backgound with 40px less for minimap - - [change] - id=minimap-panel - image=themes/classic/minimap-800.png - #ref=screen - #rect="843,0,1024,155" - rect="843,=+3,+181,+155" - #xanchor=right - #yanchor=fixed - [/change] - [change] - id=mini-map - rect="=+51,=+10,=-14,+131" - [/change] - [remove] - id=map-zoom-slider - [/remove] - [change] - id=zoom_default_button_editor - rect="=-33,=+0,+25,+25" - #rect="=+18,=+31,+25,+25" - image=button_square/button_square_25 - [/change] - [change] - id=zoom_in_button_editor - rect="=,+2,+25,+25" - image=button_square/button_square_25 - [/change] - [change] - id=zoom_out_button_editor - rect="=,+2,+25,+25" - image=button_square/button_square_25 - [/change] - [change] - id=resize_button_editor - rect="=,+2,+25,+25" - image=button_square/button_square_25 - [/change] - [change] - id=flip_map_button_editor - rect="=,+2,+25,+25" - image=button_square/button_square_25 - [/change] - - ############################### + {MINIMAP_THEME_600} [change] id=tools-panel image=themes/editor/classic/tools-800.png - #ref=top-right-panel - rect="=,+0,+181,+92" - #xanchor=right - #yanchor=fixed + rect="=-7,+3,+181,+92" [/change] - [change] id=tool-button1 rect="=+13,=+5,+25,+25" @@ -1341,7 +936,7 @@ rect="+1,=,+25,+25" image=button_square/button_square_25 [/change] - ######## + [change] id=tool-button6 rect="=+0,+1+25,+25" @@ -1367,52 +962,34 @@ rect="+1,=,+25,+25" image=button_square/button_square_25 [/change] - ################### [remove] id=tool-button14 - #rect="+2,=,+25,+25" - image=button_square/button_square_25 [/remove] [remove] id=tool-button15 - #rect="+2,=,+25,+25" - image=button_square/button_square_25 [/remove] - - # [change] - # id=tool-button15 - #id=utility-button2 - # rect="+2,=,+25,+25" - # image=button_square/button_square_25 - # [/change] - [change] id=tool-button16 ref=tool-button6 rect="=,+28,+25,+25" image=button_square/button_square_25 [/change] - [change] id=tool-button17 rect="+1,=,+25,+25" image=button_square/button_square_25 [/change] - [change] id=tool-button18 rect="+1,=,+25,+25" image=button_square/button_square_25 [/change] - [change] id=tool-button19 - #id=editor_brush_nw-se rect="+1,=,+25,+25" image=button_square/button_square_25 [/change] - [change] id=tool-button20 rect="+1,=,+25,+25" @@ -1425,86 +1002,32 @@ rect="+4,=+1,+25,+25" image=button_square/button_square_25 [/change] - [change] id=tool-button12 ref=tool-button11 rect="=,+1,+25,+25" image=button_square/button_square_25 [/change] - [change] id=tool-button13 - #id=utility-button3 ref=tool-button12 rect="=,+1,+25,+25" image=button_square/button_square_25 [/change] - # [change] - # id=top-right-panel - # image=themes/rightside-editor-small.png - # rect="+0,=+0,1024,+215" - # [/change] - # # reduce vertical size of minimap by 40px - # [change] - # id=mini-map - # rect="=+10,=+7,=-7,+94" - # [/change] - # [change] - # id=undo_button_editor - # ref=flood_button_editor - # [/change] - [change] id=menu-editor-terrain - #items=editor-palette-groups - #type=turbo - #title= _ "Group space" - #image=button_square/button_square_30 - #image=editor/group/group_all - #font_size=9 - #rect="=-1,=-41,+30,+30" - #rect="=-1,=-41,+30,+30" - #xanchor=right - #yanchor=fixed + rect="=+12,+1,+30,+30" [/change] [change] id=menu-editor-flip-palette-selection - #items=editor-terrain-palette-swap image=button_square/button_square_25 - #type=turbo rect="+39,=,+25,+25" - #xanchor=right - #yanchor=fixed [/change] [change] id=upscroll-button-editor - # type=turbo - # image=editor/button-25_base - # image=uparrow-button - # items=editor-palette-upscroll rect="+7,=+0,+25,+25" - # xanchor=right - # yanchor=fixed [/change] - #[action] - # type=turbo - # id=downscroll-button-editor - # #image=editor/button-25_base - # image=downarrow-button - # items=editor-palette-downscroll - # rect="+7,=+0,+25,+25" - # xanchor=right - # yanchor=fixed - #[/action] - - #[change] - # id=palette - # rect="=+15,=-33,+250,+465" - # #xanchor=right - # #yanchor=top - #[/change] [/partialresolution] ########################################## 800x600 ########################################### @@ -1517,81 +1040,45 @@ [remove] id=top_button_file3 [/remove] - #[remove] - #id=villages-panel - # image=themes/status-bg.png - # rect="+5,=+1,+71,+19" - # xanchor=fixed - # yanchor=fixed - #[/remove] + [remove] + id=villages-panel + [/remove] [remove] id=villages-icon - # icon=themes/villages.png - # text= _ "villages" - # ref=villages-panel - # rect="=+5,=+1,+16,+16" - # xanchor=fixed - # yanchor=fixed [/remove] [remove] id=units-panel - # image=themes/status-bg.png - # ref=villages-panel - # rect="+5,=,+71,+19" - # xanchor=fixed - # yanchor=fixed [/remove] [remove] id=units-icon - # icon=themes/units.png - # text= _ "units" - # ref=units-panel - # rect="=+5,=+1,+16,+16" - # xanchor=fixed - # yanchor=fixed [/remove] [remove] #TODO rename since we don't display turns, only sides id=turn-panel - # ref=units-panel - # image=themes/status-bg.png - # rect="+5,=,+71,+19" - # xanchor=fixed - # yanchor=fixed [/remove] - - # [change] - # id=status-terrain - # #TODO - # ref=terrain-panel - # rect="+115,=,=-24,=" - # font_size={DEFAULT_EDITOR_FONT_TINY} - # xanchor=left - # yanchor=fixed - # [/change] [/partialresolution] - ########################################## 800x480 ########################################### - [partialresolution] - id=800x480 - inherits=800x600 - width=800 - height=480 - - # [remove] - # id=undo_button_editor - # [/remove] - # [remove] - # id=redo_button_editor - # [/remove] - # [remove] - # id=zoom_in_button_editor - # [/remove] - # [remove] - # id=zoom_out_button_editor - # [/remove] - # [remove] - # id=zoom_default_button_editor - # [/remove] - [/partialresolution] + # ########################################## 800x480 ########################################### + # [partialresolution] + # id=800x480 + # inherits=800x600 + # width=800 + # height=480 + + # # [remove] + # # id=undo_button_editor + # # [/remove] + # # [remove] + # # id=redo_button_editor + # # [/remove] + # # [remove] + # # id=zoom_in_button_editor + # # [/remove] + # # [remove] + # # id=zoom_out_button_editor + # # [/remove] + # # [remove] + # # id=zoom_default_button_editor + # # [/remove] + # [/partialresolution] [/theme] diff --git a/players_changelog b/players_changelog index dad82c9eca2f..767fe3cbb4ae 100644 --- a/players_changelog +++ b/players_changelog @@ -99,6 +99,10 @@ Version 1.11.9: enabled in-game. * User interface: + * Corrected most of the issues left with the new default theme. + * Reintroduced the alignment, race and side being shown in the sidebar. + * Adjusted the theme to the size and shape of the new minimap frame images. + * Certain changes to the used text colors, sizes and alignment. * Restored the old controll scheme as the default * Fixed hidden variations of unit types (hide_help=yes) being listed in the help browser when they shouldn't. diff --git a/src/reports.cpp b/src/reports.cpp index b2e19d26c4ea..731d5a46d877 100644 --- a/src/reports.cpp +++ b/src/reports.cpp @@ -175,7 +175,7 @@ static config unit_type(const unit* u) { if (!u) return report(); std::ostringstream str, tooltip; - str << span_color(font::unit_type_color) << u->type_name() << naps; + str << u->type_name(); tooltip << _("Type: ") << "" << u->type_name() << "\n" << u->unit_description(); return text_report(str.str(), tooltip.str(), "unit_" + u->type_id()); @@ -195,7 +195,7 @@ static config unit_race(const unit* u) { if (!u) return report(); std::ostringstream str, tooltip; - str << span_color(font::race_color) << u->race()->name(u->gender()) << naps; + str << u->race()->name(u->gender()); tooltip << _("Race: ") << "" << u->race()->name(u->gender()) << ""; return text_report(str.str(), tooltip.str(), "..race_" + u->race()->id()); } @@ -213,6 +213,8 @@ REPORT_GENERATOR(selected_unit_race) static config unit_side(const unit* u) { if (!u) return report(); + + config report; const team &u_team = (*resources::teams)[u->side() - 1]; std::string flag_icon = u_team.flag_icon(); std::string old_rgb = game_config::flag_rgb; @@ -220,7 +222,13 @@ static config unit_side(const unit* u) std::string mods = "~RC(" + old_rgb + ">" + new_rgb + ")"; if (flag_icon.empty()) flag_icon = game_config::images::flag_icon; - return image_report(flag_icon + mods, u_team.current_player()); + + std::stringstream text; + text << u->side(); + + add_image(report, flag_icon + mods, u_team.current_player(), ""); + add_text(report, text.str(), "", ""); + return report; } REPORT_GENERATOR(unit_side) { @@ -281,7 +289,7 @@ static config unit_traits(const unit* u) for (unsigned i = 0; i < nb; ++i) { std::ostringstream str, tooltip; - str << traits[i]; + str << span_color(font::weapon_color) << traits[i] << naps; if (i != nb - 1 ) str << ", "; tooltip << _("Trait: ") << "" << traits[i] << "\n" << descriptions[i]; @@ -340,16 +348,19 @@ static config unit_alignment(const unit* u) std::ostringstream str, tooltip; char const *align = unit_type::alignment_description(u->alignment(), u->gender()); std::string align_id = unit_type::alignment_id(u->alignment()); - int cm = combat_modifier(resources::screen->displayed_unit_hex(), u->alignment(), u->is_fearless()); - //str << align << " (" << utils::signed_percent(cm) << ")"; + int cm = combat_modifier(resources::screen->displayed_unit_hex(), u->alignment(), + u->is_fearless()); - std::string color("grey"); + SDL_Color color = font::weapon_color; + if (cm != 0) + color = (cm > 0) ? font::good_dmg_color : font::bad_dmg_color; - if (cm != 0) color = (cm > 0) ? "green" : "red"; + str << align << " (" << span_color(color) << utils::signed_percent(cm) + << naps << ")"; - str << "" << utils::signed_percent(cm) << "\n"; tooltip << _("Alignment: ") << "" << align << "\n" << string_table[align_id + "_description"]; + return text_report(str.str(), tooltip.str(), "time_of_day"); } REPORT_GENERATOR(unit_alignment) @@ -430,13 +441,13 @@ static config unit_hp(const unit* u) const std::string def_color = unit_helper::resistance_color(res_def); if (res_att == res_def) { line << "" << utils::signed_percent(res_def) - << "\n"; + << naps << '\n'; } else { const std::string att_color = unit_helper::resistance_color(res_att); line << "" << utils::signed_percent(res_att) - << "/" + << naps << "/" << "" << utils::signed_percent(res_def) - << "\n"; + << naps << '\n'; att_def_diff = true; } resistances_table.insert(line.str()); @@ -520,7 +531,7 @@ static config unit_defense(const unit* u, const map_location& displayed_unit_hex const t_translation::t_terrain &terrain = map[displayed_unit_hex]; int def = 100 - u->defense_modifier(terrain); SDL_Color color = int_to_color(game_config::red_to_green(def)); - str << span_color(color) << def << "%"; + str << span_color(color) << def << '%' << naps; tooltip << _("Terrain: ") << "" << map.get_terrain_info(terrain).description() << "\n"; const t_translation::t_list &underlyings = map.underlying_def_terrain(terrain); @@ -537,13 +548,13 @@ static config unit_defense(const unit* u, const map_location& displayed_unit_hex int t_def = 100 - u->defense_modifier(t); SDL_Color color = int_to_color(game_config::red_to_green(t_def)); tooltip << '\t' << map.get_terrain_info(t).description() << ": " - << span_color(color) << t_def << "% " + << span_color(color) << t_def << '%' << naps << (revert ? _("maximum^max.") : _("minimum^min.")) << '\n'; } } } - tooltip << "" << _("Defense: ") << span_color(color) << def << "%"; + tooltip << "" << _("Defense: ") << span_color(color) << def << '%' << naps << ""; return text_report(str.str(), tooltip.str()); } REPORT_GENERATOR(unit_defense) @@ -564,7 +575,7 @@ static config unit_vision(const unit* u) if (!u) return report(); std::ostringstream str; if (u->vision() != u->total_movement()) { - str << _("vision: ") << u->vision(); } + str << _("VP/JP") << '\n' << u->vision() << '/' << u->jamming(); } return text_report(str.str()); } REPORT_GENERATOR(unit_vision) @@ -625,7 +636,7 @@ static config unit_moves(const unit* u) } else { tooltip << moves; } - tooltip << "\n"; + tooltip << naps << '\n'; } } @@ -679,7 +690,7 @@ static int attack_info(const attack_type &at, config &res, const unit &u, const else if ( damage < specials_damage ) dmg_color = font::bad_dmg_color; - str << span_color(dmg_color) << damage << naps << span_color(font::weapon_color) + str << span_color(dmg_color) << " " << damage << naps << span_color(font::weapon_color) << font::weapon_numbers_sep << num_attacks << ' ' << at.name() << "\n"; tooltip << _("Weapon: ") << "" << at.name() << "\n" @@ -741,7 +752,7 @@ static int attack_info(const attack_type &at, config &res, const unit &u, const std::string range = string_table["range_" + at.range()]; std::string lang_type = string_table["type_" + at.type()]; - str << span_color(font::weapon_details_color) << " " + str << span_color(font::weapon_details_color) << " " << " " << range << font::weapon_details_sep << lang_type << "\n"; @@ -808,7 +819,7 @@ static int attack_info(const attack_type &at, config &res, const unit &u, const const SDL_Color &details_color = active[i] ? font::weapon_details_color : font::inactive_details_color; - str << span_color(details_color) << " " << name << naps << '\n'; + str << span_color(details_color) << " " << " " << name << naps << '\n'; std::string help_page = "weaponspecial_" + name.base_str(); tooltip << _("Weapon special: ") << "" << name << ""; if ( !active[i] ) @@ -976,10 +987,15 @@ static config unit_weapons(const unit *attacker, const map_location &attacker_po static config unit_weapons(const unit *u) { - if (!u) return report(); + if (!u || u->attacks().empty()) return report(); map_location displayed_unit_hex = resources::screen->displayed_unit_hex(); config res; + const std::string attack_headline = + ( u->attacks().size() > 1 ) ? N_("Attacks") : N_("Attack"); + add_text(res, /*span_color(font::weapon_details_color) + +*/ attack_headline /*+ "\n"*/ + '\n', "am arsch"); + BOOST_FOREACH(const attack_type &at, u->attacks()) { attack_info(at, res, *u, displayed_unit_hex); @@ -1054,7 +1070,6 @@ REPORT_GENERATOR(unit_profile) return image_report(u->small_profile()); } - REPORT_GENERATOR(tod_stats) { std::ostringstream tooltip; @@ -1167,8 +1182,8 @@ static config unit_box_at(const map_location& mouseover_hex) << _("Liminal units: ") << "" << utils::signed_percent(-(abs(bonus))) << "\n"; - std::string local_tod_image = "themes/unit_box/" + local_tod.image; - std::string global_tod_image = "themes/unit_box/" + global_tod.image; + std::string local_tod_image = "themes/classic/" + local_tod.image; + std::string global_tod_image = "themes/classic/" + global_tod.image; if (local_tod.bonus_modified > 0) local_tod_image += "~BRIGHTEN()"; else if (local_tod.bonus_modified < 0) local_tod_image += "~DARKEN()"; if (preferences::flip_time()) local_tod_image += "~FL(horiz)";