mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
We now filter WM_CHARs containing control codes, so ignoring them in gui code is useless (even harmful)
This commit is contained in:
@ -72,7 +72,6 @@ pfGUIEditBoxMod::pfGUIEditBoxMod()
|
||||
{
|
||||
SetFlag( kWantsInterest );
|
||||
SetFlag( kTakesSpecialKeys );
|
||||
fIgnoreNextKey = false;
|
||||
fEscapedFlag = false;
|
||||
fFirstHalfExitKeyPushed = false;
|
||||
fSpecialCaptureKeyEventMode = false;
|
||||
@ -241,13 +240,6 @@ hsBool pfGUIEditBoxMod::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
if( fBuffer == nil )
|
||||
return false;
|
||||
|
||||
if( fIgnoreNextKey )
|
||||
{
|
||||
// So we don't process keys that already got handled by HandleKeyEvent()
|
||||
fIgnoreNextKey = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
int i = wcslen( fBuffer );
|
||||
|
||||
// Insert character at the current cursor position, then inc the cursor by one
|
||||
@ -330,7 +322,6 @@ hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
|
||||
// done capturing... tell the handler
|
||||
DoSomething();
|
||||
}
|
||||
fIgnoreNextKey = true;
|
||||
fFirstHalfExitKeyPushed = false;
|
||||
return true;
|
||||
}
|
||||
@ -412,13 +403,7 @@ hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fIgnoreNextKey = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
fIgnoreNextKey = true;
|
||||
IUpdate();
|
||||
return true;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class pfGUIEditBoxMod : public pfGUIControlMod
|
||||
wchar_t *fBuffer;
|
||||
uint32_t fBufferSize, fCursorPos;
|
||||
int32_t fScrollPos;
|
||||
hsBool fIgnoreNextKey, fEscapedFlag;
|
||||
hsBool fEscapedFlag;
|
||||
hsBool fFirstHalfExitKeyPushed;
|
||||
|
||||
hsBool fSpecialCaptureKeyEventMode;
|
||||
|
@ -151,7 +151,6 @@ pfGUIMultiLineEditCtrl::pfGUIMultiLineEditCtrl()
|
||||
fLastCursorLine = 0;
|
||||
fBuffer.Append( 0L );
|
||||
fBufferLimit = -1;
|
||||
fIgnoreNextKey = false;
|
||||
fScrollControl = nil;
|
||||
fScrollProc = nil;
|
||||
fScrollPos = 0;
|
||||
@ -1036,13 +1035,6 @@ hsBool pfGUIMultiLineEditCtrl::HandleKeyPress( wchar_t key, uint8_t modifiers )
|
||||
if ((fPrevCtrl || fNextCtrl) && (fLineStarts.GetCount() <= GetFirstVisibleLine()))
|
||||
return true; // we're ignoring if we can't actually edit our visible frame (and we're linked)
|
||||
|
||||
if( fIgnoreNextKey )
|
||||
{
|
||||
// So we don't process keys that already got handled by HandleKeyEvent()
|
||||
fIgnoreNextKey = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Store info for the event we're about to send out
|
||||
fLastKeyModifiers = modifiers;
|
||||
fLastKeyPressed = key;
|
||||
@ -1134,13 +1126,7 @@ hsBool pfGUIMultiLineEditCtrl::HandleKeyEvent( pfGameGUIMgr::EventType event, p
|
||||
// fEscapedFlag = true;
|
||||
DoSomething(); // Query WasEscaped() to see if it was escape vs enter
|
||||
}
|
||||
else
|
||||
{
|
||||
fIgnoreNextKey = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
fIgnoreNextKey = true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
@ -100,7 +100,7 @@ class pfGUIMultiLineEditCtrl : public pfGUIControlMod
|
||||
hsTArray<int32_t> fLineStarts;
|
||||
uint16_t fLineHeight, fCurrCursorX, fCurrCursorY;
|
||||
int32_t fCursorPos, fLastCursorLine;
|
||||
hsBool fIgnoreNextKey, fReadyToRender;
|
||||
hsBool fReadyToRender;
|
||||
hsBounds3Ext fLastP2PArea;
|
||||
int8_t fLockCount;
|
||||
uint8_t fCalcedFontSize; // The font size that we calced our line height at
|
||||
|
Reference in New Issue
Block a user