1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-20 04:09:16 +00:00

Merge branch 'marten/boq-chat-name-completion'

closes #2
This commit is contained in:
rarified
2021-03-27 16:05:12 -06:00
4 changed files with 28 additions and 15 deletions

View File

@ -101,7 +101,12 @@ void pfGUIDialogNotifyProc::HandleExtendedEvent( pfGUIControlMod *ctrl, UInt32 e
{ {
pfGUIEditBoxMod *edit = pfGUIEditBoxMod::ConvertNoRef( ctrl ); pfGUIEditBoxMod *edit = pfGUIEditBoxMod::ConvertNoRef( ctrl );
if(edit && event == pfGUIEditBoxMod::kWantMessageHistoryUp) if(edit != nil && event == pfGUIEditBoxMod::kWantAutocomplete)
{
//send notify, somebody will do something with that (like python script)
ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kSpecialAction );
}
else if(edit && event == pfGUIEditBoxMod::kWantMessageHistoryUp)
{ {
ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kMessageHistoryUp ); ISendNotify( ctrl->GetKey(), pfGUINotifyMsg::kMessageHistoryUp );
} }

View File

@ -502,6 +502,11 @@ hsBool pfGUIEditBoxMod::HandleKeyEvent( pfGameGUIMgr::EventType event, plKeyDef
DoSomething(); // Query WasEscaped() to see if it was escape vs enter DoSomething(); // Query WasEscaped() to see if it was escape vs enter
return true; return true;
} }
else if (key == KEY_TAB)
{
//Send notify for python scripts
HandleExtendedEvent(kWantAutocomplete);
}
else if (key == KEY_UP) else if (key == KEY_UP)
{ {
// Send notify for python scripts // Send notify for python scripts

View File

@ -135,6 +135,7 @@ class pfGUIEditBoxMod : public pfGUIControlMod
enum ExtendedEvents enum ExtendedEvents
{ {
kValueChanging, kValueChanging,
kWantAutocomplete
kWantMessageHistoryUp, kWantMessageHistoryUp,
kWantMessageHistoryDown kWantMessageHistoryDown
}; };

View File

@ -83,7 +83,8 @@ public:
kFocusChange, // when one of its controls loses focus to another kFocusChange, // when one of its controls loses focus to another
kExitMode, // GUI Exit Mode key was pressed kExitMode, // GUI Exit Mode key was pressed
kInterestingEvent, // GUI interesting-ness has changed kInterestingEvent, // GUI interesting-ness has changed
kMessageHistoryUp = 9, // up key to scroll back in history kSpecialAction, // meaning depends on control functionality (see below)
kMessageHistoryUp, // up key to scroll back in history
kMessageHistoryDown,// down key to scroll forward in history kMessageHistoryDown,// down key to scroll forward in history
kEndEventList kEndEventList
}; };
@ -99,6 +100,7 @@ public:
// kAction - single click on item(s) // kAction - single click on item(s)
// kEditBox // kEditBox
// kAction - enter key hit // kAction - enter key hit
// kSpecialAction - tab key hit (for autocompletion on Python side)
// kMessageHistoryUp - up key hit // kMessageHistoryUp - up key hit
// kMessageHistoryDown - down key hit // kMessageHistoryDown - down key hit
// kUpDownPair // kUpDownPair