Crossfire Server, Trunk
AnimationsWrapper.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 ANIMATIONS_WRAPPER_H
14
#define ANIMATIONS_WRAPPER_H
15
16
#include <QObject>
17
18
#include "
global.h
"
19
#include "
face.h
"
20
#include "
assets.h
"
21
#include "
AssetsManager.h
"
22
#include "../assets/AssetsCollectionWrapper.h"
23
#include "../faces/FaceWrapper.h"
24
25
class
ResourcesManager
;
26
27
class
AnimationsWrapper
:
public
AssetsCollectionWrapper
<Animations> {
28
Q_OBJECT
29
30
public
:
31
AnimationsWrapper
(
AssetWrapper
*parent,
ResourcesManager
*resourcesManager)
32
:
AssetsCollectionWrapper
(parent, tr(
"Animations"
),
getManager
()->
animations
(), resourcesManager, tr(
"Display all animations."
)) {
33
}
34
35
virtual
PossibleUse
uses
(
const
AssetWrapper
*asset, std::string &)
const override
{
36
return
dynamic_cast<
const
FaceWrapper
*
>
(asset) ==
nullptr
?
DoesntUse
:
ChildrenMayUse
;
37
}
38
};
39
40
#endif // ANIMATIONS_WRAPPER_H
global.h
ResourcesManager
Definition:
ResourcesManager.h:80
AssetsManager.h
face.h
AssetWrapper::PossibleUse
PossibleUse
Definition:
AssetWrapper.h:32
AnimationsWrapper
Definition:
AnimationsWrapper.h:27
getManager
AssetsManager * getManager()
Definition:
assets.cpp:305
AssetWrapper::ChildrenMayUse
@ ChildrenMayUse
Definition:
AssetWrapper.h:32
FaceWrapper
Definition:
FaceWrapper.h:24
AssetWrapper
Definition:
AssetWrapper.h:25
dragon_attune.animations
dictionary animations
Definition:
dragon_attune.py:25
AnimationsWrapper::uses
virtual PossibleUse uses(const AssetWrapper *asset, std::string &) const override
Definition:
AnimationsWrapper.h:35
assets.h
AssetWrapper::DoesntUse
@ DoesntUse
Definition:
AssetWrapper.h:32
AssetsCollectionWrapper
Definition:
AssetsCollectionWrapper.h:21
AnimationsWrapper::AnimationsWrapper
AnimationsWrapper(AssetWrapper *parent, ResourcesManager *resourcesManager)
Definition:
AnimationsWrapper.h:31
crossfire-crossfire-server
utils
cre
animations
AnimationsWrapper.h
Generated by
1.8.17