Removed unnecessary variable.
This commit is contained in:
parent
d687d17bfe
commit
92f18d03dc
@ -38,7 +38,6 @@ DEFINE_SCREEN_SINGLETON( OnlineUserSearch );
|
|||||||
|
|
||||||
OnlineUserSearch::OnlineUserSearch() : Screen("online/user_search.stkgui")
|
OnlineUserSearch::OnlineUserSearch() : Screen("online/user_search.stkgui")
|
||||||
{
|
{
|
||||||
m_selected_index = -1;
|
|
||||||
m_search_request = NULL;
|
m_search_request = NULL;
|
||||||
m_search_string = "";
|
m_search_string = "";
|
||||||
m_last_search_string = "";
|
m_last_search_string = "";
|
||||||
@ -226,9 +225,9 @@ void OnlineUserSearch::eventCallback(GUIEngine::Widget* widget,
|
|||||||
}
|
}
|
||||||
else if (name == m_user_list_widget->m_properties[GUIEngine::PROP_ID])
|
else if (name == m_user_list_widget->m_properties[GUIEngine::PROP_ID])
|
||||||
{
|
{
|
||||||
m_selected_index = m_user_list_widget->getSelectionID();
|
int selected_index = m_user_list_widget->getSelectionID();
|
||||||
if (m_selected_index != -1)
|
if (selected_index != -1)
|
||||||
new UserInfoDialog(m_users[m_selected_index]);
|
new UserInfoDialog(m_users[selected_index]);
|
||||||
}
|
}
|
||||||
else if (name == m_search_button_widget->m_properties[GUIEngine::PROP_ID])
|
else if (name == m_search_button_widget->m_properties[GUIEngine::PROP_ID])
|
||||||
{
|
{
|
||||||
|
@ -48,9 +48,6 @@ private:
|
|||||||
/** Pointer to the result list. */
|
/** Pointer to the result list. */
|
||||||
GUIEngine::ListWidget * m_user_list_widget;
|
GUIEngine::ListWidget * m_user_list_widget;
|
||||||
|
|
||||||
/** The currently selected index, used to re-select this item after
|
|
||||||
* addons_loading is being displayed. */
|
|
||||||
int m_selected_index;
|
|
||||||
/** Seach string entered in the search widget. */
|
/** Seach string entered in the search widget. */
|
||||||
irr::core::stringw m_search_string;
|
irr::core::stringw m_search_string;
|
||||||
/** Last search string, used to avoid doing the same search again. */
|
/** Last search string, used to avoid doing the same search again. */
|
||||||
|
@ -36,9 +36,7 @@ DEFINE_SCREEN_SINGLETON( ServerSelection );
|
|||||||
|
|
||||||
ServerSelection::ServerSelection() : Screen("online/server_selection.stkgui")
|
ServerSelection::ServerSelection() : Screen("online/server_selection.stkgui")
|
||||||
{
|
{
|
||||||
m_selected_index = -1;
|
|
||||||
m_refresh_request = NULL;
|
m_refresh_request = NULL;
|
||||||
|
|
||||||
} // ServerSelection
|
} // ServerSelection
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@ -159,9 +157,9 @@ void ServerSelection::eventCallback( GUIEngine::Widget* widget,
|
|||||||
|
|
||||||
else if (name == m_server_list_widget->m_properties[GUIEngine::PROP_ID])
|
else if (name == m_server_list_widget->m_properties[GUIEngine::PROP_ID])
|
||||||
{
|
{
|
||||||
m_selected_index = m_server_list_widget->getSelectionID();
|
int selected_index = m_server_list_widget->getSelectionID();
|
||||||
uint32_t server_id = ServersManager::get()->getServerBySort(m_selected_index)->getServerId();
|
uint32_t server_id = ServersManager::get()->getServerBySort(selected_index)->getServerId();
|
||||||
uint32_t host_id = ServersManager::get()->getServerBySort(m_selected_index)->getHostId();
|
uint32_t host_id = ServersManager::get()->getServerBySort(selected_index)->getHostId();
|
||||||
new ServerInfoDialog(server_id, host_id);
|
new ServerInfoDialog(server_id, host_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,11 +43,6 @@ private:
|
|||||||
GUIEngine::LabelWidget * m_update_status;
|
GUIEngine::LabelWidget * m_update_status;
|
||||||
GUIEngine::ListWidget * m_server_list_widget;
|
GUIEngine::ListWidget * m_server_list_widget;
|
||||||
|
|
||||||
|
|
||||||
/** The currently selected index, used to re-select this item after
|
|
||||||
* addons_loading is being displayed. */
|
|
||||||
int m_selected_index;
|
|
||||||
|
|
||||||
/** \brief To check (and set) if sort order is descending **/
|
/** \brief To check (and set) if sort order is descending **/
|
||||||
bool m_sort_desc;
|
bool m_sort_desc;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user