Crossfire Server, Trunk
GeneralMessagesWrapper.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 GENERAL_MESSAGES_WRAPPER_H
14
#define GENERAL_MESSAGES_WRAPPER_H
15
16
#include "
assets.h
"
17
#include "
book.h
"
18
#include "
AssetsManager.h
"
19
#include "
assets/AssetsCollectionWrapper.h
"
20
#include "
faces/FaceWrapper.h
"
21
#include "
quests/QuestWrapper.h
"
22
23
class
ResourcesManager
;
24
25
class
GeneralMessagesWrapper
:
public
AssetsCollectionWrapper
<GeneralMessage> {
26
Q_OBJECT
27
28
public
:
29
GeneralMessagesWrapper
(
AssetWrapper
*parent,
ResourcesManager
*resources)
30
:
AssetsCollectionWrapper
(parent, tr(
"General messages"
),
getManager
()->
messages
(), resources, tr(
"Display all general messages."
)) {
31
}
32
33
virtual
PossibleUse
uses
(
const
AssetWrapper
*asset, std::string &)
const override
{
34
return
dynamic_cast<
const
FaceWrapper
*
>
(asset)
35
||
dynamic_cast<
const
QuestWrapper
*
>
(asset)
36
?
ChildrenMayUse
:
DoesntUse
;
37
}
38
};
39
40
#endif // GENERAL_MESSAGES_WRAPPER_H
ResourcesManager
Definition:
ResourcesManager.h:80
AssetsManager.h
QuestWrapper
Definition:
QuestWrapper.h:66
AssetWrapper::PossibleUse
PossibleUse
Definition:
AssetWrapper.h:32
getManager
AssetsManager * getManager()
Definition:
assets.cpp:305
AssetWrapper::ChildrenMayUse
@ ChildrenMayUse
Definition:
AssetWrapper.h:32
QuestWrapper.h
FaceWrapper
Definition:
FaceWrapper.h:24
AssetWrapper
Definition:
AssetWrapper.h:25
GeneralMessagesWrapper
Definition:
GeneralMessagesWrapper.h:25
book.h
FaceWrapper.h
navar-midane_apply.messages
list messages
Definition:
navar-midane_apply.py:8
AssetsCollectionWrapper.h
assets.h
GeneralMessagesWrapper::uses
virtual PossibleUse uses(const AssetWrapper *asset, std::string &) const override
Definition:
GeneralMessagesWrapper.h:33
GeneralMessagesWrapper::GeneralMessagesWrapper
GeneralMessagesWrapper(AssetWrapper *parent, ResourcesManager *resources)
Definition:
GeneralMessagesWrapper.h:29
AssetWrapper::DoesntUse
@ DoesntUse
Definition:
AssetWrapper.h:32
AssetsCollectionWrapper
Definition:
AssetsCollectionWrapper.h:21
crossfire-crossfire-server
utils
cre
general_messages
GeneralMessagesWrapper.h
Generated by
1.8.17