Browse Source

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

closes #2
tickets/02/2/2
rarified 4 years ago
parent
commit
2ab6cdf49f
  1. 7
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp
  2. 5
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp
  3. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h
  4. 4
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfMessage/pfGUINotifyMsg.h

7
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIDialogNotifyProc.cpp

@ -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 );
} }

5
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp

@ -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

1
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h

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

4
MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfMessage/pfGUINotifyMsg.h

@ -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

Loading…
Cancel
Save