Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 9, 2019, 2:05:27 PM (6 years ago)
Author:
mkarpf
Message:

separated MouseAPIExample from MouseAPI

finished comments in MouseAPI.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapi.cc

    r12334 r12352  
    104104}
    105105
    106 ClickableObjectID MouseAPI::addClickableObject(const Vector3& position, float radius, const std::list<MouseButtonCode::ByEnum>& buttons, std::function<void(MouseButtonCode::ByEnum)> onClickedFunction)
    107 {
    108     ClickableObjectID id = !clickEvents.empty() ? clickEvents.back().id + 1:0;
     106ClickableElementID MouseAPI::addClickableElement(const Vector3& position, float radius, const std::list<MouseButtonCode::ByEnum>& buttons, std::function<void(MouseButtonCode::ByEnum)> onClickedFunction)
     107{
     108    ClickableElementID id = !clickEvents.empty() ? clickEvents.back().id + 1:0;
    109109    clickEvents.insert(clickEvents.end(),{id,position,radius,buttons,onClickedFunction});
    110110    return id;
     
    124124
    125125
    126 bool MouseAPI::changePositionOfClickableObject(ClickableObjectID id,const Vector3& position)
     126bool MouseAPI::changePositionOfClickableElement(ClickableElementID id,const Vector3& position)
    127127{
    128128    for(auto event:clickEvents)
     
    148148    return false;
    149149}
    150 bool MouseAPI::changeRadiusOfClickableObject(ClickableObjectID id,float radius)
     150bool MouseAPI::changeRadiusOfClickableElement(ClickableElementID id,float radius)
    151151{
    152152    for(auto event = clickEvents.begin();event != clickEvents.end();event++ )
     
    172172    return false;
    173173}
    174 bool MouseAPI::deleteClickableObject(ClickableObjectID id)
     174bool MouseAPI::deleteClickableElement(ClickableElementID id)
    175175{
    176176    for(auto eventIt = clickEvents.begin();eventIt != clickEvents.end();eventIt++ )
     
    197197}
    198198
    199 float MouseAPI::getRadiusClick(ClickableObjectID id)
     199float MouseAPI::getRadiusClick(ClickableElementID id)
    200200{
    201201     for(auto eventIt = clickEvents.begin();eventIt != clickEvents.end();eventIt++ )
Note: See TracChangeset for help on using the changeset viewer.