mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-31 01:31:53 +08:00
tooltip on top near bottom of store and trading post
This commit is contained in:
+6
-3
@@ -893,7 +893,8 @@ var Room = {
|
|||||||
$('div.storeRow', stores).each(function(index, el) {
|
$('div.storeRow', stores).each(function(index, el) {
|
||||||
el = $(el);
|
el = $(el);
|
||||||
$('div.tooltip', el).remove();
|
$('div.tooltip', el).remove();
|
||||||
var tt = $('<div>').addClass('tooltip bottom right');
|
var ttPos = index > 10 ? 'top right' : 'bottom right';
|
||||||
|
var tt = $('<div>').addClass('tooltip ' + ttPos);
|
||||||
var storeName = el.attr('id').substring(4).replace('-', ' ');
|
var storeName = el.attr('id').substring(4).replace('-', ' ');
|
||||||
for(var incomeSource in $SM.get('income')) {
|
for(var incomeSource in $SM.get('income')) {
|
||||||
var income = $SM.get('income["'+incomeSource+'"]');
|
var income = $SM.get('income["'+incomeSource+'"]');
|
||||||
@@ -1117,7 +1118,8 @@ var Room = {
|
|||||||
cost: good.cost(),
|
cost: good.cost(),
|
||||||
text: _(k),
|
text: _(k),
|
||||||
click: Room.buy,
|
click: Room.buy,
|
||||||
width: '80px'
|
width: '80px',
|
||||||
|
ttPos: buySection.children().length > 10 ? 'top right' : 'bottom right'
|
||||||
}).css('opacity', 0).attr('buildThing', k).appendTo(buySection).animate({opacity:1}, 300, 'linear');
|
}).css('opacity', 0).attr('buildThing', k).appendTo(buySection).animate({opacity:1}, 300, 'linear');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1152,7 +1154,8 @@ var Room = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
compassTooltip: function(direction){
|
compassTooltip: function(direction){
|
||||||
var tt = $('<div>').addClass('tooltip bottom right');
|
var ttPos = $('div#resources').children().length > 10 ? 'top right' : 'bottom right';
|
||||||
|
var tt = $('<div>').addClass('tooltip ' + ttPos);
|
||||||
$('<div>').addClass('row_key').text(_('the compass points '+ direction)).appendTo(tt);
|
$('<div>').addClass('row_key').text(_('the compass points '+ direction)).appendTo(tt);
|
||||||
tt.appendTo($('#row_compass'));
|
tt.appendTo($('#row_compass'));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user