Ignore:
Timestamp:
Jan 19, 2011, 9:33:02 PM (11 years ago)
Author:
sam
Message:

Mouse button support in Lol Engine.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/input.cpp

    r233 r236  
    3131public:
    3232    InputData()
    33     {
    34         mouse.x = mouse.y = -1;
    35     }
     33      : mouse(-1, -1),
     34        buttons(0, 0, 0)
     35    { }
    3636
    3737    Int2 mouse;
     38    Int3 buttons;
    3839}
    3940inputdata;
     
    7576}
    7677
     78void Input::SetMouseButton(int index)
     79{
     80    data->buttons[index] = 1;
     81}
     82
     83void Input::UnsetMouseButton(int index)
     84{
     85    data->buttons[index] = 0;
     86}
     87
     88Int3 Input::GetMouseButtons()
     89{
     90    return data->buttons;
     91}
     92
Note: See TracChangeset for help on using the changeset viewer.