Skip to content

Commit

Permalink
Fixed main menu map names overflowing
Browse files Browse the repository at this point in the history
L4D maps names no longer overflow in Map Selection
  • Loading branch information
robotboy655 committed Jul 10, 2016
1 parent 9ba21e8 commit b46ca90
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
18 changes: 12 additions & 6 deletions garrysmod/html/css/menu/NewGame.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

UL.category LI.mapicon IMG.thumbnail
{
width: 128px;
Expand All @@ -9,7 +10,7 @@ UL.category LI.mapicon IMG.favtoggle
top: 8px;
right: 8px;
visibility: hidden;

background-image: url( '../../img/favourite.png?1' );
}
UL.category LI.mapicon:hover IMG.favtoggle
Expand All @@ -21,7 +22,7 @@ UL.category LI.mapicon IMG.favtoggle_always
position: absolute;
top: 8px;
right: 8px;

background-image: url( '../../img/favourite.png?1' );
}
UL.category LI.mapicon IMG.faviconadd:hover
Expand All @@ -31,17 +32,22 @@ UL.category LI.mapicon IMG.faviconadd:hover
UL.category LI.mapicon IMG.faviconremove:hover
{
background-image: url( '../../img/favourite_remove.png?1' );
}
}

UL.category LI.mapicon
{
position:relative;
position: relative;
width: 128px;
text-align: center;
font-size: 10px;
padding: 6px;
margin: 2px;
cursor: pointer;
vertical-align: top;
}

UL.category LI.mapicon span {
word-break: break-all;
}

.maplist
Expand Down Expand Up @@ -82,7 +88,7 @@ gamesettings
border-radius: 5px;
}

gamesettings bottom
gamesettings bottom
{
bottom: 0px;
left: 0;
Expand Down Expand Up @@ -122,7 +128,7 @@ gamesettings select
padding-left: 10px;
line-height: 28px;
cursor: pointer;

font-weight: bold;
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5C5), to(#2C2));
border: 1px solid #CCC;
Expand Down
2 changes: 2 additions & 0 deletions garrysmod/html/js/menu/control.NewGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ function ControllerNewGame( $scope, $element, $rootScope, $location, $filter )
return "img/incompatible.png"
}

if ( !IN_ENGINE ) return "img/downloading.png"

return "asset://mapimage/" + m
}

Expand Down
10 changes: 5 additions & 5 deletions garrysmod/html/template/newgame.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="maplist icons">

<div class="controls">

<ul>
<li class="noisy category {{IfElse( category.category == CurrentCategory, 'active', '' )}}" ng-repeat="category in MapList | orderBy:'order'" ng-hide="CountFiltered(category.maps) == 0" ng-click="SwitchCategory(category.category)">
<div class='name'>{{category.category}}</div>
Expand All @@ -19,13 +19,13 @@
<div class="scrollable" style="margin: 0px; top: 0px; left: 200px">

<ul class="category" ng-repeat="category in MapList | orderBy:'order'" ng-hide="category.maps.length == 0" ng-show="CurrentCategory == category.category">

<li>{{category.category}} <small>{{CountFiltered(category.maps)}} </small><small ng-tranny="category.maps.length == 1 && 'newgame_map' || 'newgame_maps'"></small></li>

<li class="icon mapicon {{MapClass( map )}}" ng-repeat="map in category.maps | orderBy:'toString()' | filter:SearchText" >
<img ng-click="FavMap( map )" class="{{FavMapClass( map )}} {{FavMapHover( map )}}" src="img/empty.png" />
<img ng-click="ClickMap( map )" ng-src="{{MapIcon( map, category.category )}}" class="thumbnail" /><br />
{{map}}
<img ng-click="ClickMap( map )" ng-src="{{MapIcon( map, category.category )}}" class="thumbnail" /><br />
<span>{{map}}</span>
</li>

</ul>
Expand Down Expand Up @@ -79,7 +79,7 @@
<input type="checkbox" ng-model="s.Value" />
<label ng-Tranny="s.text"></label>
</div>

</div>


Expand Down

0 comments on commit b46ca90

Please sign in to comment.