| 1210 | } |
| 1211 | |
| 1212 | void CRMenu::toggleSubmenuValue() |
| 1213 | { |
| 1214 | if ( !isSubmenu() || _propName.empty() || _props.isNull() ) |
| 1215 | return; |
| 1216 | lString16 value = getProps()->getStringDef( |
| 1217 | UnicodeToUtf8(getPropName()).c_str(), ""); |
| 1218 | for ( int i=0; i<_items.length(); i++ ) { |
| 1219 | if ( !_items[i]->getPropValue().empty() && |
| 1220 | value==(_items[i]->getPropValue()) ) { |
| 1221 | int n = (i + 1) % _items.length(); |
| 1222 | getProps()->setString(UnicodeToUtf8(getPropName()).c_str(), _items[n]->getPropValue() ); |
| 1223 | //return _items[i]->getLabel(); |
| 1224 | return; |
| 1225 | } |
| 1226 | } |
| 1227 | } |
| 1228 | |
| 1229 | #if 0 |
| 1230 | static void DrawArrow( LVDrawBuf & buf, int x, int y, int dx, int dy, lvColor cl, int direction ) |
no test coverage detected