File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -18,29 +18,35 @@ void CGUITabList::SelectNext ( CGUITabListItem* pBase )
1818 bool bFound = false ;
1919 for ( CGUITabIterator iter = m_Items.begin (); iter != m_Items.end () ; ++ iter )
2020 {
21- if ( (*iter) == pBase )
21+ CGUITabListItem* pItem = *iter;
22+
23+ if ( pItem == pBase )
2224 {
2325 bFound = true ;
2426 }
25- else if ( bFound && (*iter)-> ActivateOnTab () )
27+ else if ( bFound && pItem-> IsEnabled () )
2628 {
2729 // we found an element that wants to get selected
30+ pItem->ActivateOnTab ();
2831 return ;
2932 }
3033 }
3134
3235 // Contine to search an element from the beginning
3336 for ( CGUITabIterator iter = m_Items.begin (); iter != m_Items.end (); ++ iter )
3437 {
35- if ( (*iter) == pBase )
38+ CGUITabListItem* pItem = *iter;
39+
40+ if ( pItem == pBase )
3641 {
3742 // just where we started, so we don't have to do anything
3843 return ;
3944 }
40- else if ( (*iter)-> ActivateOnTab () )
45+ else if ( pItem-> IsEnabled () )
4146 {
42- // finally found something different than the current element
43- return ;
47+ // finally found something different than the current element
48+ pItem->ActivateOnTab ();
49+ return ;
4450 }
4551 }
4652}
Original file line number Diff line number Diff line change 99* Multi Theft Auto is available from http://www.multitheftauto.com/
1010*
1111*****************************************************************************/
12-
1312#ifndef __CGUITABLISTITEM_H
1413#define __CGUITABLISTITEM_H
1514
16- class CGUITabListItem
15+ #include < gui/CGUI.h>
16+
17+ class CGUITabListItem : public CGUIElement
1718{
1819public:
1920 virtual bool ActivateOnTab ( void ) = 0;
Original file line number Diff line number Diff line change @@ -308,6 +308,7 @@ void CLuaMain::AddVehicleClass ( lua_State* luaVM )
308308 lua_classfunction ( luaVM, " getUpgrades" , " getVehicleUpgrades" );
309309 lua_classfunction ( luaVM, " getUpgradeSlotName" , " getVehicleUpgradeSlotName" );
310310 lua_classfunction ( luaVM, " getCompatibleUpgrades" , " getVehicleCompatibleUpgrades" );
311+ lua_classfunction ( luaVM, " getUpgradeOnSlot" , " getVehicleUpgradeOnSlot" );
311312
312313 lua_classfunction ( luaVM, " setComponentVisible" , " setVehicleComponentVisible" );
313314 lua_classfunction ( luaVM, " setSirensOn" , " setVehicleSirensOn" );
You can’t perform that action at this time.
0 commit comments