Exemplo n.º 1
0
bool pawsPetStatWindow::OnButtonPressed( int mouseButton, int keyModifier, pawsWidget* widget )
{
    switch ( widget->GetID() )
    {
    case BTN_FILTER:
    {
        filter = !filter;
        if (!skillString.IsEmpty()) HandleSkillList( skillString );
        return true;
    }

    case BTN_BUY:
    {
        BuySkill();
        return true;
    }

        //case BTN_EDIT:
        //{
        //    pawsCharDescription* descWnd = (pawsCharDescription*)PawsManager::GetSingleton().FindWidget("DescriptionEdit");
        //    descWnd->PostSetup();
        //    descWnd->Show();
        //    return true;
        //}

    }
    return false;
}
Exemplo n.º 2
0
bool pawsSkillWindow::OnButtonPressed(int /*mouseButton*/, int /*keyModifier*/, pawsWidget* widget)
{
    switch ( widget->GetID() )
    {
        case BTN_FILTER:
        {
            filter = !filter;
            HandleSkillList(-1, true);
            return true;
        }

        case BTN_BUY:
        {
            BuySkill();
            return true;
        }

        case BTN_BUYLVL:
        {
            BuyMaxSkill();
            return true;
        }

        case BTN_STATS:
        case BTN_FACTION:
        case BTN_COMBAT:
        case BTN_MAGIC:
        case BTN_JOBS:
        case BTN_VARIOUS:
        {
            previousTab = currentTab; //Keep the selection if we are hitting the same tab where we are.
            currentTab = widget->GetID() - 1000;
            if (previousTab != currentTab)
            {
                selectedSkill.Clear();
            }
            break;
        }

    }
    return false;
}