Ignore:
Timestamp:
Mar 16, 2008, 2:17:43 AM (11 years ago)
Author:
Sam Hocevar
Message:
  • Simplified the window creation arguments. Got rid of a lot of macros and hid stuff in private namespaces.

Inspired by Win32 Abuse changelog for January 28, 2001:

  • Well, in the process of adding changes necessary to

handle recovery from alt-tabbing away from Abuse
(which is why I was updating jwindow::redraw()),
the entire windowing system is getting an overhaul.
It's gonna be sweet when I'm done, though.

  • jwindow::redraw() has been changed to a virtual

function requiring no parameters. This'll make
it much easier to implement special specific-
purpose windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/automap.cpp

    r106 r111  
    151151void automap::toggle_window()
    152152{
    153   if (automap_window)
    154   {   
    155     wm->close_window(automap_window);
    156     automap_window=NULL;
    157   }
    158   else
    159   {   
    160     old_dx=-1000;        // make sure the map gets drawn the first time
    161     old_dy=-1000;
    162 
    163     automap_window=wm->new_window(0,0,w*AUTOTILE_WIDTH,h*AUTOTILE_HEIGHT);
    164     automap_window->screen->bar(17,1,17+8*6+3,6,wm->medium_color());   
    165     wm->font()->put_string(automap_window->screen,20,2,"AUTOMAP");
    166     draw();   
    167   } 
     153    if (automap_window)
     154    {   
     155        wm->close_window(automap_window);
     156        automap_window = NULL;
     157    }
     158    else
     159    {   
     160        old_dx = -1000; // make sure the map gets drawn the first time
     161        old_dy = -1000;
     162
     163        automap_window = wm->new_window(0, 0, w * AUTOTILE_WIDTH,
     164                                        h * AUTOTILE_HEIGHT, NULL, "Map");
     165        automap_window->screen->bar(17, 1, 17 + 8 * 6 + 3, 6,
     166                                    wm->medium_color());   
     167        wm->font()->put_string(automap_window->screen, 20, 2, "Automap",
     168                               wm->dark_color());
     169        draw();   
     170    } 
    168171}
    169172
Note: See TracChangeset for help on using the changeset viewer.