DDraceNetwork Docs
menus_settings_assets.cpp File Reference
#include <base/system.h>
#include <engine/shared/config.h>
#include <engine/storage.h>
#include <engine/textrender.h>
#include <game/client/gameclient.h>
#include <game/client/ui_listbox.h>
#include <game/localization.h>
#include "menus.h"
#include <chrono>
Include dependency graph for menus_settings_assets.cpp:

Classes

struct  SMenuAssetScanUser
 

Typedefs

typedef std::function< void()> TMenuAssetScanLoadedFunc
 

Enumerations

enum  {
  ASSETS_TAB_ENTITIES = 0 , ASSETS_TAB_GAME = 1 , ASSETS_TAB_EMOTICONS = 2 , ASSETS_TAB_PARTICLES = 3 ,
  ASSETS_TAB_HUD = 4 , ASSETS_TAB_EXTRAS = 5 , NUMBER_OF_ASSETS_TABS = 6
}
 

Functions

template<typename TName >
static void LoadAsset (TName *pAssetItem, const char *pAssetName, IGraphics *pGraphics)
 
template<typename TName >
static int AssetScan (const char *pName, int IsDir, int DirType, std::vector< TName > &vAssetList, const char *pAssetName, IGraphics *pGraphics, void *pUser)
 
static const CMenus::SCustomItemGetCustomItem (int CurTab, size_t Index)
 
template<typename TName >
void ClearAssetList (std::vector< TName > &vList, IGraphics *pGraphics)
 
template<typename TName , typename TCaller >
void InitAssetList (std::vector< TName > &vAssetList, const char *pAssetPath, const char *pAssetName, FS_LISTDIR_CALLBACK pfnCallback, IGraphics *pGraphics, IStorage *pStorage, TCaller Caller)
 
template<typename TName >
int InitSearchList (std::vector< const TName * > &vpSearchList, std::vector< TName > &vAssetList)
 

Variables

static std::vector< const CMenus::SCustomEntities * > gs_vpSearchEntitiesList
 
static std::vector< const CMenus::SCustomGame * > gs_vpSearchGamesList
 
static std::vector< const CMenus::SCustomEmoticon * > gs_vpSearchEmoticonsList
 
static std::vector< const CMenus::SCustomParticle * > gs_vpSearchParticlesList
 
static std::vector< const CMenus::SCustomHud * > gs_vpSearchHudList
 
static std::vector< const CMenus::SCustomExtras * > gs_vpSearchExtrasList
 
static bool gs_aInitCustomList [NUMBER_OF_ASSETS_TABS]
 
static size_t gs_aCustomListSize [NUMBER_OF_ASSETS_TABS]
 
static CLineInputBuffered< 64 > s_aFilterInputs [NUMBER_OF_ASSETS_TABS]
 
static int s_CurCustomTab = ASSETS_TAB_ENTITIES
 

Typedef Documentation

◆ TMenuAssetScanLoadedFunc

typedef std::function<void()> TMenuAssetScanLoadedFunc

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ASSETS_TAB_ENTITIES 
ASSETS_TAB_GAME 
ASSETS_TAB_EMOTICONS 
ASSETS_TAB_PARTICLES 
ASSETS_TAB_HUD 
ASSETS_TAB_EXTRAS 
NUMBER_OF_ASSETS_TABS 

Function Documentation

◆ AssetScan()

template<typename TName >
static int AssetScan ( const char *  pName,
int  IsDir,
int  DirType,
std::vector< TName > &  vAssetList,
const char *  pAssetName,
IGraphics pGraphics,
void *  pUser 
)
static

◆ ClearAssetList()

template<typename TName >
void ClearAssetList ( std::vector< TName > &  vList,
IGraphics pGraphics 
)

◆ GetCustomItem()

static const CMenus::SCustomItem * GetCustomItem ( int  CurTab,
size_t  Index 
)
static

◆ InitAssetList()

template<typename TName , typename TCaller >
void InitAssetList ( std::vector< TName > &  vAssetList,
const char *  pAssetPath,
const char *  pAssetName,
FS_LISTDIR_CALLBACK  pfnCallback,
IGraphics pGraphics,
IStorage pStorage,
TCaller  Caller 
)

◆ InitSearchList()

template<typename TName >
int InitSearchList ( std::vector< const TName * > &  vpSearchList,
std::vector< TName > &  vAssetList 
)

◆ LoadAsset()

template<typename TName >
static void LoadAsset ( TName *  pAssetItem,
const char *  pAssetName,
IGraphics pGraphics 
)
static

Variable Documentation

◆ gs_aCustomListSize

size_t gs_aCustomListSize[NUMBER_OF_ASSETS_TABS]
static
Initial value:
= {
0,
}

◆ gs_aInitCustomList

bool gs_aInitCustomList[NUMBER_OF_ASSETS_TABS]
static
Initial value:
= {
true,
}

◆ gs_vpSearchEmoticonsList

std::vector<const CMenus::SCustomEmoticon *> gs_vpSearchEmoticonsList
static

◆ gs_vpSearchEntitiesList

std::vector<const CMenus::SCustomEntities *> gs_vpSearchEntitiesList
static

◆ gs_vpSearchExtrasList

std::vector<const CMenus::SCustomExtras *> gs_vpSearchExtrasList
static

◆ gs_vpSearchGamesList

std::vector<const CMenus::SCustomGame *> gs_vpSearchGamesList
static

◆ gs_vpSearchHudList

std::vector<const CMenus::SCustomHud *> gs_vpSearchHudList
static

◆ gs_vpSearchParticlesList

std::vector<const CMenus::SCustomParticle *> gs_vpSearchParticlesList
static

◆ s_aFilterInputs

CLineInputBuffered<64> s_aFilterInputs[NUMBER_OF_ASSETS_TABS]
static

◆ s_CurCustomTab

int s_CurCustomTab = ASSETS_TAB_ENTITIES
static