parent
514d0c4dfe
commit
3fe2870c39
@ -757,9 +757,9 @@ void DynamicRibbonWidget::onRibbonWidgetFocus(RibbonWidget* emitter, const int p
|
||||
#pragma mark Setters / Actions
|
||||
#endif
|
||||
|
||||
void DynamicRibbonWidget::scroll(const int x_delta)
|
||||
void DynamicRibbonWidget::scroll(int x_delta, bool evenIfDeactivated)
|
||||
{
|
||||
if (m_deactivated) return;
|
||||
if (m_deactivated && !evenIfDeactivated) return;
|
||||
|
||||
// Refuse to scroll when everything is visible
|
||||
if ((int)m_items.size() <= m_row_amount*m_col_amount) return;
|
||||
@ -1081,7 +1081,7 @@ bool DynamicRibbonWidget::setSelection(int item_id, const int playerID,
|
||||
while (!findItemInRows(name.c_str(), &row, &id))
|
||||
{
|
||||
// if we get here it means the item is scrolled out. Try to find it.
|
||||
scroll(1);
|
||||
scroll(1, evenIfDeactivated);
|
||||
|
||||
if (iterations > 50)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ namespace GUIEngine
|
||||
void buildInternalStructure();
|
||||
|
||||
/** Call this to scroll within a scrollable ribbon */
|
||||
void scroll(const int x_delta);
|
||||
void scroll(int x_delta, bool evenIfDeactivated = false);
|
||||
|
||||
/** Used for combo ribbons, to contain the ID of the currently selected item for each player */
|
||||
int m_selected_item[MAX_PLAYER_COUNT];
|
||||
|
@ -310,7 +310,6 @@ void OptionsScreenVideo::init()
|
||||
|
||||
} // end if not inited
|
||||
|
||||
res->setActivated();
|
||||
res->updateItemDisplay();
|
||||
|
||||
// ---- select current resolution every time
|
||||
|
Loading…
Reference in New Issue
Block a user