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. 25
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.cpp
  3. 1
      MOULOpenSourceClientPlugin/Plasma20/Sources/Plasma/FeatureLib/pfGameGUIMgr/pfGUIEditBoxMod.h
  4. 10
      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 );
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 );
}

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

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

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

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

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

@ -83,8 +83,9 @@ public:
kFocusChange, // when one of its controls loses focus to another
kExitMode, // GUI Exit Mode key was pressed
kInterestingEvent, // GUI interesting-ness has changed
kMessageHistoryUp = 9, // up key to scroll back in history
kMessageHistoryDown,// down key to scroll forward 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
kEndEventList
};
@ -99,8 +100,9 @@ public:
// kAction - single click on item(s)
// kEditBox
// kAction - enter key hit
// kMessageHistoryUp - up key hit
// kMessageHistoryDown - down key hit
// kSpecialAction - tab key hit (for autocompletion on Python side)
// kMessageHistoryUp - up key hit
// kMessageHistoryDown - down key hit
// kUpDownPair
// kValueChanged - the value of the pair has been changed
// kKnob

Loading…
Cancel
Save