mirror of
https://github.com/crskycode/GARbro.git
synced 2024-10-23 07:38:16 +08:00
(LookupItem): moved timestamp update to InputData class.
This commit is contained in:
parent
3cc72a43c6
commit
9c27c8b4f8
@ -628,6 +628,15 @@ namespace GARbro.GUI
|
|||||||
Phrase.Clear ();
|
Phrase.Clear ();
|
||||||
Mismatch = false;
|
Mismatch = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Update (int timestamp)
|
||||||
|
{
|
||||||
|
if (timestamp - LastTime >= TextLookupTimeout)
|
||||||
|
{
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
LastTime = timestamp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const int TextLookupTimeout = 1000; // milliseconds
|
const int TextLookupTimeout = 1000; // milliseconds
|
||||||
@ -653,11 +662,7 @@ namespace GARbro.GUI
|
|||||||
if (source == null)
|
if (source == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (timestamp - m_current_input.LastTime > TextLookupTimeout)
|
m_current_input.Update (timestamp);
|
||||||
{
|
|
||||||
m_current_input.Reset();
|
|
||||||
}
|
|
||||||
m_current_input.LastTime = timestamp;
|
|
||||||
if (m_current_input.Mismatch)
|
if (m_current_input.Mismatch)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user