Skip to content

Commit

Permalink
[Fix] Name of the icons in 64px for the city
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadawoo committed Dec 13, 2024
1 parent dc751aa commit f2e2301
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/view/HtmlCityEnclosure.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ function city_submenu($city_type, $connected_city_id, $is_citizen_home_connected
: $this->city_submenu_item('empty', '');
// #102 = the city door
$submenu_door = in_array(102, $completed_buildings_ids)
? $this->city_submenu_item('city_door', 'Porte')
? $this->city_submenu_item('city_door', 'Porte', 'copyright/city_door_64px')
: $this->city_submenu_item('empty', '');

$city_menu = '
<div class="row" style="gap:0.3em">
'.$this->city_submenu_item('city_storage', 'Dépôt').'
'.$this->city_submenu_item('city_constructions', 'Chantiers').'
'.$this->city_submenu_item('city_fellows', 'Habitants').'
'.$this->city_submenu_item('explore', 'Explorer').'
'.$this->city_submenu_item('explore', 'Explorer', 'free/map.png').'
</div>
<div class="row" style="font-size:0.7em;margin-bottom:1em">
'.$submenu_well.'
Expand All @@ -102,14 +102,14 @@ function city_submenu($city_type, $connected_city_id, $is_citizen_home_connected
}


private function city_submenu_item($item_alias, $item_name) {
private function city_submenu_item($item_alias, $item_name, $icon_filename=null) {

// Special images
if($item_alias === 'empty') {
return '<div class="item" style="background:none;cursor:default"></div>';
}

$icon_path = ($item_alias === 'explore') ? 'free/map.png' : 'copyrighted/'.$item_alias.'.png';
$icon_path = ($icon_filename !== null) ? $icon_filename : 'copyrighted/'.$item_alias.'.png';

return '<div class="item" style="background-image:url(\'resources/img/'.$icon_path.'\')" '
. 'onclick="switchCitySubmenu(\''.$item_alias.'\')">'
Expand Down

0 comments on commit f2e2301

Please sign in to comment.