Warlove_Bagpipe Report post Posted January 11, 2009 Hi I just had an idea how to improve map marks to make them more useable. I wrote a simple patch which makes that yours map marks are displayed in main game window. They are clickable and if you click such name you're going to marked location. This patch is not final version but just presentation of idea. If such functionality will be approved then I start to code proper version of this feature (including new window and game option for this feature). The patch can be found here. I'm waitting for approval or decline . -- Regards OnyXa Share this post Link to post Share on other sites
ProHibited Report post Posted January 13, 2009 Makes auto-walk-to things much easier I'm afraid. There was a '#goto name' that send you to the coordinates of the mark 'name'. But that was removed (read about it somewhere on the forums), had to do something with easier automation orso. Share this post Link to post Share on other sites
Cycloonx Report post Posted January 14, 2009 Makes auto-walk-to things much easier I'm afraid. Now you can click on the map, it does the same? Share this post Link to post Share on other sites
ProHibited Report post Posted January 14, 2009 Yes that is true, but I like navigating with the maps just the way it is. I would use such a new feature, not sure if it has a positive effect on game play. (more 'automation' can be boring) Share this post Link to post Share on other sites
LabRat Report post Posted January 14, 2009 I don't get what + int i; + mouse_over_location = -1; + for(i=0;i<max_mark;i++) { + if ( marks[i].x > 0 ) { + if( mx>win->len_x - hud_x - 128 && + mx<win->len_x - hud_x && + my>win->len_y - hud_y - 20 - (i*12) && + my<win->len_y - hud_y - 20 - ((i-1)*12) ){ + mouse_over_location = i; + elwin_mouse = CURSOR_USE; + return 1; + } + } + } + is trying to achieve. As far as I can tell this just sets mouse_over_location to 0, changes the cursor and returns out of a for loop prematurely if the mouse is in the game window. There is absolutely no need for this to be in a for loop - as it stands it would just waste processor cycles and do who knows what with that for loop not terminating correctly. edit: oh I get it, you want to grab any click within 24 squares of a mapmark and head to the mapmark? If this is your intention then why not just test for mouse_over_location>-1 in the click handler rather than yet another (unnecessary) for loop? Share this post Link to post Share on other sites
Entropy Report post Posted January 15, 2009 Can I see a screenshot? Share this post Link to post Share on other sites
Warlove_Bagpipe Report post Posted January 28, 2009 (edited) First off all sorry for delayed response but topic tracking not sent me an notification mail (strange?). As I wrote code and design is prototype (and is made temporary) and after eventually approval I try to improve it (thanks Labrat). In my opinion such feature could be useful because it eliminate annoying(for me ) mouse click to show and hide map. Edited February 24, 2009 by knufasz Share this post Link to post Share on other sites
Warlove_Bagpipe Report post Posted February 24, 2009 OK proper patch is ready and can be downloaded from here. Map mark window is available after pressing CTRL+r. I've added two files mapmarsk.h and mapmarks.c and I wonder that I should move all code handling map marks there? Share this post Link to post Share on other sites
bluap Report post Posted February 24, 2009 (edited) This patch is looking nice and working well. A few comments if I may. 1) How about using a resizeable window? The new ground bag code is an example. 2) Did you consider using the automatic scroll bar? I might make your code sightly more simple but could incur a loading penalty as you would draw more strings than needed. 3) How about making the mouse wheel scroll when you are over the window body? 4) How about using the mark filter for the window content? 5) The text for some marks extends beyond the right of the window. 6) Your patch should not include make.conf I'd suggest you keep the existing mark code where it is for now as the feature #defs might get tricky. Edit: Just noticed that with a lot of marks, the last few are not displayed in the window. I have the last nine missing from 59. Could be a scroll bar issue, I have not checked. Edited February 24, 2009 by bluap Share this post Link to post Share on other sites