Small bugfixes in the CGUIListBox
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13214 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b44f547057
commit
2d0d407d7f
@ -2,7 +2,7 @@
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "CGUIListBox.h"
|
||||
#include "guiengine/widgets/CGUIListBox.h"
|
||||
|
||||
#include "IGUISkin.h"
|
||||
#include "IGUIEnvironment.h"
|
||||
@ -390,7 +390,9 @@ bool CGUIListBox::OnEvent(const SEvent& event)
|
||||
{
|
||||
if (event.GUIEvent.Caller == this)
|
||||
Selecting = false;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -2,8 +2,8 @@
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __C_GUI_LIST_BOX_H_INCLUDED__
|
||||
#define __C_GUI_LIST_BOX_H_INCLUDED__
|
||||
#ifndef HEADER_CGUILISTBOX_HPP
|
||||
#define HEADER_CGUILISTBOX_HPP
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
@ -22,7 +22,7 @@ namespace gui
|
||||
{
|
||||
public:
|
||||
//! constructor
|
||||
CGUIListBox(IGUIEnvironment* environment, IGUIElement* parent,
|
||||
CGUIListBox(IGUIEnvironment* environment, IGUIElement* parent,
|
||||
s32 id, core::rect<s32> rectangle, bool clip=true,
|
||||
bool drawBack=false, bool moveOverSelect=false);
|
||||
|
||||
|
@ -17,15 +17,14 @@
|
||||
|
||||
#include "guiengine/widgets/list_widget.hpp"
|
||||
|
||||
#include "guiengine/widgets/CGUIListBox.h"
|
||||
#include "guiengine/CGUISpriteBank.h"
|
||||
#include "guiengine/engine.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
|
||||
|
||||
|
||||
#include <IGUIElement.h>
|
||||
#include <IGUISkin.h>
|
||||
#include <CGUIEnvironment.h>
|
||||
#include <IGUIEnvironment.h>
|
||||
#include "IGUIFontBitmap.h"
|
||||
|
||||
#include <sstream>
|
||||
@ -95,9 +94,9 @@ void ListWidget::add()
|
||||
|
||||
IGUISkin * current_skin = GUIEngine::getGUIEnv()->getSkin();
|
||||
IGUIFont * current_font = GUIEngine::getGUIEnv()->getBuiltInFont();
|
||||
IGUIListBox* m_list_box = new CGUIListBox(
|
||||
IGUIListBox * list_box = new CGUIListBox(
|
||||
GUIEngine::getGUIEnv(),
|
||||
m_parent ? m_parent : (CGUIEnvironment *)GUIEngine::getGUIEnv(),
|
||||
m_parent ? m_parent : GUIEngine::getGUIEnv()->getRootGUIElement(),
|
||||
getNewID(),
|
||||
widget_size,
|
||||
true,
|
||||
@ -106,19 +105,19 @@ void ListWidget::add()
|
||||
|
||||
if (current_skin && current_skin->getSpriteBank())
|
||||
{
|
||||
m_list_box->setSpriteBank(current_skin->getSpriteBank());
|
||||
list_box->setSpriteBank(current_skin->getSpriteBank());
|
||||
}
|
||||
else if (current_font && current_font->getType() == EGFT_BITMAP)
|
||||
{
|
||||
m_list_box->setSpriteBank( ((IGUIFontBitmap*)current_font)->getSpriteBank());
|
||||
list_box->setSpriteBank( ((IGUIFontBitmap*)current_font)->getSpriteBank());
|
||||
}
|
||||
|
||||
m_list_box->drop();
|
||||
list_box->drop();
|
||||
|
||||
m_list_box->setAutoScrollEnabled(false);
|
||||
list_box->setAutoScrollEnabled(false);
|
||||
|
||||
m_element = m_list_box;
|
||||
m_element->setTabOrder( m_list_box->getID() );
|
||||
m_element = list_box;
|
||||
m_element->setTabOrder( list_box->getID() );
|
||||
|
||||
if (m_header.size() > 0)
|
||||
{
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "utils/leak_check.hpp"
|
||||
#include "utils/ptr_vector.hpp"
|
||||
#include "IGUIElement.h"
|
||||
#include "guiengine/widgets/CGUIListBox.h"
|
||||
|
||||
namespace irr { namespace gui { class STKModifiedSpriteBank; } }
|
||||
|
||||
@ -88,8 +87,6 @@ namespace GUIEngine
|
||||
std::vector< Column > m_header;
|
||||
|
||||
IListWidgetHeaderListener* m_listener;
|
||||
|
||||
irr::gui::IGUIListBox * m_list_box;
|
||||
|
||||
public:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user