Ejemplo n.º 1
0
bool CAnimBlendAssociation::UpdateBlend(float fBlendAmount)
{
    m_fBlendAmount += fBlendAmount * m_fBlendAmount;
    if(m_fBlendAmount <= 0.0 && m_fBlendDelta < 0.0)
    {
        m_fBlendAmount = 0.0;
        if(m_fBlendDelta < 0.0)
        {
            m_fBlendDelta = 0.0;
        }
        if(m_usFlags & 0x04)
        {
            if(m_uiCallbackType == FinishCallbackType)
            {
                SetFinishCallback(NULL, 0);
            }
            else if(m_uiCallbackType = DeleteCallbackType)
            {
                SetDeleteCallback(NULL, 0);
            }
            return false;
        }
    }
    if(m_fBlendAmount > 1.0)
    {
        m_fBlendAmount = 1.0;
        if(m_fBlendDelta > 0.0)
        {
            m_fBlendDelta = 0.0;
        }
    }
    return true;

}
Ejemplo n.º 2
0
/*********************************************************************\
	Function name    : TreeView::CreateTreeView
	Description      : Creates a tree view window and attaches it to the parent window
	Created at       : 26.09.01, @ 11:02:27
	Created by       : Thomas Kunert
	Modified by      :
\*********************************************************************/
Bool TreeView::CreateTreeView(Int32 lTreeID, GeDialog* pParent, Int32 lElementType,
		DeleteTreeViewItemCallback pDeleteCallbackFunc, Int32 lTreeViewFlags,
		Int32 lFlags)
{
	m_pParent = pParent;

	SetDeleteCallback(pDeleteCallbackFunc);

	BaseContainer treedata;
	treedata.SetBool(TREEVIEW_CTRL_DRAG, true);
	treedata.SetBool(TREEVIEW_NO_MULTISELECT, true);
	treedata.SetBool(TREEVIEW_CURSORKEYS, true);
	treedata.SetBool(TREEVIEW_ALTERNATE_BG, true);
	treedata.SetBool(TREEVIEW_FIXED_LAYOUT, true);
	//treedata.SetBool(TREEVIEW_HAS_HEADER, true);
	//treedata.SetBool(TREEVIEW_BORDER, true);
	pParent->AddCustomGui(lTreeID, CUSTOMGUI_TREEVIEW, String(), BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, treedata);

	m_pTree = (TreeViewCustomGui*)pParent->FindCustomGui(lTreeID, CUSTOMGUI_TREEVIEW);
	if (!m_pTree) return false;

	BaseContainer layout;
	layout.SetInt32('icon', LV_USER);
	layout.SetInt32('tree', LV_TREE);
	m_pTree->SetLayout(2,layout);

	m_pTree->SetRoot(&m_RootItem, &functable, this);

	m_lTreeID = lTreeID;
	m_lElementType = lElementType;
	m_lFlags = lTreeViewFlags;

	return true;
}