22 #ifndef GUI_WIDGETS_TABS_SOCIALNAVIGATIONTAB_H
23 #define GUI_WIDGETS_TABS_SOCIALNAVIGATIONTAB_H
41 #include "resources/map/map.h"
53 const Opaque showBackground) :
80 if ((map ==
nullptr) || map->
empty())
87 STD_VECTOR<MapItem*> portals = map->
getPortals();
89 STD_VECTOR<MapItem*>::const_iterator i = portals.begin();
92 STD_VECTOR<Avatar*>::iterator ia = avatars->begin();
94 while (ia != avatars->end())
106 while (i != portals.end())
109 if (portal ==
nullptr)
112 const int x = portal->
getX();
113 const int y = portal->
getY();
115 const std::string name =
strprintf(
"%s [%d %d]",
127 avatars->push_back(ava);
138 if (being !=
nullptr)
144 if (specialLayer !=
nullptr)
146 portal = specialLayer->
getTile(
148 if (portal !=
nullptr)
178 const Avatar *
const ava = avatars->at(num);
194 STD_VECTOR<Avatar*>::const_iterator i = avatars->begin();
195 const STD_VECTOR<Avatar*>::const_iterator i_end = avatars->end();
206 const std::string name =
strprintf(
"%s [%d %d]",
227 STD_VECTOR<Avatar*>::const_iterator i = avatars->begin();
228 const STD_VECTOR<Avatar*>::const_iterator i_end = avatars->end();
232 const Avatar *
const ava = *i;
256 if (portal ==
nullptr)
259 const std::string name =
strprintf(
"%s [%d %d]",
271 avatars->push_back(ava);
284 STD_VECTOR<Avatar*>::iterator i = avatars->begin();
285 const STD_VECTOR<Avatar*>::iterator i_end = avatars->end();
ActorManager * actorManager
Being * findPortalByTile(const int x, const int y) const
void setOnline(const bool online)
void setOriginalName(const std::string &name)
void setType(const int n)
void setLevel(const int level)
void setName(const std::string &name)
void setName(const std::string &name)
std::vector< Avatar * > * getMembers()
bool getBoolValue(const std::string &key) const
static std::string getKeyShortString(const std::string &key)
bool navigateTo(const int x, const int y)
bool isReachable(Being *const being, const int maxCost)
const std::string & getComment() const
void setName(const std::string &name)
const std::vector< MapItem * > & getPortals() const
SpecialLayer * getSpecialLayer() const
MapItem * findPortalXY(const int x, const int y) const
static std::string keyName(const int number)
void selectIndex(const unsigned num)
void removePortal(const int x, const int y)
void addPortal(const int x, const int y)
int getPortalIndex(const int x, const int y)
SocialNavigationTab(const Widget2 *const widget, const Opaque showBackground)
BeingsListModel * mBeings
void createControls(AvatarListModel *const listModel, const Opaque showBackground)
void updateCounter() const
std::string mCounterString
void setProcessedPortals(const bool n)
const Map * getMap() const
bool getProcessedPortals() const
MapItem * getTile(const int x, const int y) const
void setCaption(const std::string &caption)
#define A_DELETE_COPY(func)
LocalPlayer * localPlayer
OutfitWindow * outfitWindow
SocialWindow * socialWindow
std::string strprintf(const char *const format,...)