- Timestamp:
- May 9, 2019, 2:05:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/MouseAPI_FS19/src/modules/MouseAPI/mouseapi.cc
r12334 r12352 104 104 } 105 105 106 Clickable ObjectID MouseAPI::addClickableObject(const Vector3& position, float radius, const std::list<MouseButtonCode::ByEnum>& buttons, std::function<void(MouseButtonCode::ByEnum)> onClickedFunction)107 { 108 Clickable ObjectID id = !clickEvents.empty() ? clickEvents.back().id + 1:0;106 ClickableElementID 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; 109 109 clickEvents.insert(clickEvents.end(),{id,position,radius,buttons,onClickedFunction}); 110 110 return id; … … 124 124 125 125 126 bool MouseAPI::changePositionOfClickable Object(ClickableObjectID id,const Vector3& position)126 bool MouseAPI::changePositionOfClickableElement(ClickableElementID id,const Vector3& position) 127 127 { 128 128 for(auto event:clickEvents) … … 148 148 return false; 149 149 } 150 bool MouseAPI::changeRadiusOfClickable Object(ClickableObjectID id,float radius)150 bool MouseAPI::changeRadiusOfClickableElement(ClickableElementID id,float radius) 151 151 { 152 152 for(auto event = clickEvents.begin();event != clickEvents.end();event++ ) … … 172 172 return false; 173 173 } 174 bool MouseAPI::deleteClickable Object(ClickableObjectID id)174 bool MouseAPI::deleteClickableElement(ClickableElementID id) 175 175 { 176 176 for(auto eventIt = clickEvents.begin();eventIt != clickEvents.end();eventIt++ ) … … 197 197 } 198 198 199 float MouseAPI::getRadiusClick(Clickable ObjectID id)199 float MouseAPI::getRadiusClick(ClickableElementID id) 200 200 { 201 201 for(auto eventIt = clickEvents.begin();eventIt != clickEvents.end();eventIt++ )
Note: See TracChangeset
for help on using the changeset viewer.