Also, since I want to minimize both the width of the charpane and the height of each component, I added
to the chit_gearicon section.
Code:
width: 20px;
height:20px;
width: 20px;
height:20px;
var roofOffset = 4;
var floorOffset = 4;
var activePicker = null;
$(document).ready(function () {
//Picker Launchers
//use bind for multiple events (KoL uses jQuery 1.3, using multiple events for 'live' was added in jQuery 1.4)
//$(".chit_launcher").live("click", function(e) {
$(".chit_launcher").bind("click contextmenu", function(e) {
var caller = $(this);
var top = caller.offset().top + caller.height() + 2;
var picker = $("#" + caller.attr("rel"));
if (picker) {
if (picker.is(':hidden')) {
picker.css({
'position': 'absolute',
'top': top,
'max-height': '93%',
'overflow-y': 'auto'
});
if ((top + picker.height() + 30) > $(document).height()) {
picker.css('top', ($(document).height()-picker.height()-30));
}
if(activePicker != null) {
activePicker.hide();
}
picker.show();
activePicker = picker;
} else {
picker.hide();
activePicker = null;
}
}
return false;
});
if(it != $item[none] && (it.to_slot() == s || (it.to_slot() == $slot[acc1] && $slots[acc2,acc3] contains s) || (s == $slot[off-hand] && it.to_slot() == $slot[weapon] && have_skill($skill[double-fisted skull smashing]))) && equipped_item(s) != it) {
// pickerGear and bakeGear were written by soolar
void bakeGear() {
buffer result;
result.append('<table id="chit_gear" class="chit_brick nospace"><tbody>');
result.append('<tr><th class="label"><a class="visit" target="mainpane" href="./inventory.php?which=2">Gear</a></th></tr>');
void addSlot(slot s) {
item equipped = equipped_item(s);
result.append('<span><a class="chit_launcher" rel="chit_pickergear');
result.append(s);
result.append('" href="#"><img class="chit_gearicon hand" src="/images/itemimages/');
if(equipped != $item[none])
result.append(equipped.image);
else
result.append('blank.gif');
result.append('" title="');
result.append(s);
result.append(': ');
result.append(equipped);
result.append('"></a></span>');
pickerGear(s);
}
result.append('<tr><td>');
foreach s in $slots[ hat, back, shirt, weapon, off-hand, pants, acc1, acc2, acc3 ]
addSlot(s);
result.append('</td></tr>');
result.append('</tbody></table>');
chitBricks["gear"] = result.to_string();
}
table.chit_brick img.chit_gearicon {
border:1px solid #D0D0D0;
margin:0.5px;
}
// pickerGear and bakeGear were written by soolar
void bakeGear() {
buffer result;
result.append('<table id="chit_gear" class="chit_brick nospace"><tbody>');
result.append('<tr><th class="label"><a class="visit" target="mainpane" href="./inventory.php?which=2"><img src="');
result.append(imagePath);
result.append('equipment.png">Gear</a></th></tr>');
void addSlot(slot s) {
item equipped = equipped_item(s);
result.append('<span><a class="chit_launcher" rel="chit_pickergear');
result.append(s);
result.append('" href="#"><img class="chit_gearicon hand" src="/images/itemimages/');
if(equipped != $item[none])
result.append(equipped.image);
else
result.append('blank.gif');
result.append('" title="');
result.append(s);
result.append(': ');
result.append(equipped);
result.append('"></a></span>');
pickerGear(s);
}
result.append('<tr><td>');
foreach s in $slots[ hat, back, shirt, weapon, off-hand, pants, acc1, acc2, acc3 ]
addSlot(s);
result.append('</td></tr>');
result.append('</tbody></table>');
chitBricks["gear"] = result.to_string();
}
Will offer to create a smith's weapon for your off-hand also. Even if you have one in your main hand. Because sometimes over-kill is just enough.
What about a third one for my disembodied hand? Sometimes I like having a lot of muscle.
Looking very nice, thanks for the touchups! I am interested in continuing to do some polish here and there if you don't mind. Would you be willing to consider adding me to the repository? I am familiar enough with SVN, so I will avoid committing to the main branch, and leave it up to you to merge changes I make in, if you'd like.
I thought about that, but decided not to add a familiar slot in the gear brick, since there is one in the familiar brick. Should I add that feature down there or was this a joke? (That's a serious question because I can't tell.)
chit.walls.layout helpers,thrall,effects,tracker,gear
Edit the vars_<character name>.txt file in the KoLmafia data directory.
In order to gain more space in the charpane, I put most of the stuff I want to monitor in the ceiling, nothing in the walls, and only have the toolbar in the floor:I hate to ask this, but how do I get rid of the gear brick? I was already constrained for space vertically with chit in terms of number of effects shown; now it shows about 3 at a time, when I'm generally running many more (often 3 with AT buffs alone.)
zlib chit.floor.layout = toolbar
zlib chit.roof.layout = character,stats,florist,familiar,effects, thrall
zlib chit.walls.layout =
Edit: OK, think I found the problem; "gear" is in the "ceiling" variable, not the "walls".
r255 by soolar said:The familiar picker will now border a familiar with blue instead of gray if they have drops left, and tell you how many remain if you hover over the icon.