mirror of https://github.com/buggins/dlangui.git
fix #264 -- system defined doubleclick time
This commit is contained in:
parent
8a7fec4674
commit
5f6c0ddf3e
|
|
@ -717,6 +717,9 @@ ushort mouseButtonToFlag(MouseButton btn) {
|
|||
}
|
||||
}
|
||||
|
||||
/// double click max interval, milliseconds; may be changed by platform
|
||||
__gshared long DOUBLE_CLICK_THRESHOLD_MS = 300;
|
||||
|
||||
/// Mouse button state details for MouseEvent
|
||||
struct ButtonDetails {
|
||||
/// Clock.currStdTime() for down event of this button (0 if button is up).
|
||||
|
|
@ -737,7 +740,6 @@ struct ButtonDetails {
|
|||
return _doubleClick;
|
||||
}
|
||||
|
||||
static long DOUBLE_CLICK_THRESHOLD_MS = 200;
|
||||
|
||||
|
||||
void reset() {
|
||||
|
|
|
|||
|
|
@ -395,3 +395,5 @@ version(unittest) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1723,6 +1723,10 @@ int sdlmain(string[] args) {
|
|||
}
|
||||
initResourceManagers();
|
||||
|
||||
version (Windows) {
|
||||
DOUBLE_CLICK_THRESHOLD_MS = GetDoubleClickTime();
|
||||
}
|
||||
|
||||
currentTheme = createDefaultTheme();
|
||||
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1126,6 +1126,7 @@ int myWinMain(void* hInstance, void* hPrevInstance, char* lpCmdLine, int iCmdSho
|
|||
}
|
||||
Platform.setInstance(w32platform);
|
||||
|
||||
DOUBLE_CLICK_THRESHOLD_MS = GetDoubleClickTime();
|
||||
|
||||
Log.v("Initializing font manager");
|
||||
if (!initFontManager()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue