コード例 #1
0
{
	BaseClass::ApplySchemeSettings( pScheme );

	LoadControlSettings( "tilegen/TileGenLayoutPage.res", "GAME" );
}

// =============================================================================================

static bool MissionTreeSortFunc( KeyValues *pItem1, KeyValues *pItem2 )
{
	return Q_stricmp( pItem1->GetString( "Text" ), pItem2->GetString( "Text" ) ) < 0;
}

MessageMapItem_t CTilegenKVEditorPage::m_MessageMap[] =
{
	MAP_MESSAGE_CONSTCHARPTR( CTilegenKVEditorPage, "FileSelected", OnFileSelected, "fullpath" ), 
};

IMPLEMENT_PANELMAP( CTilegenKVEditorPage, vgui::EditablePanel );

CTilegenKVEditorPage::CTilegenKVEditorPage( Panel *pParent, const char *pName ) :
BaseClass( pParent, pName )
{
	m_pTree = new vgui::TreeView( this, "Tree" );
	m_pTree->MakeReadyForUse();
	m_pTree->SetSortFunc( MissionTreeSortFunc );

	m_szFilename[0] = '\0';

	m_pFilenameLabel = new vgui::Label( this, "FilenameLabel", "" );
	m_pSaveButton = new vgui::Button( this, "SaveButton", "Save", this, "Save" );
コード例 #2
0
		{
			char startPath[ MAX_PATH ];
			Q_strncpy( startPath, com_gamedir, sizeof( startPath ) );
			COM_FixSlashes( startPath );
			m_hFileOpenDialog->SetStartDirectory( va( "%s/sound", startPath ) );
			m_hFileOpenDialog->DoModal( false );
		}
		return;
	}
	
	BaseClass::OnCommand( command );
}

vgui::MessageMapItem_t CBaseActionPlaySoundStartDialog::m_MessageMap[] =
{
	MAP_MESSAGE_CONSTCHARPTR( CBaseActionPlaySoundStartDialog, "FileSelected", OnFileSelected, "fullpath" ),   
};

IMPLEMENT_PANELMAP(CBaseActionPlaySoundStartDialog, BaseClass);


DECLARE_DEMOACTIONEDIT( DEMO_ACTION_PLAYSOUND_START, CBaseActionPlaySoundStartDialog );

class CBaseActionWithStopTimeDialog : public CBaseActionEditDialog
{
	typedef CBaseActionEditDialog BaseClass;
public:
	CBaseActionWithStopTimeDialog( CDemoEditorPanel *parent, CBaseDemoAction *action, bool newaction );

	virtual void	Init( void );