Ignore:
Timestamp:
Aug 22, 2010, 6:28:25 AM (10 years ago)
Author:
sam
Message:

Implement scrolling in the GTK window using the scrollbars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/mapviewer.cpp

    r155 r157  
    2323    Map *map;
    2424    int x, y;
    25     int mousex, mousey;
     25    int povx, povy;
    2626    int done;
    2727
     
    6464    GetScene();
    6565
    66     data->map->Render(data->scene, -data->mousex, -data->mousey, 0);
     66    data->map->Render(data->scene, -data->povx, -data->povy, 0);
    6767    data->scene->Render();
    6868
     
    7878}
    7979
    80 void MapViewer::SetMouse(int x, int y)
     80int MapViewer::GetWidth()
    8181{
    82     data->mousex = x;
    83     data->mousey = y;
     82    return data->map->GetWidth();
    8483}
    8584
     85int MapViewer::GetHeight()
     86{
     87    return data->map->GetHeight();
     88}
     89
     90void MapViewer::SetPOV(int x, int y)
     91{
     92    data->povx = x;
     93    data->povy = y;
     94}
     95
Note: See TracChangeset for help on using the changeset viewer.