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

◆ OnMouseButtonRelease()

void PluginBase::OnMouseButtonRelease ( int button)
inlineprivate

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

208 {
209 MouseButtonInfo button_info = GetMouseButtonInfo( button );
210 if (button_info == NULL) return;
211 int time_curr = GetGame().GetTime();
212 int time_last_press = button_info.GetTimeLastPress();
213 int time_last_release = button_info.GetTimeLastRelease();
214 int time_delta_press = time_curr - time_last_press;
215 int time_delta_relase = time_curr - time_last_release;
216
217 if ( time_delta_relase < DOUBLE_CLICK_TIME )
218 {
219 //Log(" DOUBLE_CLICK_TIME ");
220
221 OnMouse( MB_EVENT_DOUBLECLICK, button );
222 }
223 else if ( time_delta_press < CLICK_TIME )
224 {
225 //Log(" MB_EVENT_CLICK ");
226
227 OnMouse( MB_EVENT_CLICK, button );
228 }
229
230 //Log(" MB_EVENT_RELEASE");
231
232 OnMouse( MB_EVENT_RELEASE, button );
233
234 button_info.Release();
235 }
proto int GetTime()
returns mission time in milliseconds
int GetTimeLastPress()
Определения MouseButtonInfo.c:19
int GetTimeLastRelease()
Определения MouseButtonInfo.c:24
void Release()
Определения MouseButtonInfo.c:34
void OnMouse(int event_id, int button)
Определения PluginKeyBinding.c:337
const int CLICK_TIME
Определения PluginKeyBinding.c:277
const int DOUBLE_CLICK_TIME
Определения PluginKeyBinding.c:278
MouseButtonInfo GetMouseButtonInfo(int button)
Определения PluginKeyBinding.c:357
proto native CGame GetGame()
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, GetGame(), GetMouseButtonInfo(), CGame::GetTime(), MouseButtonInfo::GetTimeLastPress(), MouseButtonInfo::GetTimeLastRelease(), MB_EVENT_CLICK, MB_EVENT_DOUBLECLICK, MB_EVENT_RELEASE, OnMouse() и MouseButtonInfo::Release().