-
Notifications
You must be signed in to change notification settings - Fork 16
/
PaperdollDialogFactory.cs
77 lines (71 loc) · 3.04 KB
/
PaperdollDialogFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using AutomaticTypeMapper;
using EndlessClient.Controllers;
using EndlessClient.ControlSets;
using EndlessClient.Dialogs.Services;
using EndlessClient.GameExecution;
using EndlessClient.HUD;
using EndlessClient.HUD.Inventory;
using EOLib.Domain.Character;
using EOLib.Graphics;
using EOLib.IO.Repositories;
namespace EndlessClient.Dialogs.Factories
{
[AutoMappedType(IsSingleton = true)]
public class PaperdollDialogFactory : IPaperdollDialogFactory
{
private readonly IGameStateProvider _gameStateProvider;
private readonly IEODialogButtonService _eoDialogButtonService;
private readonly IInventorySpaceValidator _inventorySpaceValidator;
private readonly IEOMessageBoxFactory _eoMessageBoxFactory;
private readonly IStatusLabelSetter _statusLabelSetter;
private readonly IPaperdollProvider _paperdollProvider;
private readonly IPubFileProvider _pubFileProvider;
private readonly IHudControlProvider _hudControlProvider;
private readonly INativeGraphicsManager _nativeGraphicsManager;
private IInventoryController _inventoryController;
public PaperdollDialogFactory(IGameStateProvider gameStateProvider,
INativeGraphicsManager nativeGraphicsManager,
IPaperdollProvider paperdollProvider,
IPubFileProvider pubFileProvider,
IHudControlProvider hudControlProvider,
IEODialogButtonService eoDialogButtonService,
IInventorySpaceValidator inventorySpaceValidator,
IEOMessageBoxFactory eoMessageBoxFactory,
IStatusLabelSetter statusLabelSetter)
{
_paperdollProvider = paperdollProvider;
_pubFileProvider = pubFileProvider;
_hudControlProvider = hudControlProvider;
_nativeGraphicsManager = nativeGraphicsManager;
_gameStateProvider = gameStateProvider;
_eoDialogButtonService = eoDialogButtonService;
_inventorySpaceValidator = inventorySpaceValidator;
_eoMessageBoxFactory = eoMessageBoxFactory;
_statusLabelSetter = statusLabelSetter;
}
public PaperdollDialog Create(ICharacter character, bool isMainCharacter)
{
return new PaperdollDialog(_gameStateProvider,
_nativeGraphicsManager,
_inventoryController,
_paperdollProvider,
_pubFileProvider,
_hudControlProvider,
_eoDialogButtonService,
_inventorySpaceValidator,
_eoMessageBoxFactory,
_statusLabelSetter,
character,
isMainCharacter);
}
public void InjectInventoryController(IInventoryController inventoryController)
{
_inventoryController = inventoryController;
}
}
public interface IPaperdollDialogFactory
{
PaperdollDialog Create(ICharacter character, bool isMainCharacter);
void InjectInventoryController(IInventoryController inventoryController);
}
}