Ignore:
Timestamp:
Jan 19, 2011, 1:34:23 PM (10 years ago)
Author:
sam
Message:

Make SdlInput regularly inject the mouse position into the Input singleton.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/input.cpp

    r221 r233  
    3030
    3131public:
    32     int dummy;
     32    InputData()
     33    {
     34        mouse.x = mouse.y = -1;
     35    }
     36
     37    Int2 mouse;
    3338}
    3439inputdata;
     
    6065}
    6166
     67void Input::SetMousePos(Int2 coord)
     68{
     69    data->mouse = coord;
     70}
     71
     72Int2 Input::GetMousePos()
     73{
     74    return data->mouse;
     75}
     76
Note: See TracChangeset for help on using the changeset viewer.