From: <bal...@us...> - 2003-11-09 21:46:15
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/Core In directory sc8-pr-cvs1:/tmp/cvs-serv3387/gemrb/plugins/Core Modified Files: ScrollBar.cpp ScrollBar.h Log Message: Added Feature: ScrollBar now sets a Variable to the actual Position Value Index: ScrollBar.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ScrollBar.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ScrollBar.cpp 6 Nov 2003 17:26:39 -0000 1.10 --- ScrollBar.cpp 9 Nov 2003 21:46:12 -0000 1.11 *************** *** 11,14 **** --- 11,15 ---- State = 0; ta = NULL; + Variable[0] = 0; } *************** *** 72,75 **** --- 73,81 ---- if(Pos > 0) Pos--; + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } if(ta) { TextArea * t = (TextArea*)ta; *************** *** 89,92 **** --- 95,103 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } return; } *************** *** 104,107 **** --- 115,123 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } return; } *************** *** 112,115 **** --- 128,136 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } return; } *************** *** 126,129 **** --- 147,155 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } } /** Mouse Button Up */ *************** *** 152,155 **** --- 178,186 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } return; } *************** *** 160,163 **** --- 191,199 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } return; } *************** *** 175,178 **** --- 211,219 ---- t->SetRow(Pos); } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); + } } } *************** *** 195,198 **** --- 236,244 ---- TextArea * t = (TextArea*)ta; t->SetRow(Pos); + } + if(Variable[0] != 0) { + char tmp[10]; + sprintf(tmp, "%d", Pos); + core->GetDictionary()->SetAt(Variable, tmp); } Changed = true; Index: ScrollBar.h =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/Core/ScrollBar.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ScrollBar.h 31 Oct 2003 11:35:44 -0000 1.5 --- ScrollBar.h 9 Nov 2003 21:46:12 -0000 1.6 *************** *** 52,55 **** --- 52,57 ---- /** TextArea Associated Control */ Control * ta; + /** Associated Variable */ + char Variable[33]; public: // Public Events /** Mouse Button Down */ |