Drakos7 Report post Posted June 12, 2006 Thinking about usability for those with poor eyesight, this lets one scale up the bottom icons to 42px. Alternately, if you have good eyesight or always use your keyboard, you can ratchet down to 16px icons. The option shows up in the HUD tab. The input text box will move accordingly. I would love some of you to make the necessary improvements on this a I feel some parts to be kludgy. Patch: https://developer.berlios.de/patch/index.ph...6&group_id=1256 Screenie of 16px size: Share this post Link to post Share on other sites
m_bee Report post Posted June 12, 2006 Nice. This is very nice indeed. And would be a perfect complement for my scalable interface patch hehe. I tried to patch it against my sources, and only had to correct a minor problem in elconfig.c. The two work nicely together as far as I can tell (still testing) but for now all is ok. Share this post Link to post Share on other sites
0ctane Report post Posted June 12, 2006 Thinking about usability for those with poor eyesight, this lets one scale up the bottom icons to 42px. Alternately, if you have good eyesight or always use your keyboard, you can ratchet down to 16px icons. What? No props to me? Ingrate.... More seriously, great idea. Share this post Link to post Share on other sites
Drakos7 Report post Posted June 12, 2006 You snooze, you lose, bro. Yes, thx to 0ctane for the idea. Share this post Link to post Share on other sites
ttlanhil Report post Posted June 12, 2006 okay, props for 0ctane... just lemme visit the ahh, here we go Share this post Link to post Share on other sites
Drakos7 Report post Posted June 13, 2006 ok, bug that I am not sure how to correct. when you scale it down (to say 16px) then restart, if you scale back up, it only recognizes the top of the icons when you hoverover/click. The bottom X pixels show up like they should, but clicking falls through to the background and you move. Thoughts on where to change this? Share this post Link to post Share on other sites
m_bee Report post Posted June 13, 2006 (edited) Ummm i have looked a bit, I dont know much about the hud code and dont know the exact cause of that small bug. But it seems that the problem is that the window height (i mean icons_window) is not recalculated properly. If you go to the function display_icons_handler you can find this: win->len_y=16+icon_size; /* This is m_bee's magic line */ if(mouse_in_window(win->window_id, mouse_x, mouse_y)) { state=icon_cursor_x/icon_size;//Icons must be 32 pixels wide... if(state<icons_no)icon_list[state]->state|=0x01;//Set the state to be mouseover else state=-1; } If you add that line the code works as expected, I think. Havent tested it much, though. Maybe you can dig a bit more in the source of the problem starting with that thingie. For now, even if that might not be the deffinitive solution, that works. Cheers Edited June 13, 2006 by m_bee Share this post Link to post Share on other sites
Drakos7 Report post Posted June 18, 2006 That switch got it to work right. Thanks m_bee. Now I need the eyes of all the good buffer overflow people to scan it Share this post Link to post Share on other sites
crusadingknight Report post Posted June 18, 2006 (edited) That switch got it to work right. Thanks m_bee. Now I need the eyes of all the good buffer overflow people to scan it Well, wouldn't be cleaner to resize the necessary windows in the function to do the resize itself, rather than every time the icons are rendered? EDIT: After checking over the patch once more, that line should work in change_icon_size() verbatim. EDIT2: No buffer overflows, since there are no buffers . However, you may want to update the comments on the following lines (as the comments no longer apply): state=icon_cursor_x/icon_size;//Icons must be 32 pixels wide... int id=mx/icon_size;//Icons are always 32 bit wide Edited June 18, 2006 by crusadingknight Share this post Link to post Share on other sites
Drakos7 Report post Posted June 28, 2006 Well, wouldn't be cleaner to resize the necessary windows in the function to do the resize itself, rather than every time the icons are rendered? Yes, it would. And I thought about that after I wrote it up. I hope to try to get around to it at some point. Share this post Link to post Share on other sites