Refactoring in SizeNotifiable.
Class is a template now and accepts a registraton policy.
This commit is contained in:
parent
dbf29f13d1
commit
d0a052ddb2
7 changed files with 122 additions and 22 deletions
|
@ -28,7 +28,7 @@ namespace cloonel {
|
|||
SDL_Window* window;
|
||||
SDL_Renderer* renderer;
|
||||
SizeRatio sizeratio;
|
||||
ObserversManager<SizeNotifiable*> resChangeNotifList;
|
||||
ObserversManager<SizeNotifiableBase*> resChangeNotifList;
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
|
@ -108,7 +108,7 @@ namespace cloonel {
|
|||
|
||||
///------------------------------------------------------------------------
|
||||
///------------------------------------------------------------------------
|
||||
size_t SDLMain::RegisterForResChange (SizeNotifiable* parNotif) {
|
||||
size_t SDLMain::RegisterForResChange (SizeNotifiableBase* parNotif) {
|
||||
parNotif->NotifyResChanged(m_localData->sizeratio);
|
||||
return m_localData->resChangeNotifList.Add(parNotif);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue