MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / onTouchEnd_

Method onTouchEnd_

source/MRViewer/MRTouchesController.cpp:128–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128bool TouchesController::onTouchEnd_( int id, int x, int y )
129{
130 if ( !multiInfo_.update( { id, Vector2f( float(x), float(y) ) }, true ) )
131 return true;
132 auto* viewer = &getViewerInstance();
133 if ( mouseMode_ )
134 {
135 mouseMode_= false;
136 viewer->emplaceEvent( "First touch imitates left mouse up", [viewer] ()
137 {
138 viewer->mouseUp( MouseButton::Left, 0 );
139 } );
140 }
141 else
142 {
143 viewer->emplaceEvent( "Touch up", [info = multiInfo_, prevInfoPtr = &multiPrevInfo_] ()
144 {
145 *prevInfoPtr = info;
146 } );
147 }
148 return true;
149}
150
151bool TouchesController::MultiInfo::update( TouchesController::Info info, bool remove )
152{

Callers

nothing calls this directly

Calls 3

emplaceEventMethod · 0.80
mouseUpMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected