From: Laszlo T. <ave...@us...> - 2004-12-05 12:28:00
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30776/plugins/GUIScript Modified Files: GUIScript.cpp Log Message: added GetCycleSize to BAMImp (AnimationMgr), it will return the frame count of a cycle Modified GUIScript to use SetButtonPicture instead of SetButtonBAM in case of single frame bams (non-pst) Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.253 retrieving revision 1.254 diff -C2 -d -r1.253 -r1.254 *** GUIScript.cpp 5 Dec 2004 11:11:51 -0000 1.253 --- GUIScript.cpp 5 Dec 2004 12:27:49 -0000 1.254 *************** *** 3338,3349 **** AnimationMgr *bam = spell->SpellIconBAM; - btn->SetImage( IE_GUI_BUTTON_UNPRESSED, bam->GetFrameFromCycle(0, 0)); //small difference between pst and others ! if (bam->GetCycleCount()==2) { ! btn->SetImage( IE_GUI_BUTTON_PRESSED, bam->GetFrameFromCycle(1, 0)); } ! else { btn->SetImage( IE_GUI_BUTTON_PRESSED, bam->GetFrameFromCycle(0, 1)); ! } delete spell; --- 3338,3350 ---- AnimationMgr *bam = spell->SpellIconBAM; //small difference between pst and others ! if (bam->GetCycleSize(0)!=4) { //non-pst ! btn->SetPicture( bam->GetFrameFromCycle(0, 0)); } ! else { //pst ! btn->SetImage( IE_GUI_BUTTON_UNPRESSED, bam->GetFrameFromCycle(0, 0)); btn->SetImage( IE_GUI_BUTTON_PRESSED, bam->GetFrameFromCycle(0, 1)); ! btn->SetImage( IE_GUI_BUTTON_SELECTED, bam->GetFrameFromCycle(0, 2)); ! btn->SetImage( IE_GUI_BUTTON_DISABLED, bam->GetFrameFromCycle(0, 3)); } delete spell; |