Object Popup API

Alphalaneous

Object Popup API

An API to show an object popup. This can be used whenever you need to have the user choose objects for any purpose.

It contains the following methods:

ObjectSelectPopup

//create the popup, multiSelect allows for more than one object to be selected
static ObjectSelectPopup* create(EditorUI* editorUI, std::string title, bool multiSelect = false);

//get the popup if one exists
static ObjectSelectPopup* get();

//set a callback for when an object is selected
void setSelectCallback(std::function);

//set a callback for when the popup is closed
void setCloseCallback(std::function);

//clear all selected objects
void clearSelection();

//select a set of objects, set doCallback if you wish for your callback to be ran
void selectObjects(std::set objects, bool doCallback = false);

//select an object, set doCallback if you wish for your callback to be ran
void selectObject(int id, bool doCallback = false);

//overrides this mod's settings and lets you force a tooltip scale
void setTooltipScale(float scale);

//overrides this mod's settings and lets you force a selection overlay color
void setOverlayColor(cocos2d::ccColor3B color);

//gets the set of selected IDs
std::set getSelectedIDs();

ObjectNames

//get the ObjectNames singleton
static ObjectNames* get();

//get the object name by ID
std::string nameForID(int id);

//get a map of names to ID
std::unordered_map getNames();

1.0.7-beta.1

  • 2.2081 support

1.0.6

  • Fix text input filter not allowing colons

1.0.5

  • Fix a crash

1.0.4

  • Search by Object ID
  • type id: 1234 to search by ID
  • Search by Contains
  • type contains: blue to search by if a name contains
  • Search by Exact
  • type exact: black gradient square to search by exact name

1.0.3

  • iOS bug fix

1.0.2

  • Bug fix

1.0.1

  • iOS support

1.0.0

  • Initial Release.

Original Site made by HJfod. Geode 2 parody-ish by MeFinity.

Geode-SDK is the property of the Geode Team.


This website (Geode 2, Codename Malachite) is not affiliated with the Geode Team in any way shape or form.