#include <assetmanager.h>
◆ KageAssetManager()
KageAssetManager::KageAssetManager |
( |
Kage * | p_kage | ) |
|
◆ ~KageAssetManager()
KageAssetManager::~KageAssetManager |
( |
| ) |
|
|
virtual |
◆ addAsset()
unsigned int KageAssetManager::addAsset |
( |
std::string | p_name = "" | ) |
|
TODO:
- [DONE] check p_name exists – done in Kage with AssetManager
- [DONE]if project is saved, copy file to project path [DONE] else, copy file to temporary
- [DONE] create hash for path and filesize for future check by assetManager if already existing in Library use kHash from Quixie
TODO:
- [DONE] check if file p_name exists
- [DONE] if existing, copy to temp path
- [DONE] load copied file – use original path as hash
- [DONE] select image on stage
- draw rectangle on selected image on stage
- resize image on stage
- [DONE] delete image on stage
- [DONE] add image on stage FROM LIBRARY (double click)
- [DONE] add image on stage FROM ASSET (double click)
- add image on stage FROM LIBRARY (drag-n-drop)
- add image on stage FROM ASSET (drag-n-drop)
◆ addImageAsset()
unsigned int KageAssetManager::addImageAsset |
( |
std::string | p_name = "" | ) |
|
Used by Kage when opening KAGE files with PNG Assets Blindly accepts that p_name is actually a PNG file.
- Parameters
-
p_name | Image file with full path |
- Returns
- unsigned int
◆ assetCount()
unsigned int KageAssetManager::assetCount |
( |
| ) |
|
For use of Kage when exporting/saving to file.
- Returns
- size of array of KageAsset
◆ deleteAsset()
void KageAssetManager::deleteAsset |
( |
| ) |
|
◆ exists()
bool KageAssetManager::exists |
( |
std::string | p_filePath | ) |
|
Checks all Asset if already imported
- Parameters
-
p_filePath | Asset's full path1 |
- Returns
- true if p_filePath is in AssetManager. Otherwise, false.
◆ forceRender()
void KageAssetManager::forceRender |
( |
| ) |
|
◆ getAsset()
Not to be confused of getCurrentAsset(). This function returns the pointer to active KageAsset Object to caller
- Returns
- pointer to registered active asset
◆ getAssetType()
◆ getCurrentAsset()
unsigned int KageAssetManager::getCurrentAsset |
( |
| ) |
|
◆ getFileNameAt()
std::string KageAssetManager::getFileNameAt |
( |
unsigned int | p_index | ) |
|
For use by saveAssetsTo when Exporting; returns path like image.png
- Parameters
-
◆ getFilePathAt()
std::string KageAssetManager::getFilePathAt |
( |
unsigned int | p_index | ) |
|
For use by saveAssetsTo when Exporting; returns path like /home/creek23/assets/
- Parameters
-
◆ getHashAt()
std::string KageAssetManager::getHashAt |
( |
unsigned int | p_index | ) |
|
For use by saveAssetsTo when Exporting; returns hash of '/home/creek23/assets/image.png'
- Parameters
-
◆ getIDAt()
std::string KageAssetManager::getIDAt |
( |
unsigned int | p_index | ) |
|
◆ getImageByID()
std::string KageAssetManager::getImageByID |
( |
unsigned int | p_id | ) |
|
For use by Stage when rendering an Asset, it needs the image path (why not the loaded image object?)
- Parameters
-
◆ getImagePathByID()
std::string KageAssetManager::getImagePathByID |
( |
unsigned int | p_index | ) |
|
◆ getLabel()
std::string KageAssetManager::getLabel |
( |
| ) |
|
◆ getLabelAt()
std::string KageAssetManager::getLabelAt |
( |
unsigned int | p_index | ) |
|
For use by saveAssetsTo when Exporting; returns label as scene on AssetManager
- Parameters
-
◆ moveDown()
bool KageAssetManager::moveDown |
( |
| ) |
|
◆ moveToBottom()
bool KageAssetManager::moveToBottom |
( |
| ) |
|
NOTE: assets are organized as index 0 as BOTTOM and last index is TOP
- See also
- moveDown() moveToTop() moveUp()
- Returns
- True if successfully moved to bottom
◆ moveToTop()
bool KageAssetManager::moveToTop |
( |
| ) |
|
◆ moveUp()
bool KageAssetManager::moveUp |
( |
| ) |
|
◆ removeAllAssets()
bool KageAssetManager::removeAllAssets |
( |
| ) |
|
◆ renameAsset() [1/2]
void KageAssetManager::renameAsset |
( |
| ) |
|
For use of Kage when User clicked Asset->Rename
- See also
- renameAsset(KageAsset)
◆ renameAsset() [2/2]
void KageAssetManager::renameAsset |
( |
KageAsset * | p_asset | ) |
|
◆ render()
void KageAssetManager::render |
( |
unsigned int | p_renderID | ) |
|
◆ renderLibrary()
void KageAssetManager::renderLibrary |
( |
unsigned int | p_ID | ) |
|
◆ renderStage()
void KageAssetManager::renderStage |
( |
| ) |
|
For use of KageAsset. When a KageAsset's visibility is clicked, this function will be called to reflect Asset's visibility on stage.
◆ saveAssetsTo()
std::string KageAssetManager::saveAssetsTo |
( |
std::string | p_path | ) |
|
For use by Kage when Exporting; returns XML string as part of .kage file
- Parameters
-
◆ setAboveAssetSelected()
void KageAssetManager::setAboveAssetSelected |
( |
KageAsset * | p_asset | ) |
|
For use by Asset when Arrow Up is pressed.
- Parameters
-
p_asset | source asset where Key Press happened |
◆ setAssetHash()
void KageAssetManager::setAssetHash |
( |
std::string | p_assetHash | ) |
|
Set's an Asset's hash
- Parameters
-
◆ setAssetType()
Set the AssetType of the selected Asset
- Parameters
-
p_assetType | which AssetType to set |
◆ setBelowAssetSelected()
void KageAssetManager::setBelowAssetSelected |
( |
KageAsset * | p_asset | ) |
|
For use by Asset when Arrow Down is pressed.
- Parameters
-
p_asset | source asset where Key Press happened |
◆ setCurrentAsset()
void KageAssetManager::setCurrentAsset |
( |
unsigned int | p_asset | ) |
|
For use of Kage. When a KageFrame is clicked, KageFramesetManager will call this function via Kage then sets currently active Asset via Index
- Parameters
-
- See also
- getCurrentAsset()
◆ setCurrentAssetByID()
void KageAssetManager::setCurrentAssetByID |
( |
unsigned int | p_assetID | ) |
|
For use of Kage. When a KageFrame is clicked, KageFramesetManager will call this function via Kage then sets currently active Asset via Asset ID
- Parameters
-
p_assetID | is assetID of Asset known to KageFrame |
- See also
- getCurrentAsset()
◆ setFileNameAt()
bool KageAssetManager::setFileNameAt |
( |
unsigned int | p_index, |
|
|
std::string | p_fileName ) |
For use by Kage when Opening.
- Parameters
-
- Returns
- true if asset index exists
-
false
◆ setFilePathAt()
bool KageAssetManager::setFilePathAt |
( |
unsigned int | p_index, |
|
|
std::string | p_filePath ) |
For use by Kage when Opening.
- Parameters
-
- Returns
- true if asset index exists
-
false
◆ setHashAt()
bool KageAssetManager::setHashAt |
( |
unsigned int | p_index, |
|
|
std::string | p_hash ) |
◆ setLabel()
void KageAssetManager::setLabel |
( |
std::string | p_label | ) |
|
Sets the label of current active Asset.
- Parameters
-
p_label | the new label for the active Asset |
◆ setSelected()
void KageAssetManager::setSelected |
( |
KageAsset * | p_asset | ) |
|
◆ _currentAssetID
unsigned int KageAssetManager::_currentAssetID |
|
protected |
◆ _currentAssetIndex
unsigned int KageAssetManager::_currentAssetIndex |
|
protected |
◆ _kage
Kage* KageAssetManager::_kage |
◆ _KageStudioAsset
std::string KageAssetManager::_KageStudioAsset |
◆ _selectedAssetID
unsigned int KageAssetManager::_selectedAssetID |
◆ assetCtr
unsigned int KageAssetManager::assetCtr |
|
protected |
◆ assets
std::vector<KageAsset*> KageAssetManager::assets |
|
protected |
◆ labels
std::vector<Gtk::Button*> KageAssetManager::labels |
|
protected |
The documentation for this class was generated from the following files: