MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / onMouseDown

Method onMouseDown

Engine/source/gui/controls/guiGradientCtrl.cpp:124–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124void GuiGradientSwatchCtrl::onMouseDown(const GuiEvent &event)
125{
126 if (! mActive)
127 return;
128
129 if (mProfile->mCanKeyFocus)
130 setFirstResponder();
131
132 //capture current bounds and mouse down position
133 mOrigBounds = getBounds();
134 mMouseDownPosition = event.mousePoint;
135
136 if(mUseMouseEvents)
137 onMouseDown_callback();
138
139 //lock the mouse
140 mouseLock();
141 mDepressed = true;
142
143 // If we have a double click then execute the alt command.
144 if ( event.mouseClickCount == 2 )
145 {
146 onDoubleClick_callback();
147
148 execAltConsoleCallback();
149 }
150
151 setUpdate();
152}
153
154void GuiGradientSwatchCtrl::onMouseDragged(const GuiEvent &event)
155{

Callers

nothing calls this directly

Calls 10

getBoundsFunction · 0.85
avarFunction · 0.85
getExtentMethod · 0.80
getActiveRenderTargetMethod · 0.80
LinearColorFClass · 0.50
resolveToMethod · 0.45
getWidthMethod · 0.45
getHeightMethod · 0.45
copyToBmpMethod · 0.45
getColorMethod · 0.45

Tested by

no test coverage detected