Crossfire Server, Trunk
AllAssets.h
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #ifndef ALL_ASSETS_H
14 #define ALL_ASSETS_H
15 
16 #include "assets/AssetWrapper.h"
17 
18 class ResourcesManager;
19 class ScriptFileManager;
20 class MessageManager;
21 
22 class AllAssets : public AssetWrapper {
23 public:
25 
26  virtual QString displayName() const { return "All assets"; }
27 
28  virtual int childrenCount() const { return myAssets.size(); }
29  virtual AssetWrapper *child(int index) { return myAssets[index]; }
30  virtual int childIndex(AssetWrapper *child) { return myAssets.indexOf(child); }
31 
34 
35 protected:
36  QVector<AssetWrapper *> myAssets;
39 };
40 
41 #endif /* ALL_ASSETS_H */
42 
ScriptFileManager
Definition: ScriptFileManager.h:24
AllAssets::randomMaps
AssetWrapper * randomMaps()
Definition: AllAssets.h:33
AssetWrapper.h
python_init.scripts
scripts
Definition: python_init.py:11
ResourcesManager
Definition: ResourcesManager.h:79
AllAssets::myRandomMaps
AssetWrapper * myRandomMaps
Definition: AllAssets.h:38
AllAssets::myAssets
QVector< AssetWrapper * > myAssets
Definition: AllAssets.h:36
AssetWrapper
Definition: AssetWrapper.h:22
AllAssets::childIndex
virtual int childIndex(AssetWrapper *child)
Definition: AllAssets.h:30
MessageManager
Definition: MessageManager.h:25
navar-midane_apply.messages
list messages
Definition: navar-midane_apply.py:8
AllAssets::AllAssets
AllAssets(ResourcesManager *resources, ScriptFileManager *scripts, MessageManager *messages)
Definition: AllAssets.cpp:37
AllAssets
Definition: AllAssets.h:22
npc_dialog.index
int index
Definition: npc_dialog.py:102
AllAssets::childrenCount
virtual int childrenCount() const
Definition: AllAssets.h:28
AllAssets::regions
AssetWrapper * regions()
Definition: AllAssets.h:32
AllAssets::myRegions
AssetWrapper * myRegions
Definition: AllAssets.h:37
AllAssets::displayName
virtual QString displayName() const
Definition: AllAssets.h:26
AllAssets::child
virtual AssetWrapper * child(int index)
Definition: AllAssets.h:29