Create drop notification Growl style

This commit is contained in:
Sabe Jones 2014-01-14 22:02:22 -06:00
parent 6536b855c9
commit 6e821fa681
3 changed files with 12 additions and 2 deletions

View file

@ -30,8 +30,10 @@ deathColor = #4E4E4E
deathText = #ABABAB
mpColor = #c7d3e9
mpText = #003aa1
critColor = #ffe3bf
critColor = #fce5cd
critText = #dc5000
dropColor = #d9ead3
dropText = #415838
borderDarken = 20%
// alert styles
@ -71,6 +73,11 @@ borderDarken = 20%
border-color: darken(critColor,borderDarken)
color: critText
.alert-drop
background-color: dropColor
border-color: darken(dropColor,borderDarken)
color: dropText
// alert icons
.icon-gold

View file

@ -56,7 +56,7 @@ habitrpg.controller('NotificationCtrl',
User.user.items[type][after.key] = 0;
}
User.user.items[type][after.key]++;
Notification.text(User.user._tmp.drop.dialog);
Notification.drop(User.user._tmp.drop.dialog);
});
$rootScope.$watch('user.achievements.streak', function(after, before){

View file

@ -71,6 +71,9 @@ angular.module("notificationServices", [])
},
crit: function(val) {
growl("<i class='icon-certificate'></i> Critical Hit! Bonus: " + Math.round(val) + "%", 'crit');
},
drop: function(val) {
growl("<i class='icon-gift'></i> " + val, 'drop');
}
};
}