mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-21 04:15:36 +00:00
Expanded functionality of the guiPopupCtrlEx to support search filtering
This commit is contained in:
parent
4c58a3601f
commit
4f399eb87f
2 changed files with 105 additions and 28 deletions
|
|
@ -35,6 +35,7 @@
|
|||
#ifndef _GUISCROLLCTRL_H_
|
||||
#include "gui/containers/guiScrollCtrl.h"
|
||||
#endif
|
||||
#include "guiTextEditCtrl.h"
|
||||
class GuiPopUpMenuCtrlEx;
|
||||
class GuiPopupTextListCtrlEx;
|
||||
|
||||
|
|
@ -118,6 +119,8 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
|
|||
bool mRenderScrollInNA; // Added
|
||||
bool mReverseTextList; // Added - Should we reverse the text list if we display up?
|
||||
bool mHotTrackItems;
|
||||
bool mTextSearchItems;
|
||||
String mSearchText;
|
||||
|
||||
enum BitmapModes
|
||||
{
|
||||
|
|
@ -134,6 +137,8 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
|
|||
|
||||
S32 mIdMax;
|
||||
|
||||
GuiTextEditCtrl* mSearchEdit; // Added
|
||||
|
||||
virtual void addChildren();
|
||||
virtual void repositionPopup();
|
||||
|
||||
|
|
@ -143,9 +148,10 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
|
|||
GuiPopUpMenuCtrlEx(void);
|
||||
~GuiPopUpMenuCtrlEx();
|
||||
GuiScrollCtrl::Region mScrollDir;
|
||||
bool onWake(); // Added
|
||||
bool onAdd();
|
||||
void onSleep();
|
||||
virtual bool onWake(); // Added
|
||||
virtual void onRemove();
|
||||
virtual bool onAdd();
|
||||
virtual void onSleep();
|
||||
void setBitmap(const char *name); // Added
|
||||
void sort();
|
||||
void sortID(); // Added
|
||||
|
|
@ -176,6 +182,8 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl
|
|||
S32 findText( const char* text );
|
||||
S32 getNumEntries() { return( mEntries.size() ); }
|
||||
void replaceText(S32);
|
||||
|
||||
void setSearchText(String searchTxt) { mSearchText = String::ToLower(searchTxt); onAction(); }
|
||||
|
||||
DECLARE_CONOBJECT(GuiPopUpMenuCtrlEx);
|
||||
DECLARE_CATEGORY( "Gui Lists" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue