DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ OnMouseButtonRelease()

void PluginBase::OnMouseButtonRelease ( int button)
inlineprivate

См. определение в файле PluginKeyBinding.c строка 213

214 {
215 MouseButtonInfo button_info = GetMouseButtonInfo( button );
216 if (button_info == NULL) return;
217 int time_curr = g_Game.GetTime();
218 int time_last_press = button_info.GetTimeLastPress();
219 int time_last_release = button_info.GetTimeLastRelease();
220 int time_delta_press = time_curr - time_last_press;
221 int time_delta_relase = time_curr - time_last_release;
222
223 if ( time_delta_relase < DOUBLE_CLICK_TIME )
224 {
225 //Log(" DOUBLE_CLICK_TIME ");
226
227 OnMouse( MB_EVENT_DOUBLECLICK, button );
228 }
229 else if ( time_delta_press < CLICK_TIME )
230 {
231 //Log(" MB_EVENT_CLICK ");
232
233 OnMouse( MB_EVENT_CLICK, button );
234 }
235
236 //Log(" MB_EVENT_RELEASE");
237
238 OnMouse( MB_EVENT_RELEASE, button );
239
240 button_info.Release();
241 }
DayZGame g_Game
Определения DayZGame.c:4074
int GetTimeLastPress()
Определения MouseButtonInfo.c:19
int GetTimeLastRelease()
Определения MouseButtonInfo.c:24
void Release()
Определения MouseButtonInfo.c:34
void OnMouse(int event_id, int button)
Определения PluginKeyBinding.c:343
const int CLICK_TIME
Определения PluginKeyBinding.c:283
const int DOUBLE_CLICK_TIME
Определения PluginKeyBinding.c:284
MouseButtonInfo GetMouseButtonInfo(int button)
Определения PluginKeyBinding.c:363
const int MB_EVENT_RELEASE
Определения PluginKeyBinding.c:9
const int MB_EVENT_CLICK
Определения PluginKeyBinding.c:8
const int MB_EVENT_DOUBLECLICK
Определения PluginKeyBinding.c:10

Перекрестные ссылки CLICK_TIME, DOUBLE_CLICK_TIME, g_Game, GetMouseButtonInfo(), MouseButtonInfo::GetTimeLastPress(), MouseButtonInfo::GetTimeLastRelease(), MB_EVENT_CLICK, MB_EVENT_DOUBLECLICK, MB_EVENT_RELEASE, OnMouse() и MouseButtonInfo::Release().