Mercurial > LightClone
diff LightClone/Source/CodeSlot.cpp @ 37:58a16d529d95
Refactoring code and adding events for drag and drop
author | koryspansel <koryspansel@bendbroadband.com> |
---|---|
date | Wed, 21 Sep 2011 20:30:29 -0700 |
parents | 06b151afc8d0 |
children | 95677f648a2c |
line wrap: on
line diff
--- a/LightClone/Source/CodeSlot.cpp Wed Sep 21 12:18:15 2011 -0700 +++ b/LightClone/Source/CodeSlot.cpp Wed Sep 21 20:30:29 2011 -0700 @@ -50,6 +50,22 @@ } /* + * SetSlot + */ +void CodeSlot::SetSlot(uint32 nValue) +{ + nSlot = nValue; +} + +/* + * GetSlot + */ +uint32 CodeSlot::GetSlot() const +{ + return nSlot; +} + +/* * SetAction */ void CodeSlot::SetAction(uint32 nValue) @@ -136,5 +152,9 @@ */ void CodeSlot::OnDrop(GuiElement* pSource, float fX, float fY) { + //TODO: Need to make sure pSource is actually a CodeSlot SetAction(((CodeSlot*)pSource)->nAction); + + GuiEventArguments kArguments(this); + Fire(CodeSlot::EventDrop, kArguments); }