Character Info Toolbox

Looks a bit off to me, but so does no indentation. I don't suppose there is a way to center-justify in a title text?

Um? Probably. I'd have to play with it. Or maybe the big dummy who originally changed the js to make a scrollbar exist can answer the question. He may have made a tiny error, but I have faith in his knowledge.


600px ought to work for about anyone's screen nowadays

I was somewhat surprised to discover that 600px has to fit in the whole window, not just the frame and the 50px for the toolbar uses up that space so you would have had to make it 550px to fit on a 800x600 screen.


What did you change so that I can put it in my version of CHIT

Changed max-height from 600px to 93%
 
Huh. Mine now looks like this. I've been working a lot lately and haven't really even had time to play, let alone mess with scripts ... but I thought that when I logged in the other day to check out the new florist stuff, that the plant images were centered below the last adventure stuff ? Or perhaps I am mistaken. They now appear to be pushed rightward somewhat. Does everyone else's look like this ? Or just mine ?
 

Attachments

  • Clipboard01.jpg
    Clipboard01.jpg
    30.4 KB · Views: 58
Um? Probably. I'd have to play with it. Or maybe the big dummy who originally changed the js to make a scrollbar exist can answer the question. He may have made a tiny error, but I have faith in his knowledge.

Are you two talking about the text that appears in the tooltip when you hover over the plant image ?
 
I thought that when I logged in the other day to check out the new florist stuff, that the plant images were centered below the last adventure stuff ? Or perhaps I am mistaken. They now appear to be pushed rightward somewhat. Does everyone else's look like this ? Or just mine ?

There are two columns in that table. I have them centered in the rightmost column, rather than centered across the span of both columns.

Are you two talking about the text that appears in the tooltip when you hover over the plant image ?

That was my take on the subject. Is there any way to format that?
 
That was my take on the subject. Is there any way to format that?

PHP:
string plantDesc(string plant, boolean html) {
    buffer desc;
    desc.append(plant);
    if(html)
        desc.append('<br>(');
    else
        desc.append('\n (');
    desc.append(plantData[plant].desc);
    desc.append(')');
    return desc;
}

I think you could just remove the space after the "\n" to remove the space that starts the second line ? But, I don't think I've ever tried to add formatting to hover text before.
 
I added that space on purpose because I think it causes it to stand out as distinct from the link on the following line.
 
That's interesting. If I understand properly, the second example turns off the browser's default tooltip so that you won't see the link. That's kinda awesome since the link is somewhat ugly when it distracts from the information that I want to display. It looks tricky though and I'd have to play around to figure out how to do it properly.
 
I'm not sure what link to which you are referring. In Firefox, the tooltip only contains the plant name and its effect for me.

In any event, I linked you to the discussion page that led me to this link : http://sixrevisions.com/css/css-only-tooltips/ (perhaps you found it already) which seems to give fairly good instructions for what you are wanting to do (I think, lol).
 
I also don't know what link you're referring to.

Anyway, just made this little relay script to get back that extra 50 pixels. Looks off at first, but only because you're not used to it. A handful of turns in and I'm already loving it.
 

Attachments

That's kinda brilliant. I notice that you also increased the size of the chatpane. Which is not a bad thing on my screen.

I wonder if I should include your game.ash as part of ChIT? If people don't like it, I could always remove it, right?
 
Yeah, I didn't realize until just now (while writing this) that I could have made the chat panel stay the same size if I cared to. KoL defines it to be 1/5th of the screen, and then defines the charpane to be a fixed 200px. So, when re-structuring, I just left CHIT at 200, and defined chat to be 1/4 of the remaining space (which was close enough for me). To minimize change, you could probably change "200,*,3*" to "200,*,20%". Then again, on my screen as well, more chat space is fine.

EDIT: If included into ChIT, one could even take it a step further and allow users to customize the exact width (in pixels or percentage) of both ChIT and Chat. Maybe 1 or 2 lines of code, to never have to resize those damn frames again.

If we wanted to be really ambitious, we could even standardize KoL by doing away with frames altogether (I don't know how to achieve this properly right now, but that's what google is for). But I sorta like the 90s feel that frames give KoL.
EDIT2: No. I don't understand what was so wrong about frameset/frame that they were deprecated but iframe was not. It's... absolutely a nightmare (for me...) to try to position these mofos. Long live frames.
 
Last edited:
I have 2 questions. First, what stops all the default settings from being set every time? I'm not super familiar with zlib's variables, but... it looks to me like all that stuff should basically overwrite any customization every page load. What's preventing this?

Second, "chit.disable"... how long has that been there? I added something similar of my own forever ago, though it is a toolbar option (and adds a re-enable link to the otherwise-non-CHIT charpane).
 
First, what stops all the default settings from being set every time? I'm not super familiar with zlib's variables, but... it looks to me like all that stuff should basically overwrite any customization every page load. What's preventing this?

setvar() only sets a variable if it doesn't already exist. Its purpose is for script initialization while allowing people to change their settings and not have the script undo the change.
 
I have 2 questions. First, what stops all the default settings from being set every time? I'm not super familiar with zlib's variables, but... it looks to me like all that stuff should basically overwrite any customization every page load. What's preventing this?

As lost says. It's a function from zarqon's zlib. There's a lot of useful stuff in there.


Second, "chit.disable"... how long has that been there?


Since September 27, 2012.

I added something similar of my own forever ago, though it is a toolbar option (and adds a re-enable link to the otherwise-non-CHIT charpane).

That's an interesting idea.
 
Last edited:
In bakeToolbar:
Code:
    void addDisable() {
        result.append('<ul style="float:left"><li><a href="/KoLmafia/sideCommand?cmd=zlib+chit.disable+%3d+true&pwd='+my_hash()+'" title="Disable"><img src="'+imagePath+'upred.png" style="-moz-transform:scaleY(-1);"></a></li></ul>');
    }

at the bottom
Code:
buffer addEnableButton(buffer old){
 int i=old.index_of("refresh</a>]");
 if(i<0)return old;
 return old.insert(i+12,' [<a href="/KoLmafia/sideCommand?cmd=zlib+chit.disable+%3d+false&pwd='+my_hash()+'">chit</a>]');
}

void main(){
 buffer page=visit_url();
 if(vars["chit.disable"]=="true")page=page.addEnableButton();
 else page=page.modifyPage();
 page.write();
}

With whatever modifications are needed for the new sideCommand() and I think you'd probably move page.addEnableButton() up into modifyPage().

EDIT: Also, style stuff. I don't know what the non-mozilla equivalents are for flipping images.
 
Just made an interesting update to ChIT. It includes the game.php that bordemstirs wrote. It's still experimental and might get removed. Might also get tweaked to allow people to adjust their own layout if a good suggestion is made for how this can easily and simply be described.

Also, I added a link to disable ChIT. Just because it makes it easy for me to disable it so that I can work with the unaltered html. Also experimental I'll probably end up changing this since I suspect a lot of people don't feel the need to always be able to disable ChIT and will find it distracting. Prepare for it to vanish. I can't really credit bordemstirs with anything other than the idea since I wrote it after reading his suggestion, but before seeing him post any code. ;)
 
Also experimental I'll probably end up changing this since I suspect a lot of people don't feel the need to always be able to disable ChIT and will find it distracting. Prepare for it to vanish.

Ooooor... you could make it a toolbar option. Small, out of the way, useful for some of us. :P

EDIT: In terms of "adjusting" the layout... do you just mean panel sizes, or actual like... placement orientation?
 
Last edited:
Ooooor... you could make it a toolbar option. Small, out of the way, useful for some of us. :P

I don't know why I didn't think of that! I guess It's good that I threw that out there and waited to see what would happen.


EDIT: In terms of "adjusting" the layout... do you just mean panel sizes, or actual like... placement orientation?

I was only thinking of panel sizes as you previously suggested. Do you really think it is a helpful idea to allow the placement to be changed? I'm open to suggestions. As I suppose you have noticed.

EDIT: Made "disable" a brick that you can add to chit.toolbar.layout.
If you put disable first in the toolbar layout, then it will look exactly as it did last revision. I added it to my layout, but I suspect most other people will not care.
 
Last edited:
Usually when I want to disable ChIT, it's to get a manageable debug log for the HTML of the main frame. Setting chit.disable = true still results in a large number of function calls, so I generally ignore the setting and rename charpane.ash instead.
 
Back
Top