mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-28 06:20:21 +02:00
Remove more dead code (#108)
This commit is contained in:
@ -1,36 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __E_MESSAGE_BOX_FLAGS_H_INCLUDED__
|
||||
#define __E_MESSAGE_BOX_FLAGS_H_INCLUDED__
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
|
||||
//! enumeration for message box layout flags
|
||||
enum EMESSAGE_BOX_FLAG
|
||||
{
|
||||
//! Flag for the OK button
|
||||
EMBF_OK = 0x1,
|
||||
|
||||
//! Flag for the cancel button
|
||||
EMBF_CANCEL = 0x2,
|
||||
|
||||
//! Flag for the yes button
|
||||
EMBF_YES = 0x4,
|
||||
|
||||
//! Flag for the no button
|
||||
EMBF_NO = 0x8,
|
||||
|
||||
//! This value is not used. It only forces this enumeration to compile in 32 bit.
|
||||
EMBF_FORCE_32BIT = 0x7fffffff
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
} // namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -280,18 +280,6 @@ namespace irr
|
||||
//! A file open dialog has been closed without choosing a file
|
||||
EGET_FILE_CHOOSE_DIALOG_CANCELLED,
|
||||
|
||||
//! 'Yes' was clicked on a messagebox
|
||||
EGET_MESSAGEBOX_YES,
|
||||
|
||||
//! 'No' was clicked on a messagebox
|
||||
EGET_MESSAGEBOX_NO,
|
||||
|
||||
//! 'OK' was clicked on a messagebox
|
||||
EGET_MESSAGEBOX_OK,
|
||||
|
||||
//! 'Cancel' was clicked on a messagebox
|
||||
EGET_MESSAGEBOX_CANCEL,
|
||||
|
||||
//! In an editbox 'ENTER' was pressed
|
||||
EGET_EDITBOX_ENTER,
|
||||
|
||||
@ -304,36 +292,14 @@ namespace irr
|
||||
//! The tab was changed in an tab control
|
||||
EGET_TAB_CHANGED,
|
||||
|
||||
//! A menu item was selected in a (context) menu
|
||||
EGET_MENU_ITEM_SELECTED,
|
||||
|
||||
//! The selection in a combo box has been changed
|
||||
EGET_COMBO_BOX_CHANGED,
|
||||
|
||||
//! The value of a spin box has changed
|
||||
EGET_SPINBOX_CHANGED,
|
||||
|
||||
//! A table has changed
|
||||
EGET_TABLE_CHANGED,
|
||||
EGET_TABLE_HEADER_CHANGED,
|
||||
EGET_TABLE_SELECTED_AGAIN,
|
||||
|
||||
//! A tree view node lost selection. See IGUITreeView::getLastEventNode().
|
||||
EGET_TREEVIEW_NODE_DESELECT,
|
||||
|
||||
//! A tree view node was selected. See IGUITreeView::getLastEventNode().
|
||||
EGET_TREEVIEW_NODE_SELECT,
|
||||
|
||||
//! A tree view node was expanded. See IGUITreeView::getLastEventNode().
|
||||
EGET_TREEVIEW_NODE_EXPAND,
|
||||
|
||||
//! A tree view node was collapsed. See IGUITreeView::getLastEventNode().
|
||||
EGET_TREEVIEW_NODE_COLLAPSE,
|
||||
|
||||
//! deprecated - use EGET_TREEVIEW_NODE_COLLAPSE instead. This
|
||||
//! may be removed by Irrlicht 1.9
|
||||
EGET_TREEVIEW_NODE_COLLAPS = EGET_TREEVIEW_NODE_COLLAPSE,
|
||||
|
||||
//! No real event. Just for convenience to get number of events
|
||||
EGET_COUNT
|
||||
};
|
||||
|
@ -1,37 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__
|
||||
#define __I_GUI_COLOR_SELECT_DIALOG_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
|
||||
//! Standard color chooser dialog.
|
||||
class IGUIColorSelectDialog : public IGUIElement
|
||||
{
|
||||
public:
|
||||
|
||||
//! constructor
|
||||
IGUIColorSelectDialog(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_COLOR_SELECT_DIALOG, environment, parent, id, rectangle) {}
|
||||
|
||||
//! get chosen color as usual SColor struct
|
||||
virtual video::SColor getColor() =0;
|
||||
|
||||
//! get chosen color as HSL values
|
||||
virtual video::SColorHSL getColorHSL() =0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -1,162 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_CONTEXT_MENU_H_INCLUDED__
|
||||
#define __I_GUI_CONTEXT_MENU_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
//! Close behavior.
|
||||
//! Default is ECMC_REMOVE
|
||||
enum ECONTEXT_MENU_CLOSE
|
||||
{
|
||||
//! do nothing - menu stays open
|
||||
ECMC_IGNORE = 0,
|
||||
|
||||
//! remove the gui element
|
||||
ECMC_REMOVE = 1,
|
||||
|
||||
//! call setVisible(false)
|
||||
ECMC_HIDE = 2
|
||||
|
||||
// note to implementers - this is planned as bitset, so continue with 4 if you need to add further flags.
|
||||
};
|
||||
|
||||
//! GUI Context menu interface.
|
||||
/** \par This element can create the following events of type EGUI_EVENT_TYPE:
|
||||
\li EGET_ELEMENT_CLOSED
|
||||
\li EGET_MENU_ITEM_SELECTED
|
||||
*/
|
||||
class IGUIContextMenu : public IGUIElement
|
||||
{
|
||||
public:
|
||||
|
||||
//! constructor
|
||||
IGUIContextMenu(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_CONTEXT_MENU, environment, parent, id, rectangle) {}
|
||||
|
||||
//! set behavior when menus are closed
|
||||
virtual void setCloseHandling(ECONTEXT_MENU_CLOSE onClose) = 0;
|
||||
|
||||
//! get current behavior when the menu will be closed
|
||||
virtual ECONTEXT_MENU_CLOSE getCloseHandling() const = 0;
|
||||
|
||||
//! Get amount of menu items
|
||||
virtual u32 getItemCount() const = 0;
|
||||
|
||||
//! Adds a menu item.
|
||||
/** \param text: Text of menu item. Set this to 0 to create
|
||||
an separator instead of a real item, which is the same like
|
||||
calling addSeparator();
|
||||
\param commandId: Command id of menu item, a simple id you may
|
||||
set to whatever you want.
|
||||
\param enabled: Specifies if the menu item should be enabled.
|
||||
\param hasSubMenu: Set this to true if there should be a submenu
|
||||
at this item. You can access this submenu via getSubMenu().
|
||||
\param checked: Specifies if the menu item should be initially checked.
|
||||
\param autoChecking: Specifies if the item should be checked by clicking
|
||||
\return Returns the index of the new item */
|
||||
virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
|
||||
bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
|
||||
|
||||
//! Insert a menu item at specified position.
|
||||
/** \param idx: Position to insert the new element,
|
||||
should be smaller than itemcount otherwise the item is added to the end.
|
||||
\param text: Text of menu item. Set this to 0 to create
|
||||
an separator instead of a real item, which is the same like
|
||||
calling addSeparator();
|
||||
\param commandId: Command id of menu item, a simple id you may
|
||||
set to whatever you want.
|
||||
\param enabled: Specifies if the menu item should be enabled.
|
||||
\param hasSubMenu: Set this to true if there should be a submenu
|
||||
at this item. You can access this submenu via getSubMenu().
|
||||
\param checked: Specifies if the menu item should be initially checked.
|
||||
\param autoChecking: Specifies if the item should be checked by clicking
|
||||
\return Returns the index of the new item */
|
||||
virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true,
|
||||
bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
|
||||
|
||||
//! Find an item by its CommandID
|
||||
/**
|
||||
\param commandId: We are looking for the first item which has this commandID
|
||||
\param idxStartSearch: Start searching from this index.
|
||||
\return Returns the index of the item when found or otherwise -1. */
|
||||
virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0;
|
||||
|
||||
//! Adds a separator item to the menu
|
||||
virtual void addSeparator() = 0;
|
||||
|
||||
//! Get text of the menu item.
|
||||
/** \param idx: Zero based index of the menu item */
|
||||
virtual const wchar_t* getItemText(u32 idx) const = 0;
|
||||
|
||||
//! Sets text of the menu item.
|
||||
/** \param idx: Zero based index of the menu item
|
||||
\param text: New text of the item. */
|
||||
virtual void setItemText(u32 idx, const wchar_t* text) = 0;
|
||||
|
||||
//! Check if a menu item is enabled
|
||||
/** \param idx: Zero based index of the menu item */
|
||||
virtual bool isItemEnabled(u32 idx) const = 0;
|
||||
|
||||
//! Sets if the menu item should be enabled.
|
||||
/** \param idx: Zero based index of the menu item
|
||||
\param enabled: True if it is enabled, otherwise false. */
|
||||
virtual void setItemEnabled(u32 idx, bool enabled) = 0;
|
||||
|
||||
//! Sets if the menu item should be checked.
|
||||
/** \param idx: Zero based index of the menu item
|
||||
\param enabled: True if it is enabled, otherwise false. */
|
||||
virtual void setItemChecked(u32 idx, bool enabled) = 0;
|
||||
|
||||
//! Check if a menu item is checked
|
||||
/** \param idx: Zero based index of the menu item */
|
||||
virtual bool isItemChecked(u32 idx) const = 0;
|
||||
|
||||
//! Removes a menu item
|
||||
/** \param idx: Zero based index of the menu item */
|
||||
virtual void removeItem(u32 idx) = 0;
|
||||
|
||||
//! Removes all menu items
|
||||
virtual void removeAllItems() = 0;
|
||||
|
||||
//! Get the selected item in the menu
|
||||
/** \return Index of the selected item, -1 if none selected. */
|
||||
virtual s32 getSelectedItem() const = 0;
|
||||
|
||||
//! Get the command id of a menu item
|
||||
/** \param idx: Zero based index of the menu item */
|
||||
virtual s32 getItemCommandId(u32 idx) const = 0;
|
||||
|
||||
//! Sets the command id of a menu item
|
||||
/** \param idx: Zero based index of the menu item
|
||||
\param id: Command id of menu item, a simple id you may
|
||||
set to whatever you want. */
|
||||
virtual void setItemCommandId(u32 idx, s32 id) = 0;
|
||||
|
||||
//! Get a pointer to the submenu of an item.
|
||||
/** 0 is returned if there is no submenu
|
||||
\param idx: Zero based index of the menu item
|
||||
\return Returns a pointer to the submenu of an item. */
|
||||
virtual IGUIContextMenu* getSubMenu(u32 idx) const = 0;
|
||||
|
||||
//! should the element change the checked status on clicking
|
||||
virtual void setItemAutoChecking(u32 idx, bool autoChecking) = 0;
|
||||
|
||||
//! does the element change the checked status on clicking
|
||||
virtual bool getItemAutoChecking(u32 idx) const = 0;
|
||||
|
||||
//! When an eventparent is set it receives events instead of the usual parent element
|
||||
virtual void setEventParent(IGUIElement *parent) = 0;
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -743,8 +743,7 @@ public:
|
||||
|
||||
|
||||
//! Returns the type name of the gui element.
|
||||
/** This is needed serializing elements. For serializing your own elements, override this function
|
||||
and return your own type name which is created by your IGUIElementFactory */
|
||||
/** This is needed serializing elements. */
|
||||
virtual const c8* getTypeName() const
|
||||
{
|
||||
return GUIElementTypeNames[Type];
|
||||
|
@ -1,66 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_ELEMENT_FACTORY_H_INCLUDED__
|
||||
#define __I_GUI_ELEMENT_FACTORY_H_INCLUDED__
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "EGUIElementTypes.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class IGUIElement;
|
||||
|
||||
//! Interface making it possible to dynamically create GUI elements
|
||||
/** To be able to add custom elements to Irrlicht and to make it possible for the
|
||||
scene manager to save and load them, simply implement this interface and register it
|
||||
in your gui environment via IGUIEnvironment::registerGUIElementFactory.
|
||||
Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to
|
||||
increase the reference counter of the environment. This is not necessary because the
|
||||
it will grab() the factory anyway, and otherwise cyclic references will be created.
|
||||
*/
|
||||
class IGUIElementFactory : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
|
||||
//! adds an element to the gui environment based on its type id
|
||||
/** \param type: Type of the element to add.
|
||||
\param parent: Parent scene node of the new element, can be null to add to the root.
|
||||
\return Pointer to the new element or null if not successful. */
|
||||
virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! adds a GUI element to the GUI Environment based on its type name
|
||||
/** \param typeName: Type name of the element to add.
|
||||
\param parent: Parent scene node of the new element, can be null to add it to the root.
|
||||
\return Pointer to the new element or null if not successful. */
|
||||
virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Get amount of GUI element types this factory is able to create
|
||||
virtual s32 getCreatableGUIElementTypeCount() const = 0;
|
||||
|
||||
//! Get type of a creatable element type
|
||||
/** \param idx: Index of the element type in this factory. Must be a value between 0 and
|
||||
getCreatableGUIElementTypeCount() */
|
||||
virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const = 0;
|
||||
|
||||
//! Get type name of a creatable GUI element type by index
|
||||
/** \param idx: Index of the type in this factory. Must be a value between 0 and
|
||||
getCreatableGUIElementTypeCount() */
|
||||
virtual const c8* getCreateableGUIElementTypeName(s32 idx) const = 0;
|
||||
|
||||
//! returns type name of a creatable GUI element
|
||||
/** \param type: Type of GUI element.
|
||||
\return Name of the type if this factory can create the type, otherwise 0. */
|
||||
virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif // __I_GUI_ELEMENT_FACTORY_H_INCLUDED__
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include "IReferenceCounted.h"
|
||||
#include "IGUISkin.h"
|
||||
#include "rect.h"
|
||||
#include "EMessageBoxFlags.h"
|
||||
#include "EFocusFlags.h"
|
||||
#include "IEventReceiver.h"
|
||||
#include "path.h"
|
||||
@ -38,27 +37,17 @@ class IGUIFont;
|
||||
class IGUISpriteBank;
|
||||
class IGUIScrollBar;
|
||||
class IGUIImage;
|
||||
class IGUIMeshViewer;
|
||||
class IGUICheckBox;
|
||||
class IGUIListBox;
|
||||
class IGUITreeView;
|
||||
class IGUIImageList;
|
||||
class IGUIFileOpenDialog;
|
||||
class IGUIColorSelectDialog;
|
||||
class IGUIInOutFader;
|
||||
class IGUIStaticText;
|
||||
class IGUIEditBox;
|
||||
class IGUISpinBox;
|
||||
class IGUITabControl;
|
||||
class IGUITab;
|
||||
class IGUITable;
|
||||
class IGUIContextMenu;
|
||||
class IGUIComboBox;
|
||||
class IGUIToolBar;
|
||||
class IGUIButton;
|
||||
class IGUIWindow;
|
||||
class IGUIProfiler;
|
||||
class IGUIElementFactory;
|
||||
|
||||
//! GUI Environment. Used as factory and manager of all other GUI elements.
|
||||
/** \par This element can create the following events of type EGUI_EVENT_TYPE (which are passed on to focused sub-elements):
|
||||
@ -235,55 +224,6 @@ public:
|
||||
virtual IGUIButton* addButton(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0, const wchar_t* tooltiptext = 0) = 0;
|
||||
|
||||
//! Adds an empty window element.
|
||||
/** \param rectangle Rectangle specifying the borders of the window.
|
||||
\param modal Defines if the dialog is modal. This means, that all other
|
||||
gui elements which were created before the window cannot be used until
|
||||
it is removed.
|
||||
\param text Text displayed as the window title.
|
||||
\param parent Parent gui element of the window.
|
||||
\param id Id with which the gui element can be identified.
|
||||
\return Pointer to the created window. Returns 0 if an error occurred.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUIWindow* addWindow(const core::rect<s32>& rectangle, bool modal = false,
|
||||
const wchar_t* text=0, IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a modal screen.
|
||||
/** Input focus stays with children of the modal screen.
|
||||
If you have some window x which should keep the input focus you
|
||||
do something like: addModalScreen()->addChild(x). And x will then get the focus
|
||||
and not lose it anymore.
|
||||
The modal screen removes itself when it no longer has any children.
|
||||
Note that it usually works badly to pass the modal screen already as parent when creating
|
||||
a new element. It's better to add that new element later to the modal screen with addChild.
|
||||
\param parent Parent gui element of the modal.
|
||||
\param blinkMode Bitset of when to blink (can be combined)
|
||||
0 = never
|
||||
1 = focus changes
|
||||
2 = Left mouse button pressed down
|
||||
\return Pointer to the created modal. Returns 0 if an error occurred.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUIElement* addModalScreen(IGUIElement* parent, int blinkMode = 3) = 0;
|
||||
|
||||
//! Adds a message box.
|
||||
/** \param caption Text to be displayed the title of the message box.
|
||||
\param text Text to be displayed in the body of the message box.
|
||||
\param modal Defines if the dialog is modal. This means, that all other
|
||||
gui elements which were created before the message box cannot be used
|
||||
until this messagebox is removed.
|
||||
\param flags Flags specifying the layout of the message box using ::EMESSAGE_BOX_FLAG.
|
||||
Create a message box with an OK and CANCEL button for example with (EMBF_OK | EMBF_CANCEL).
|
||||
\param parent Parent gui element of the message box.
|
||||
\param id Id with which the gui element can be identified.
|
||||
\param image Optional texture which will be displayed beside the text as an image
|
||||
\return Pointer to the created message box. Returns 0 if an error
|
||||
occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIWindow* addMessageBox(const wchar_t* caption, const wchar_t* text=0,
|
||||
bool modal = true, s32 flags = EMBF_OK, IGUIElement* parent=0, s32 id=-1, video::ITexture* image=0) = 0;
|
||||
|
||||
//! Adds a scrollbar.
|
||||
/** \param horizontal Specifies if the scroll bar is drawn horizontal
|
||||
or vertical.
|
||||
@ -348,31 +288,6 @@ public:
|
||||
virtual IGUIListBox* addListBox(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0;
|
||||
|
||||
//! Adds a tree view element.
|
||||
/** \param rectangle Position and dimension of list box.
|
||||
\param parent Parent gui element of the list box.
|
||||
\param id Id to identify the gui element.
|
||||
\param drawBackground Flag whether the background should be drawn.
|
||||
\param scrollBarVertical Flag whether a vertical scrollbar should be used
|
||||
\param scrollBarHorizontal Flag whether a horizontal scrollbar should be used
|
||||
\return Pointer to the created list box. Returns 0 if an error occurred.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUITreeView* addTreeView(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false,
|
||||
bool scrollBarVertical = true, bool scrollBarHorizontal = false) = 0;
|
||||
|
||||
//! Adds a mesh viewer. Not 100% implemented yet.
|
||||
/** \param rectangle Rectangle specifying the borders of the mesh viewer.
|
||||
\param parent Parent gui element of the mesh viewer.
|
||||
\param id Id to identify the gui element.
|
||||
\param text Title text of the mesh viewer.
|
||||
\return Pointer to the created mesh viewer. Returns 0 if an error
|
||||
occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIMeshViewer* addMeshViewer(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0;
|
||||
|
||||
//! Adds a file open dialog.
|
||||
/** \param title Text to be displayed as the title of the dialog.
|
||||
\param modal Defines if the dialog is modal. This means, that all other
|
||||
@ -391,19 +306,6 @@ public:
|
||||
bool modal=true, IGUIElement* parent=0, s32 id=-1,
|
||||
bool restoreCWD=false, io::path::char_type* startDir=0) = 0;
|
||||
|
||||
//! Adds a color select dialog.
|
||||
/** \param title The title of the dialog.
|
||||
\param modal Defines if the dialog is modal. This means, that all other
|
||||
gui elements which were created before the dialog cannot be used
|
||||
until it is removed.
|
||||
\param parent The parent of the dialog.
|
||||
\param id The ID of the dialog.
|
||||
\return Pointer to the created file open dialog. Returns 0 if an error
|
||||
occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIColorSelectDialog* addColorSelectDialog(const wchar_t* title = 0,
|
||||
bool modal=true, IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a static text.
|
||||
/** \param text Text to be displayed. Can be altered after creation by SetText().
|
||||
\param rectangle Rectangle specifying the borders of the static text
|
||||
@ -438,30 +340,6 @@ public:
|
||||
virtual IGUIEditBox* addEditBox(const wchar_t* text, const core::rect<s32>& rectangle,
|
||||
bool border=true, IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a spin box.
|
||||
/** An edit box with up and down buttons
|
||||
\param text Text to be displayed. Can be altered after creation by setText().
|
||||
\param rectangle Rectangle specifying the borders of the spin box.
|
||||
\param border Set to true if the spin box should have a 3d border.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the spin box directly in the environment.
|
||||
\param id The ID of the element.
|
||||
\return Pointer to the created spin box. Returns 0 if an error occurred.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUISpinBox* addSpinBox(const wchar_t* text, const core::rect<s32>& rectangle,
|
||||
bool border=true,IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds an element for fading in or out.
|
||||
/** \param rectangle Rectangle specifying the borders of the fader.
|
||||
If the pointer is NULL, the whole screen is used.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
\param id An identifier for the fader.
|
||||
\return Pointer to the created in-out-fader. Returns 0 if an error
|
||||
occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIInOutFader* addInOutFader(const core::rect<s32>* rectangle=0, IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a tab control to the environment.
|
||||
/** \param rectangle Rectangle specifying the borders of the tab control.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
@ -493,40 +371,6 @@ public:
|
||||
virtual IGUITab* addTab(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a context menu to the environment.
|
||||
/** \param rectangle Rectangle specifying the borders of the menu.
|
||||
Note that the menu is resizing itself based on what items you add.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the menu directly in the environment.
|
||||
\param id An identifier for the menu.
|
||||
\return Pointer to the created context menu. Returns 0 if an
|
||||
error occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIContextMenu* addContextMenu(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a menu to the environment.
|
||||
/** This is like the menu you can find on top of most windows in modern
|
||||
graphical user interfaces.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the menu directly in the environment.
|
||||
\param id An identifier for the menu.
|
||||
\return Pointer to the created menu. Returns 0 if an
|
||||
error occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIContextMenu* addMenu(IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a toolbar to the environment.
|
||||
/** It is like a menu that is always placed on top of its parent, and
|
||||
contains buttons.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
Set it to 0 to place the tool bar directly in the environment.
|
||||
\param id An identifier for the tool bar.
|
||||
\return Pointer to the created tool bar. Returns 0 if an
|
||||
error occurred. This pointer should not be dropped. See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IGUIToolBar* addToolBar(IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a combo box to the environment.
|
||||
/** \param rectangle Rectangle specifying the borders of the combo box.
|
||||
\param parent Parent item of the element, e.g. a window.
|
||||
@ -538,86 +382,6 @@ public:
|
||||
virtual IGUIComboBox* addComboBox(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Adds a table to the environment
|
||||
/** \param rectangle Rectangle specifying the borders of the table.
|
||||
\param parent Parent item of the element, e.g. a window. Set it to 0
|
||||
to place the element directly in the environment.
|
||||
\param id An identifier for the table.
|
||||
\param drawBackground Flag whether the background should be drawn.
|
||||
\return Pointer to the created table. Returns 0 if an error occurred.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUITable* addTable(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) =0;
|
||||
|
||||
//! Adds an element to display the information from the Irrlicht profiler
|
||||
/** \param rectangle Rectangle specifying the borders of the element.
|
||||
\param parent Parent of the element. When 0 the environment itself will
|
||||
be the parent.
|
||||
\param id An identifier for the element. */
|
||||
virtual IGUIProfiler* addProfilerDisplay(const core::rect<s32>& rectangle,
|
||||
IGUIElement* parent=0, s32 id=-1) = 0;
|
||||
|
||||
//! Get the default element factory which can create all built-in elements
|
||||
/** \return Pointer to the factory.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for
|
||||
more information. */
|
||||
virtual IGUIElementFactory* getDefaultGUIElementFactory() const = 0;
|
||||
|
||||
//! Adds an element factory to the gui environment.
|
||||
/** Use this to extend the gui environment with new element types which
|
||||
it should be able to create automatically, for example when loading
|
||||
data from xml files.
|
||||
\param factoryToAdd Pointer to new factory. */
|
||||
virtual void registerGUIElementFactory(IGUIElementFactory* factoryToAdd) = 0;
|
||||
|
||||
//! Get amount of registered gui element factories.
|
||||
/** \return Amount of registered gui element factories. */
|
||||
virtual u32 getRegisteredGUIElementFactoryCount() const = 0;
|
||||
|
||||
//! Get a gui element factory by index
|
||||
/** \param index Index of the factory.
|
||||
\return Factory at given index, or 0 if no such factory exists. */
|
||||
virtual IGUIElementFactory* getGUIElementFactory(u32 index) const = 0;
|
||||
|
||||
//! Adds a GUI element by its name
|
||||
/** Each factory is checked if it can create an element of the given
|
||||
name. The first match will be created.
|
||||
\param elementName Name of the element to be created.
|
||||
\param parent Parent of the new element, if not 0.
|
||||
\return New GUI element, or 0 if no such element exists. */
|
||||
virtual IGUIElement* addGUIElement(const c8* elementName, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Saves the current gui into a file.
|
||||
/** \param filename Name of the file.
|
||||
\param start The GUIElement to start with. Root if 0.
|
||||
\return True if saving succeeded, else false. */
|
||||
virtual bool saveGUI(const io::path& filename, IGUIElement* start=0) = 0;
|
||||
|
||||
//! Saves the current gui into a file.
|
||||
/** \param file The file to write to.
|
||||
\param start The GUIElement to start with. Root if 0.
|
||||
\return True if saving succeeded, else false. */
|
||||
virtual bool saveGUI(io::IWriteFile* file, IGUIElement* start=0) = 0;
|
||||
|
||||
//! Loads the gui. Note that the current gui is not cleared before.
|
||||
/** When a parent is set the elements will be added below the parent, the parent itself does not deserialize.
|
||||
When the file contains skin-settings from the gui-environment those are always serialized into the
|
||||
guienvironment independent of the parent setting.
|
||||
\param filename Name of the file.
|
||||
\param parent Parent for the loaded GUI, root if 0.
|
||||
\return True if loading succeeded, else false. */
|
||||
virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Loads the gui. Note that the current gui is not cleared before.
|
||||
/** When a parent is set the elements will be added below the parent, the parent itself does not deserialize.
|
||||
When the file contains skin-settings from the gui-environment those are always serialized into the
|
||||
guienvironment independent of the parent setting.
|
||||
\param file The file to load from.
|
||||
\param parent Parent for the loaded GUI, root if 0.
|
||||
\return True if loading succeeded, else false. */
|
||||
virtual bool loadGUI(io::IReadFile* file, IGUIElement* parent=0) = 0;
|
||||
|
||||
//! Find the next element which would be selected when pressing the tab-key
|
||||
/** If you set the focus for the result you can manually force focus-changes like they
|
||||
would happen otherwise by the tab-keys.
|
||||
|
@ -1,67 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_IN_OUT_FADER_H_INCLUDED__
|
||||
#define __I_GUI_IN_OUT_FADER_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
#include "SColor.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
|
||||
//! Element for fading out or in
|
||||
/** Here is a small example on how the class is used. In this example we fade
|
||||
in from a total red screen in the beginning. As you can see, the fader is not
|
||||
only useful for dramatic in and out fading, but also to show that the player
|
||||
is hit in a first person shooter game for example.
|
||||
\code
|
||||
gui::IGUIInOutFader* fader = device->getGUIEnvironment()->addInOutFader();
|
||||
fader->setColor(video::SColor(0,255,0,0));
|
||||
fader->fadeIn(4000);
|
||||
\endcode
|
||||
*/
|
||||
class IGUIInOutFader : public IGUIElement
|
||||
{
|
||||
public:
|
||||
|
||||
//! constructor
|
||||
IGUIInOutFader(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_IN_OUT_FADER, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Gets the color to fade out to or to fade in from.
|
||||
virtual video::SColor getColor() const = 0;
|
||||
|
||||
//! Sets the color to fade out to or to fade in from.
|
||||
/** \param color: Color to where it is faded out od from it is faded in. */
|
||||
virtual void setColor(video::SColor color) = 0;
|
||||
virtual void setColor(video::SColor source, video::SColor dest) = 0;
|
||||
|
||||
//! Starts the fade in process.
|
||||
/** In the beginning the whole rect is drawn by the set color
|
||||
(black by default) and at the end of the overgiven time the
|
||||
color has faded out.
|
||||
\param time: Time specifying how long it should need to fade in,
|
||||
in milliseconds. */
|
||||
virtual void fadeIn(u32 time) = 0;
|
||||
|
||||
//! Starts the fade out process.
|
||||
/** In the beginning everything is visible, and at the end of
|
||||
the time only the set color (black by the fault) will be drawn.
|
||||
\param time: Time specifying how long it should need to fade out,
|
||||
in milliseconds. */
|
||||
virtual void fadeOut(u32 time) = 0;
|
||||
|
||||
//! Returns if the fade in or out process is done.
|
||||
virtual bool isReady() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -1,53 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_MESH_VIEWER_H_INCLUDED__
|
||||
#define __I_GUI_MESH_VIEWER_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
namespace video
|
||||
{
|
||||
class SMaterial;
|
||||
} // end namespace video
|
||||
|
||||
namespace scene
|
||||
{
|
||||
class IAnimatedMesh;
|
||||
} // end namespace scene
|
||||
|
||||
namespace gui
|
||||
{
|
||||
|
||||
//! 3d mesh viewing GUI element.
|
||||
class IGUIMeshViewer : public IGUIElement
|
||||
{
|
||||
public:
|
||||
|
||||
//! constructor
|
||||
IGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_MESH_VIEWER, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Sets the mesh to be shown
|
||||
virtual void setMesh(scene::IAnimatedMesh* mesh) = 0;
|
||||
|
||||
//! Gets the displayed mesh
|
||||
virtual scene::IAnimatedMesh* getMesh() const = 0;
|
||||
|
||||
//! Sets the material
|
||||
virtual void setMaterial(const video::SMaterial& material) = 0;
|
||||
|
||||
//! Gets the material
|
||||
virtual const video::SMaterial& getMaterial() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -1,82 +0,0 @@
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
// Written by Michael Zeilfelder
|
||||
|
||||
#ifndef I_GUI_PROFILER_H_INCLUDED__
|
||||
#define I_GUI_PROFILER_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
class IProfiler;
|
||||
|
||||
namespace gui
|
||||
{
|
||||
class IGUIFont;
|
||||
|
||||
//! Element to display profiler information
|
||||
class IGUIProfiler : public IGUIElement
|
||||
{
|
||||
public:
|
||||
//! constructor
|
||||
/** \param profiler You can pass a custom profiler, but typically you can pass 0 in which cases it takes the global profiler from Irrlicht */
|
||||
IGUIProfiler(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle, IProfiler* profiler = NULL)
|
||||
: IGUIElement(EGUIET_PROFILER, environment, parent, id, rectangle)
|
||||
{}
|
||||
|
||||
//! Show first page of profile data
|
||||
/** \param includeOverview When true show the group-overview page, when false show the profile data of the first group */
|
||||
virtual void firstPage(bool includeOverview=true) = 0;
|
||||
|
||||
//! Show next page of profile data
|
||||
/** \param includeOverview Include the group-overview page */
|
||||
virtual void nextPage(bool includeOverview=true) = 0;
|
||||
|
||||
//! Show previous page of profile data
|
||||
/** \param includeOverview Include the group-overview page */
|
||||
virtual void previousPage(bool includeOverview=true) = 0;
|
||||
|
||||
//! Try to show as many group-pages together as possible instead of showing at most one group per page.
|
||||
/** \param groupsTogether When true show several groups on one page, when false show max. one group per page. Default is false. */
|
||||
virtual void setShowGroupsTogether(bool groupsTogether) = 0;
|
||||
|
||||
//! Can several groups be displayed per page?
|
||||
virtual bool getShowGroupsTogether() const = 0;
|
||||
|
||||
//! Sets another skin independent font.
|
||||
/** If this is set to zero, the button uses the font of the skin.
|
||||
\param font: New font to set. */
|
||||
virtual void setOverrideFont(IGUIFont* font=0) = 0;
|
||||
|
||||
//! Gets the override font (if any)
|
||||
/** \return The override font (may be 0) */
|
||||
virtual IGUIFont* getOverrideFont(void) const = 0;
|
||||
|
||||
//! Get the font which is used right now for drawing
|
||||
/** Currently this is the override font when one is set and the
|
||||
font of the active skin otherwise */
|
||||
virtual IGUIFont* getActiveFont() const = 0;
|
||||
|
||||
//! Sets whether to draw the background. By default disabled,
|
||||
virtual void setDrawBackground(bool draw) = 0;
|
||||
|
||||
//! Checks if background drawing is enabled
|
||||
/** \return true if background drawing is enabled, false otherwise */
|
||||
virtual bool isDrawBackgroundEnabled() const = 0;
|
||||
|
||||
//! Allows to freeze updates which makes it easier to read the numbers
|
||||
/** Numbers are updated once when you switch pages. */
|
||||
virtual void setFrozen(bool freeze) = 0;
|
||||
|
||||
//! Are updates currently frozen
|
||||
virtual bool getFrozen() const = 0;
|
||||
|
||||
//! Filters prevents data that doesn't achieve the conditions from being displayed
|
||||
virtual void setFilters(irr::u32 minCalls = 0, irr::u32 minTimeSum = 0, irr::f32 minTimeAverage = 0.f, irr::u32 minTimeMax = 0) = 0;
|
||||
};
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
@ -1,92 +0,0 @@
|
||||
// Copyright (C) 2006-2012 Michael Zeilfelder
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_SPIN_BOX_H_INCLUDED__
|
||||
#define __I_GUI_SPIN_BOX_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
class IGUIEditBox;
|
||||
|
||||
//! Enumeration bitflag for when to validate the text typed into the spinbox
|
||||
//! Default used by Irrlicht is: (EGUI_SBV_ENTER|EGUI_SBV_LOSE_FOCUS)
|
||||
enum EGUI_SPINBOX_VALIDATION
|
||||
{
|
||||
//! Does not validate typed text, probably a bad idea setting this usually.
|
||||
EGUI_SBV_NEVER = 0,
|
||||
//! Validate on each change. Was default up to Irrlicht 1.8
|
||||
EGUI_SBV_CHANGE = 1,
|
||||
//! Validate when enter was pressed
|
||||
EGUI_SBV_ENTER = 2,
|
||||
//! Validate when the editbox loses the focus
|
||||
EGUI_SBV_LOSE_FOCUS = 4
|
||||
};
|
||||
|
||||
|
||||
//! Single line edit box + spin buttons
|
||||
/** \par This element can create the following events of type EGUI_EVENT_TYPE:
|
||||
\li EGET_SPINBOX_CHANGED
|
||||
*/
|
||||
class IGUISpinBox : public IGUIElement
|
||||
{
|
||||
public:
|
||||
|
||||
//! constructor
|
||||
IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent,
|
||||
s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Access the edit box used in the spin control
|
||||
virtual IGUIEditBox* getEditBox() const = 0;
|
||||
|
||||
//! set the current value of the spinbox
|
||||
/** \param val: value to be set in the spinbox */
|
||||
virtual void setValue(f32 val) = 0;
|
||||
|
||||
//! Get the current value of the spinbox
|
||||
virtual f32 getValue() const = 0;
|
||||
|
||||
//! set the range of values which can be used in the spinbox
|
||||
/** \param min: minimum value
|
||||
\param max: maximum value */
|
||||
virtual void setRange(f32 min, f32 max) = 0;
|
||||
|
||||
//! get the minimum value which can be used in the spinbox
|
||||
virtual f32 getMin() const = 0;
|
||||
|
||||
//! get the maximum value which can be used in the spinbox
|
||||
virtual f32 getMax() const = 0;
|
||||
|
||||
//! Step size by which values are changed when pressing the spinbuttons
|
||||
/** The step size also determines the number of decimal places to display
|
||||
\param step: stepsize used for value changes when pressing spinbuttons */
|
||||
virtual void setStepSize(f32 step=1.f) = 0;
|
||||
|
||||
//! Sets the number of decimal places to display.
|
||||
//! Note that this also rounds the range to the same number of decimal places.
|
||||
/** \param places: The number of decimal places to display, use -1 to reset */
|
||||
virtual void setDecimalPlaces(s32 places) = 0;
|
||||
|
||||
//! get the current step size
|
||||
virtual f32 getStepSize() const = 0;
|
||||
|
||||
//! Sets when the spinbox has to validate entered text.
|
||||
/** \param validateOn Can be any combination of EGUI_SPINBOX_VALIDATION bit flags */
|
||||
virtual void setValidateOn(u32 validateOn) = 0;
|
||||
|
||||
//! Gets when the spinbox has to validate entered text.
|
||||
/** \return A combination of EGUI_SPINBOX_VALIDATION bit flags */
|
||||
virtual u32 getValidateOn() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif // __I_GUI_SPIN_BOX_H_INCLUDED__
|
||||
|
@ -1,235 +0,0 @@
|
||||
// Copyright (C) 2003-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_TABLE_H_INCLUDED__
|
||||
#define __I_GUI_TABLE_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
#include "SColor.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
class IGUIFont;
|
||||
class IGUIScrollBar;
|
||||
|
||||
//! modes for ordering used when a column header is clicked
|
||||
enum EGUI_COLUMN_ORDERING
|
||||
{
|
||||
//! Do not use ordering
|
||||
EGCO_NONE,
|
||||
|
||||
//! Send a EGET_TABLE_HEADER_CHANGED message when a column header is clicked.
|
||||
EGCO_CUSTOM,
|
||||
|
||||
//! Sort it ascending by it's ascii value like: a,b,c,...
|
||||
EGCO_ASCENDING,
|
||||
|
||||
//! Sort it descending by it's ascii value like: z,x,y,...
|
||||
EGCO_DESCENDING,
|
||||
|
||||
//! Sort it ascending on first click, descending on next, etc
|
||||
EGCO_FLIP_ASCENDING_DESCENDING,
|
||||
|
||||
//! Not used as mode, only to get maximum value for this enum
|
||||
EGCO_COUNT
|
||||
};
|
||||
|
||||
//! Names for EGUI_COLUMN_ORDERING types
|
||||
const c8* const GUIColumnOrderingNames[] =
|
||||
{
|
||||
"none",
|
||||
"custom",
|
||||
"ascend",
|
||||
"descend",
|
||||
"ascend_descend",
|
||||
0,
|
||||
};
|
||||
|
||||
enum EGUI_ORDERING_MODE
|
||||
{
|
||||
//! No element ordering
|
||||
EGOM_NONE,
|
||||
|
||||
//! Elements are ordered from the smallest to the largest.
|
||||
EGOM_ASCENDING,
|
||||
|
||||
//! Elements are ordered from the largest to the smallest.
|
||||
EGOM_DESCENDING,
|
||||
|
||||
//! this value is not used, it only specifies the amount of default ordering types
|
||||
//! available.
|
||||
EGOM_COUNT
|
||||
};
|
||||
|
||||
const c8* const GUIOrderingModeNames[] =
|
||||
{
|
||||
"none",
|
||||
"ascending",
|
||||
"descending",
|
||||
0
|
||||
};
|
||||
|
||||
enum EGUI_TABLE_DRAW_FLAGS
|
||||
{
|
||||
EGTDF_ROWS = 1,
|
||||
EGTDF_COLUMNS = 2,
|
||||
EGTDF_ACTIVE_ROW = 4,
|
||||
EGTDF_COUNT
|
||||
};
|
||||
|
||||
//! Default list box GUI element.
|
||||
/** \par This element can create the following events of type EGUI_EVENT_TYPE:
|
||||
\li EGET_TABLE_CHANGED
|
||||
\li EGET_TABLE_SELECTED_AGAIN
|
||||
\li EGET_TABLE_HEADER_CHANGED
|
||||
*/
|
||||
class IGUITable : public IGUIElement
|
||||
{
|
||||
public:
|
||||
//! constructor
|
||||
IGUITable(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_TABLE, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Adds a column
|
||||
/** If columnIndex is outside the current range, do push new column at the end */
|
||||
virtual void addColumn(const wchar_t* caption, s32 columnIndex=-1) = 0;
|
||||
|
||||
//! remove a column from the table
|
||||
virtual void removeColumn(u32 columnIndex) = 0;
|
||||
|
||||
//! Returns the number of columns in the table control
|
||||
virtual s32 getColumnCount() const = 0;
|
||||
|
||||
//! Makes a column active. This will trigger an ordering process.
|
||||
/** \param idx: The id of the column to make active or a negative number to make non active.
|
||||
\param doOrder: Do also the ordering which depending on mode for active column
|
||||
\return True when the column could be set active (aka - it did exist). */
|
||||
virtual bool setActiveColumn(s32 idx, bool doOrder=false) = 0;
|
||||
|
||||
//! Returns which header is currently active
|
||||
virtual s32 getActiveColumn() const = 0;
|
||||
|
||||
//! Returns the ordering used by the currently active column
|
||||
virtual EGUI_ORDERING_MODE getActiveColumnOrdering() const = 0;
|
||||
|
||||
//! Set the width of a column
|
||||
virtual void setColumnWidth(u32 columnIndex, u32 width) = 0;
|
||||
|
||||
//! Get the width of a column
|
||||
virtual u32 getColumnWidth(u32 columnIndex) const = 0;
|
||||
|
||||
//! columns can be resized by drag 'n drop
|
||||
virtual void setResizableColumns(bool resizable) = 0;
|
||||
|
||||
//! can columns be resized by drag 'n drop?
|
||||
virtual bool hasResizableColumns() const = 0;
|
||||
|
||||
//! This tells the table control which ordering mode should be used when a column header is clicked.
|
||||
/** \param columnIndex The index of the column header.
|
||||
\param mode: One of the modes defined in EGUI_COLUMN_ORDERING */
|
||||
virtual void setColumnOrdering(u32 columnIndex, EGUI_COLUMN_ORDERING mode) = 0;
|
||||
|
||||
//! Returns which row is currently selected
|
||||
virtual s32 getSelected() const = 0;
|
||||
|
||||
//! set which row is currently selected
|
||||
virtual void setSelected( s32 index ) = 0;
|
||||
|
||||
//! Get amount of rows in the tabcontrol
|
||||
virtual s32 getRowCount() const = 0;
|
||||
|
||||
//! adds a row to the table
|
||||
/** \param rowIndex Zero based index of rows. The row will be
|
||||
inserted at this position, if a row already exist there, it
|
||||
will be placed after it. If the row is larger than the actual
|
||||
number of row by more than one, it won't be created. Note that
|
||||
if you create a row that's not at the end, there might be
|
||||
performance issues.
|
||||
\return index of inserted row. */
|
||||
virtual u32 addRow(u32 rowIndex) = 0;
|
||||
|
||||
//! Remove a row from the table
|
||||
virtual void removeRow(u32 rowIndex) = 0;
|
||||
|
||||
//! clears the table rows, but keeps the columns intact
|
||||
virtual void clearRows() = 0;
|
||||
|
||||
//! Swap two row positions.
|
||||
virtual void swapRows(u32 rowIndexA, u32 rowIndexB) = 0;
|
||||
|
||||
//! This tells the table to start ordering all the rows.
|
||||
/** You need to explicitly tell the table to re order the rows
|
||||
when a new row is added or the cells data is changed. This
|
||||
makes the system more flexible and doesn't make you pay the
|
||||
cost of ordering when adding a lot of rows.
|
||||
\param columnIndex: When set to -1 the active column is used.
|
||||
\param mode Ordering mode of the rows. */
|
||||
virtual void orderRows(s32 columnIndex=-1, EGUI_ORDERING_MODE mode=EGOM_NONE) = 0;
|
||||
|
||||
//! Set the text of a cell
|
||||
virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text) = 0;
|
||||
|
||||
//! Set the text of a cell, and set a color of this cell.
|
||||
virtual void setCellText(u32 rowIndex, u32 columnIndex, const core::stringw& text, video::SColor color) = 0;
|
||||
|
||||
//! Set the data of a cell
|
||||
virtual void setCellData(u32 rowIndex, u32 columnIndex, void *data) = 0;
|
||||
|
||||
//! Set the color of a cell text
|
||||
virtual void setCellColor(u32 rowIndex, u32 columnIndex, video::SColor color) = 0;
|
||||
|
||||
//! Get the text of a cell
|
||||
virtual const wchar_t* getCellText(u32 rowIndex, u32 columnIndex ) const = 0;
|
||||
|
||||
//! Get the data of a cell
|
||||
virtual void* getCellData(u32 rowIndex, u32 columnIndex ) const = 0;
|
||||
|
||||
//! clears the table, deletes all items in the table
|
||||
virtual void clear() = 0;
|
||||
|
||||
//! Set flags, as defined in ::EGUI_TABLE_DRAW_FLAGS, which influence the layout
|
||||
virtual void setDrawFlags(s32 flags) = 0;
|
||||
|
||||
//! Get the flags, as defined in ::EGUI_TABLE_DRAW_FLAGS, which influence the layout
|
||||
virtual s32 getDrawFlags() const = 0;
|
||||
|
||||
//! Sets another skin independent font.
|
||||
/** If this is set to zero, the button uses the font of the skin.
|
||||
\param font: New font to set. */
|
||||
virtual void setOverrideFont(IGUIFont* font=0) = 0;
|
||||
|
||||
//! Gets the override font (if any)
|
||||
/** \return The override font (may be 0) */
|
||||
virtual IGUIFont* getOverrideFont(void) const = 0;
|
||||
|
||||
//! Get the font which is used right now for drawing
|
||||
/** Currently this is the override font when one is set and the
|
||||
font of the active skin otherwise */
|
||||
virtual IGUIFont* getActiveFont() const = 0;
|
||||
|
||||
//! Get the height of items/rows
|
||||
virtual s32 getItemHeight() const = 0;
|
||||
|
||||
//! Access the vertical scrollbar
|
||||
virtual IGUIScrollBar* getVerticalScrollBar() const = 0;
|
||||
|
||||
//! Access the horizontal scrollbar
|
||||
virtual IGUIScrollBar* getHorizontalScrollBar() const = 0;
|
||||
|
||||
//! Sets whether to draw the background.
|
||||
virtual void setDrawBackground(bool draw) = 0;
|
||||
|
||||
//! Checks if background drawing is enabled
|
||||
/** \return true if background drawing is enabled, false otherwise */
|
||||
virtual bool isDrawBackgroundEnabled() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -1,298 +0,0 @@
|
||||
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_TREE_VIEW_H_INCLUDED__
|
||||
#define __I_GUI_TREE_VIEW_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
#include "IGUIImageList.h"
|
||||
#include "irrTypes.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
class IGUIFont;
|
||||
class IGUITreeView;
|
||||
class IGUIScrollBar;
|
||||
|
||||
|
||||
//! Node for gui tree view
|
||||
/** \par This element can create the following events of type EGUI_EVENT_TYPE:
|
||||
\li EGET_TREEVIEW_NODE_EXPAND
|
||||
\li EGET_TREEVIEW_NODE_COLLAPS
|
||||
\li EGET_TREEVIEW_NODE_DESELECT
|
||||
\li EGET_TREEVIEW_NODE_SELECT
|
||||
*/
|
||||
class IGUITreeViewNode : public IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! returns the owner (tree view) of this node
|
||||
virtual IGUITreeView* getOwner() const = 0;
|
||||
|
||||
//! Returns the parent node of this node.
|
||||
/** For the root node this will return 0. */
|
||||
virtual IGUITreeViewNode* getParent() const = 0;
|
||||
|
||||
//! returns the text of the node
|
||||
virtual const wchar_t* getText() const = 0;
|
||||
|
||||
//! sets the text of the node
|
||||
virtual void setText( const wchar_t* text ) = 0;
|
||||
|
||||
//! returns the icon text of the node
|
||||
virtual const wchar_t* getIcon() const = 0;
|
||||
|
||||
//! sets the icon text of the node
|
||||
virtual void setIcon( const wchar_t* icon ) = 0;
|
||||
|
||||
//! returns the image index of the node
|
||||
virtual u32 getImageIndex() const = 0;
|
||||
|
||||
//! sets the image index of the node
|
||||
virtual void setImageIndex( u32 imageIndex ) = 0;
|
||||
|
||||
//! returns the image index of the node
|
||||
virtual u32 getSelectedImageIndex() const = 0;
|
||||
|
||||
//! sets the image index of the node
|
||||
virtual void setSelectedImageIndex( u32 imageIndex ) = 0;
|
||||
|
||||
//! returns the user data (void*) of this node
|
||||
virtual void* getData() const = 0;
|
||||
|
||||
//! sets the user data (void*) of this node
|
||||
virtual void setData( void* data ) = 0;
|
||||
|
||||
//! returns the user data2 (IReferenceCounted) of this node
|
||||
virtual IReferenceCounted* getData2() const = 0;
|
||||
|
||||
//! sets the user data2 (IReferenceCounted) of this node
|
||||
virtual void setData2( IReferenceCounted* data ) = 0;
|
||||
|
||||
//! returns the child item count
|
||||
virtual u32 getChildCount() const = 0;
|
||||
|
||||
//! removes all children (recursive) from this node
|
||||
virtual void clearChildren() = 0;
|
||||
|
||||
//! removes all children (recursive) from this node
|
||||
/** \deprecated Deprecated in 1.8, use clearChildren() instead.
|
||||
This method may be removed by Irrlicht 1.9 */
|
||||
_IRR_DEPRECATED_ void clearChilds()
|
||||
{
|
||||
return clearChildren();
|
||||
}
|
||||
|
||||
//! returns true if this node has child nodes
|
||||
virtual bool hasChildren() const = 0;
|
||||
|
||||
//! returns true if this node has child nodes
|
||||
/** \deprecated Deprecated in 1.8, use hasChildren() instead.
|
||||
This method may be removed by Irrlicht 1.9 */
|
||||
_IRR_DEPRECATED_ bool hasChilds() const
|
||||
{
|
||||
return hasChildren();
|
||||
}
|
||||
|
||||
//! Adds a new node behind the last child node.
|
||||
/** \param text text of the new node
|
||||
\param icon icon text of the new node
|
||||
\param imageIndex index of the image for the new node (-1 = none)
|
||||
\param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
|
||||
\param data user data (void*) of the new node
|
||||
\param data2 user data2 (IReferenceCounted*) of the new node
|
||||
\return The new node
|
||||
*/
|
||||
virtual IGUITreeViewNode* addChildBack(
|
||||
const wchar_t* text, const wchar_t* icon = 0,
|
||||
s32 imageIndex=-1, s32 selectedImageIndex=-1,
|
||||
void* data=0, IReferenceCounted* data2=0) =0;
|
||||
|
||||
//! Adds a new node before the first child node.
|
||||
/** \param text text of the new node
|
||||
\param icon icon text of the new node
|
||||
\param imageIndex index of the image for the new node (-1 = none)
|
||||
\param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
|
||||
\param data user data (void*) of the new node
|
||||
\param data2 user data2 (IReferenceCounted*) of the new node
|
||||
\return The new node
|
||||
*/
|
||||
virtual IGUITreeViewNode* addChildFront(
|
||||
const wchar_t* text, const wchar_t* icon = 0,
|
||||
s32 imageIndex=-1, s32 selectedImageIndex=-1,
|
||||
void* data=0, IReferenceCounted* data2=0 ) =0;
|
||||
|
||||
//! Adds a new node behind the other node.
|
||||
/** The other node has also to be a child node from this node.
|
||||
\param other Node to insert after
|
||||
\param text text of the new node
|
||||
\param icon icon text of the new node
|
||||
\param imageIndex index of the image for the new node (-1 = none)
|
||||
\param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
|
||||
\param data user data (void*) of the new node
|
||||
\param data2 user data2 (IReferenceCounted*) of the new node
|
||||
\return The new node or 0 if other is no child node from this
|
||||
*/
|
||||
virtual IGUITreeViewNode* insertChildAfter(
|
||||
IGUITreeViewNode* other,
|
||||
const wchar_t* text, const wchar_t* icon = 0,
|
||||
s32 imageIndex=-1, s32 selectedImageIndex=-1,
|
||||
void* data=0, IReferenceCounted* data2=0) =0;
|
||||
|
||||
//! Adds a new node before the other node.
|
||||
/** The other node has also to be a child node from this node.
|
||||
\param other Node to insert before
|
||||
\param text text of the new node
|
||||
\param icon icon text of the new node
|
||||
\param imageIndex index of the image for the new node (-1 = none)
|
||||
\param selectedImageIndex index of the selected image for the new node (-1 = same as imageIndex)
|
||||
\param data user data (void*) of the new node
|
||||
\param data2 user data2 (IReferenceCounted*) of the new node
|
||||
\return The new node or 0 if other is no child node from this
|
||||
*/
|
||||
virtual IGUITreeViewNode* insertChildBefore(
|
||||
IGUITreeViewNode* other,
|
||||
const wchar_t* text, const wchar_t* icon = 0,
|
||||
s32 imageIndex=-1, s32 selectedImageIndex=-1,
|
||||
void* data=0, IReferenceCounted* data2=0) = 0;
|
||||
|
||||
//! Return the first child node from this node.
|
||||
/** \return The first child node or 0 if this node has no children. */
|
||||
virtual IGUITreeViewNode* getFirstChild() const = 0;
|
||||
|
||||
//! Return the last child node from this node.
|
||||
/** \return The last child node or 0 if this node has no children. */
|
||||
virtual IGUITreeViewNode* getLastChild() const = 0;
|
||||
|
||||
//! Returns the previous sibling node from this node.
|
||||
/** \return The previous sibling node from this node or 0 if this is
|
||||
the first node from the parent node.
|
||||
*/
|
||||
virtual IGUITreeViewNode* getPrevSibling() const = 0;
|
||||
|
||||
//! Returns the next sibling node from this node.
|
||||
/** \return The next sibling node from this node or 0 if this is
|
||||
the last node from the parent node.
|
||||
*/
|
||||
virtual IGUITreeViewNode* getNextSibling() const = 0;
|
||||
|
||||
//! Returns the next visible (expanded, may be out of scrolling) node from this node.
|
||||
/** \return The next visible node from this node or 0 if this is
|
||||
the last visible node. */
|
||||
virtual IGUITreeViewNode* getNextVisible() const = 0;
|
||||
|
||||
//! Deletes a child node.
|
||||
/** \return Returns true if the node was found as a child and is deleted. */
|
||||
virtual bool deleteChild( IGUITreeViewNode* child ) = 0;
|
||||
|
||||
//! Moves a child node one position up.
|
||||
/** \return True if the node was found as a child node and was not already the first child. */
|
||||
virtual bool moveChildUp( IGUITreeViewNode* child ) = 0;
|
||||
|
||||
//! Moves a child node one position down.
|
||||
/** \return True if the node was found as a child node and was not already the last child. */
|
||||
virtual bool moveChildDown( IGUITreeViewNode* child ) = 0;
|
||||
|
||||
//! Returns true if the node is expanded (children are visible).
|
||||
virtual bool getExpanded() const = 0;
|
||||
|
||||
//! Sets if the node is expanded.
|
||||
virtual void setExpanded( bool expanded ) = 0;
|
||||
|
||||
//! Returns true if the node is currently selected.
|
||||
virtual bool getSelected() const = 0;
|
||||
|
||||
//! Sets this node as selected.
|
||||
virtual void setSelected( bool selected ) = 0;
|
||||
|
||||
//! Returns true if this node is the root node.
|
||||
virtual bool isRoot() const = 0;
|
||||
|
||||
//! Returns the level of this node.
|
||||
/** The root node has level 0. Direct children of the root has level 1 ... */
|
||||
virtual s32 getLevel() const = 0;
|
||||
|
||||
//! Returns true if this node is visible (all parents are expanded).
|
||||
virtual bool isVisible() const = 0;
|
||||
};
|
||||
|
||||
|
||||
//! Default tree view GUI element.
|
||||
/** Displays a windows like tree buttons to expand/collapse the child
|
||||
nodes of an node and optional tree lines. Each node consists of an
|
||||
text, an icon text and a void pointer for user data. */
|
||||
class IGUITreeView : public IGUIElement
|
||||
{
|
||||
public:
|
||||
//! constructor
|
||||
IGUITreeView(IGUIEnvironment* environment, IGUIElement* parent,
|
||||
s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement( EGUIET_TREE_VIEW, environment, parent, id, rectangle ) {}
|
||||
|
||||
//! returns the root node (not visible) from the tree.
|
||||
virtual IGUITreeViewNode* getRoot() const = 0;
|
||||
|
||||
//! returns the selected node of the tree or 0 if none is selected
|
||||
virtual IGUITreeViewNode* getSelected() const = 0;
|
||||
|
||||
//! returns true if the tree lines are visible
|
||||
virtual bool getLinesVisible() const = 0;
|
||||
|
||||
//! sets if the tree lines are visible
|
||||
/** \param visible true for visible, false for invisible */
|
||||
virtual void setLinesVisible( bool visible ) = 0;
|
||||
|
||||
//! Sets the font which should be used as icon font.
|
||||
/** This font is set to the Irrlicht engine built-in-font by
|
||||
default. Icons can be displayed in front of every list item.
|
||||
An icon is a string, displayed with the icon font. When using
|
||||
the build-in-font of the Irrlicht engine as icon font, the icon
|
||||
strings defined in GUIIcons.h can be used.
|
||||
*/
|
||||
virtual void setIconFont( IGUIFont* font ) = 0;
|
||||
|
||||
//! Sets a skin independent font.
|
||||
/** \param font: New font to set or 0 to use the skin-font. */
|
||||
virtual void setOverrideFont(IGUIFont* font=0) = 0;
|
||||
|
||||
//! Gets the override font (if any)
|
||||
/** \return The override font (may be 0) */
|
||||
virtual IGUIFont* getOverrideFont(void) const = 0;
|
||||
|
||||
//! Get the font which is used for drawing
|
||||
/** This is the override font when one is set and the
|
||||
font of the skin otherwise. */
|
||||
virtual IGUIFont* getActiveFont() const = 0;
|
||||
|
||||
//! Sets the image list which should be used for the image and selected image of every node.
|
||||
/** The default is 0 (no images). */
|
||||
virtual void setImageList( IGUIImageList* imageList ) = 0;
|
||||
|
||||
//! Returns the image list which is used for the nodes.
|
||||
virtual IGUIImageList* getImageList() const = 0;
|
||||
|
||||
//! Sets if the image is left of the icon. Default is true.
|
||||
virtual void setImageLeftOfIcon( bool bLeftOf ) = 0;
|
||||
|
||||
//! Returns if the Image is left of the icon. Default is true.
|
||||
virtual bool getImageLeftOfIcon() const = 0;
|
||||
|
||||
//! Returns the node which is associated to the last event.
|
||||
/** This pointer is only valid inside the OnEvent call! */
|
||||
virtual IGUITreeViewNode* getLastEventNode() const = 0;
|
||||
|
||||
//! Access the vertical scrollbar
|
||||
virtual IGUIScrollBar* getVerticalScrollBar() const = 0;
|
||||
|
||||
//! Access the horizontal scrollbar
|
||||
virtual IGUIScrollBar* getHorizontalScrollBar() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -1,74 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_GUI_WINDOW_H_INCLUDED__
|
||||
#define __I_GUI_WINDOW_H_INCLUDED__
|
||||
|
||||
#include "IGUIElement.h"
|
||||
#include "EMessageBoxFlags.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace gui
|
||||
{
|
||||
class IGUIButton;
|
||||
|
||||
//! Default moveable window GUI element with border, caption and close icons.
|
||||
/** \par This element can create the following events of type EGUI_EVENT_TYPE:
|
||||
\li EGET_ELEMENT_CLOSED
|
||||
*/
|
||||
class IGUIWindow : public IGUIElement
|
||||
{
|
||||
public:
|
||||
|
||||
//! constructor
|
||||
IGUIWindow(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_WINDOW, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Returns pointer to the close button
|
||||
/** You can hide the button by calling setVisible(false) on the result. */
|
||||
virtual IGUIButton* getCloseButton() const = 0;
|
||||
|
||||
//! Returns pointer to the minimize button
|
||||
/** You can hide the button by calling setVisible(false) on the result. */
|
||||
virtual IGUIButton* getMinimizeButton() const = 0;
|
||||
|
||||
//! Returns pointer to the maximize button
|
||||
/** You can hide the button by calling setVisible(false) on the result. */
|
||||
virtual IGUIButton* getMaximizeButton() const = 0;
|
||||
|
||||
//! Returns true if the window can be dragged with the mouse, false if not
|
||||
virtual bool isDraggable() const = 0;
|
||||
|
||||
//! Sets whether the window can be dragged by the mouse
|
||||
virtual void setDraggable(bool draggable) = 0;
|
||||
|
||||
//! Set if the window background will be drawn
|
||||
virtual void setDrawBackground(bool draw) = 0;
|
||||
|
||||
//! Get if the window background will be drawn
|
||||
virtual bool getDrawBackground() const = 0;
|
||||
|
||||
//! Set if the window titlebar will be drawn
|
||||
//! Note: If the background is not drawn, then the titlebar is automatically also not drawn
|
||||
virtual void setDrawTitlebar(bool draw) = 0;
|
||||
|
||||
//! Get if the window titlebar will be drawn
|
||||
virtual bool getDrawTitlebar() const = 0;
|
||||
|
||||
//! Returns the rectangle of the drawable area (without border and without titlebar)
|
||||
/** The coordinates are given relative to the top-left position of the gui element.<br>
|
||||
So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.<br>
|
||||
To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner.
|
||||
Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract
|
||||
the menu area additionally. */
|
||||
virtual core::rect<s32> getClientRect() const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace gui
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -30,44 +30,6 @@ namespace scene
|
||||
{
|
||||
public:
|
||||
|
||||
//! Flips the direction of surfaces.
|
||||
/** Changes backfacing triangles to frontfacing
|
||||
triangles and vice versa.
|
||||
\param mesh Mesh on which the operation is performed. */
|
||||
virtual void flipSurfaces(IMesh* mesh) const = 0;
|
||||
|
||||
//! Sets the alpha vertex color value of the whole mesh to a new value.
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param alpha New alpha value. Must be a value between 0 and 255. */
|
||||
void setVertexColorAlpha(IMesh* mesh, s32 alpha) const
|
||||
{
|
||||
apply(scene::SVertexColorSetAlphaManipulator(alpha), mesh);
|
||||
}
|
||||
|
||||
//! Sets the alpha vertex color value of the whole mesh to a new value.
|
||||
/** \param buffer Meshbuffer on which the operation is performed.
|
||||
\param alpha New alpha value. Must be a value between 0 and 255. */
|
||||
void setVertexColorAlpha(IMeshBuffer* buffer, s32 alpha) const
|
||||
{
|
||||
apply(scene::SVertexColorSetAlphaManipulator(alpha), buffer);
|
||||
}
|
||||
|
||||
//! Sets the colors of all vertices to one color
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param color New color. */
|
||||
void setVertexColors(IMesh* mesh, video::SColor color) const
|
||||
{
|
||||
apply(scene::SVertexColorSetManipulator(color), mesh);
|
||||
}
|
||||
|
||||
//! Sets the colors of all vertices to one color
|
||||
/** \param buffer Meshbuffer on which the operation is performed.
|
||||
\param color New color. */
|
||||
void setVertexColors(IMeshBuffer* buffer, video::SColor color) const
|
||||
{
|
||||
apply(scene::SVertexColorSetManipulator(color), buffer);
|
||||
}
|
||||
|
||||
//! Recalculates all normals of the mesh.
|
||||
/** \param mesh: Mesh on which the operation is performed.
|
||||
\param smooth: If the normals shall be smoothed.
|
||||
@ -82,26 +44,6 @@ namespace scene
|
||||
virtual void recalculateNormals(IMeshBuffer* buffer,
|
||||
bool smooth = false, bool angleWeighted = false) const=0;
|
||||
|
||||
//! Recalculates tangents, requires a tangent mesh
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param recalculateNormals If the normals shall be recalculated, otherwise original normals of the mesh are used unchanged.
|
||||
\param smooth If the normals shall be smoothed.
|
||||
\param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
|
||||
*/
|
||||
virtual void recalculateTangents(IMesh* mesh,
|
||||
bool recalculateNormals=false, bool smooth=false,
|
||||
bool angleWeighted=false) const=0;
|
||||
|
||||
//! Recalculates tangents, requires a tangent mesh buffer
|
||||
/** \param buffer Meshbuffer on which the operation is performed.
|
||||
\param recalculateNormals If the normals shall be recalculated, otherwise original normals of the buffer are used unchanged.
|
||||
\param smooth If the normals shall be smoothed.
|
||||
\param angleWeighted If the normals shall be smoothed in relation to their angles. More expensive, but also higher precision.
|
||||
*/
|
||||
virtual void recalculateTangents(IMeshBuffer* buffer,
|
||||
bool recalculateNormals=false, bool smooth=false,
|
||||
bool angleWeighted=false) const=0;
|
||||
|
||||
//! Scales the actual mesh, not a scene node.
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param factor Scale factor for each axis. */
|
||||
@ -118,116 +60,6 @@ namespace scene
|
||||
apply(SVertexPositionScaleManipulator(factor), buffer, true);
|
||||
}
|
||||
|
||||
//! Scales the actual mesh, not a scene node.
|
||||
/** \deprecated Use scale() instead. This method may be removed by Irrlicht 1.9
|
||||
\param mesh Mesh on which the operation is performed.
|
||||
\param factor Scale factor for each axis. */
|
||||
_IRR_DEPRECATED_ void scaleMesh(IMesh* mesh, const core::vector3df& factor) const {return scale(mesh,factor);}
|
||||
|
||||
//! Scale the texture coords of a mesh.
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param factor Vector which defines the scale for each axis.
|
||||
\param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */
|
||||
void scaleTCoords(scene::IMesh* mesh, const core::vector2df& factor, u32 level=1) const
|
||||
{
|
||||
apply(SVertexTCoordsScaleManipulator(factor, level), mesh);
|
||||
}
|
||||
|
||||
//! Scale the texture coords of a meshbuffer.
|
||||
/** \param buffer Meshbuffer on which the operation is performed.
|
||||
\param factor Vector which defines the scale for each axis.
|
||||
\param level Number of texture coord, starting from 1. Support for level 2 exists for LightMap buffers. */
|
||||
void scaleTCoords(scene::IMeshBuffer* buffer, const core::vector2df& factor, u32 level=1) const
|
||||
{
|
||||
apply(SVertexTCoordsScaleManipulator(factor, level), buffer);
|
||||
}
|
||||
|
||||
//! Applies a transformation to a mesh
|
||||
/** \param mesh Mesh on which the operation is performed.
|
||||
\param m transformation matrix.
|
||||
\param normalsUpdate When 0 - don't update normals.
|
||||
When 1 - update normals with inverse transposed of the transformation matrix
|
||||
*/
|
||||
void transform(IMesh* mesh, const core::matrix4& m, u32 normalsUpdate = 0) const
|
||||
{
|
||||
apply(SVertexPositionTransformManipulator(m), mesh, true);
|
||||
|
||||
if ( normalsUpdate == 1 )
|
||||
{
|
||||
core::matrix4 invT;
|
||||
if ( m.getInverse(invT) )
|
||||
{
|
||||
invT = invT.getTransposed();
|
||||
apply(SVertexNormalTransformManipulator(invT), mesh, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! Applies a transformation to a meshbuffer
|
||||
/** \param buffer Meshbuffer on which the operation is performed.
|
||||
\param m transformation matrix.
|
||||
\param normalsUpdate When 0 - don't update normals.
|
||||
When 1 - update normals with inverse transposed of the transformation matrix
|
||||
*/
|
||||
void transform(IMeshBuffer* buffer, const core::matrix4& m, u32 normalsUpdate = 0) const
|
||||
{
|
||||
apply(SVertexPositionTransformManipulator(m), buffer, true);
|
||||
|
||||
if ( normalsUpdate == 1 )
|
||||
{
|
||||
core::matrix4 invT;
|
||||
if ( m.getInverse(invT) )
|
||||
{
|
||||
invT = invT.getTransposed();
|
||||
apply(SVertexNormalTransformManipulator(invT), buffer, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//! Applies a transformation to a mesh
|
||||
/** \deprecated Use transform() instead. This method may be removed by Irrlicht 1.9
|
||||
\param mesh Mesh on which the operation is performed.
|
||||
\param m transformation matrix. */
|
||||
_IRR_DEPRECATED_ virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const {return transform(mesh,m);}
|
||||
|
||||
//! Creates a planar texture mapping on the mesh
|
||||
/** \param mesh: Mesh on which the operation is performed.
|
||||
\param resolution: resolution of the planar mapping. This is
|
||||
the value specifying which is the relation between world space
|
||||
and texture coordinate space. */
|
||||
virtual void makePlanarTextureMapping(IMesh* mesh, f32 resolution=0.001f) const=0;
|
||||
|
||||
//! Creates a planar texture mapping on the meshbuffer
|
||||
/** \param meshbuffer: Buffer on which the operation is performed.
|
||||
\param resolution: resolution of the planar mapping. This is
|
||||
the value specifying which is the relation between world space
|
||||
and texture coordinate space. */
|
||||
virtual void makePlanarTextureMapping(scene::IMeshBuffer* meshbuffer, f32 resolution=0.001f) const=0;
|
||||
|
||||
//! Creates a planar texture mapping on the buffer
|
||||
/** This method is currently implemented towards the LWO planar mapping. A more general biasing might be required.
|
||||
\param mesh Mesh on which the operation is performed.
|
||||
\param resolutionS Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space.
|
||||
\param resolutionT Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space.
|
||||
\param axis The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z).
|
||||
\param offset Vector added to the vertex positions (in object coordinates).
|
||||
*/
|
||||
virtual void makePlanarTextureMapping(scene::IMesh* mesh,
|
||||
f32 resolutionS, f32 resolutionT,
|
||||
u8 axis, const core::vector3df& offset) const=0;
|
||||
|
||||
//! Creates a planar texture mapping on the meshbuffer
|
||||
/** This method is currently implemented towards the LWO planar mapping. A more general biasing might be required.
|
||||
\param buffer Buffer on which the operation is performed.
|
||||
\param resolutionS Resolution of the planar mapping in horizontal direction. This is the ratio between object space and texture space.
|
||||
\param resolutionT Resolution of the planar mapping in vertical direction. This is the ratio between object space and texture space.
|
||||
\param axis The axis along which the texture is projected. The allowed values are 0 (X), 1(Y), and 2(Z).
|
||||
\param offset Vector added to the vertex positions (in object coordinates).
|
||||
*/
|
||||
virtual void makePlanarTextureMapping(scene::IMeshBuffer* buffer,
|
||||
f32 resolutionS, f32 resolutionT,
|
||||
u8 axis, const core::vector3df& offset) const=0;
|
||||
|
||||
//! Clones a static IMesh into a modifiable SMesh.
|
||||
/** All meshbuffers in the returned SMesh
|
||||
are of type SMeshBuffer or SMeshBufferLightMap.
|
||||
@ -237,59 +69,6 @@ namespace scene
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual SMesh* createMeshCopy(IMesh* mesh) const = 0;
|
||||
|
||||
//! Creates a copy of the mesh, which will only consist of S3DVertexTangents vertices.
|
||||
/** This is useful if you want to draw tangent space normal
|
||||
mapped geometry because it calculates the tangent and binormal
|
||||
data which is needed there.
|
||||
\param mesh Input mesh
|
||||
\param recalculateNormals The normals are recalculated if set,
|
||||
otherwise the original ones are kept. Note that keeping the
|
||||
normals may introduce inaccurate tangents if the normals are
|
||||
very different to those calculated from the faces.
|
||||
\param smooth The normals/tangents are smoothed across the
|
||||
meshbuffer's faces if this flag is set.
|
||||
\param angleWeighted Improved smoothing calculation used
|
||||
\param recalculateTangents Whether are actually calculated, or just the mesh with proper type is created.
|
||||
\return Mesh consisting only of S3DVertexTangents vertices. If
|
||||
you no longer need the cloned mesh, you should call
|
||||
IMesh::drop(). See IReferenceCounted::drop() for more
|
||||
information. */
|
||||
virtual IMesh* createMeshWithTangents(IMesh* mesh,
|
||||
bool recalculateNormals=false, bool smooth=false,
|
||||
bool angleWeighted=false, bool recalculateTangents=true) const=0;
|
||||
|
||||
//! Creates a copy of the mesh, which will only consist of S3DVertex2TCoord vertices.
|
||||
/** \param mesh Input mesh
|
||||
\return Mesh consisting only of S3DVertex2TCoord vertices. If
|
||||
you no longer need the cloned mesh, you should call
|
||||
IMesh::drop(). See IReferenceCounted::drop() for more
|
||||
information. */
|
||||
virtual IMesh* createMeshWith2TCoords(IMesh* mesh) const = 0;
|
||||
|
||||
//! Creates a copy of the mesh, which will only consist of S3DVertex vertices.
|
||||
/** \param mesh Input mesh
|
||||
\return Mesh consisting only of S3DVertex vertices. If
|
||||
you no longer need the cloned mesh, you should call
|
||||
IMesh::drop(). See IReferenceCounted::drop() for more
|
||||
information. */
|
||||
virtual IMesh* createMeshWith1TCoords(IMesh* mesh) const = 0;
|
||||
|
||||
//! Creates a copy of a mesh with all vertices unwelded
|
||||
/** \param mesh Input mesh
|
||||
\return Mesh consisting only of unique faces. All vertices
|
||||
which were previously shared are now duplicated. If you no
|
||||
longer need the cloned mesh, you should call IMesh::drop(). See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IMesh* createMeshUniquePrimitives(IMesh* mesh) const = 0;
|
||||
|
||||
//! Creates a copy of a mesh with vertices welded
|
||||
/** \param mesh Input mesh
|
||||
\param tolerance The threshold for vertex comparisons.
|
||||
\return Mesh without redundant vertices. If you no longer need
|
||||
the cloned mesh, you should call IMesh::drop(). See
|
||||
IReferenceCounted::drop() for more information. */
|
||||
virtual IMesh* createMeshWelded(IMesh* mesh, f32 tolerance=core::ROUNDING_ERROR_f32) const = 0;
|
||||
|
||||
//! Get amount of polygons in mesh.
|
||||
/** \param mesh Input mesh
|
||||
\return Number of polygons in mesh. */
|
||||
@ -310,43 +89,6 @@ namespace scene
|
||||
virtual IAnimatedMesh * createAnimatedMesh(IMesh* mesh,
|
||||
scene::E_ANIMATED_MESH_TYPE type = scene::EAMT_UNKNOWN) const = 0;
|
||||
|
||||
//! Vertex cache optimization according to the Forsyth paper
|
||||
/** More information can be found at
|
||||
http://home.comcast.net/~tom_forsyth/papers/fast_vert_cache_opt.html
|
||||
|
||||
The function is thread-safe (read: you can optimize several
|
||||
meshes in different threads).
|
||||
|
||||
\param mesh Source mesh for the operation.
|
||||
\return A new mesh optimized for the vertex cache. */
|
||||
virtual IMesh* createForsythOptimizedMesh(const IMesh *mesh) const = 0;
|
||||
|
||||
//! Optimize the mesh with an algorithm tuned for heightmaps.
|
||||
/**
|
||||
This differs from usual simplification methods in two ways:
|
||||
- it's intended to be lossless
|
||||
- it has special care for the borders, which are useful with heightmap tiles
|
||||
|
||||
This function is thread-safe. Remember to weld afterwards - this
|
||||
function only moves vertices, it does not weld.
|
||||
|
||||
\param mesh Mesh to operate on.
|
||||
*/
|
||||
virtual void heightmapOptimizeMesh(IMesh * const mesh, const f32 tolerance = core::ROUNDING_ERROR_f32) const = 0;
|
||||
|
||||
//! Optimize the meshbuffer with an algorithm tuned for heightmaps.
|
||||
/**
|
||||
This differs from usual simplification methods in two ways:
|
||||
- it's intended to be lossless
|
||||
- it has special care for the borders, which are useful with heightmap tiles
|
||||
|
||||
This function is thread-safe. Remember to weld afterward - this
|
||||
function only moves vertices, it does not weld.
|
||||
|
||||
\param mb Meshbuffer to operate on.
|
||||
*/
|
||||
virtual void heightmapOptimizeMesh(IMeshBuffer * const mb, const f32 tolerance = core::ROUNDING_ERROR_f32) const = 0;
|
||||
|
||||
//! Apply a manipulator on the Meshbuffer
|
||||
/** \param func A functor defining the mesh manipulation.
|
||||
\param buffer The Meshbuffer to apply the manipulator to.
|
||||
|
@ -1,30 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_RANDOMIZER_H_INCLUDED__
|
||||
#define __I_RANDOMIZER_H_INCLUDED__
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
//! Interface for generating random numbers
|
||||
class IRandomizer : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! resets the randomizer
|
||||
/** \param value Initialization value (seed) */
|
||||
virtual void reset(s32 value=0x0f0f0f0f) =0;
|
||||
|
||||
//! generates a pseudo random number in the range 0..randMax()
|
||||
virtual s32 rand() const =0;
|
||||
|
||||
//! get maxmimum number generated by rand()
|
||||
virtual s32 randMax() const =0;
|
||||
};
|
||||
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
@ -602,32 +602,6 @@ namespace scene
|
||||
pass currently is active they can render the correct part of their geometry. */
|
||||
virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0;
|
||||
|
||||
//! Get the default scene node factory which can create all built in scene nodes
|
||||
/** \return Pointer to the default scene node factory
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNodeFactory* getDefaultSceneNodeFactory() = 0;
|
||||
|
||||
//! Adds a scene node factory to the scene manager.
|
||||
/** Use this to extend the scene manager with new scene node types which it should be
|
||||
able to create automatically, for example when loading data from xml files. */
|
||||
virtual void registerSceneNodeFactory(ISceneNodeFactory* factoryToAdd) = 0;
|
||||
|
||||
//! Get amount of registered scene node factories.
|
||||
virtual u32 getRegisteredSceneNodeFactoryCount() const = 0;
|
||||
|
||||
//! Get a scene node factory by index
|
||||
/** \return Pointer to the requested scene node factory, or 0 if it does not exist.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNodeFactory* getSceneNodeFactory(u32 index) = 0;
|
||||
|
||||
//! Get typename from a scene node type or null if not found
|
||||
virtual const c8* getSceneNodeTypeName(ESCENE_NODE_TYPE type) = 0;
|
||||
|
||||
//! Adds a scene node to the scene by name
|
||||
/** \return Pointer to the scene node added by a factory
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addSceneNode(const char* sceneNodeTypeName, ISceneNode* parent=0) = 0;
|
||||
|
||||
//! Creates a new scene manager.
|
||||
/** This can be used to easily draw and/or store two
|
||||
independent scenes at the same time. The mesh cache will be
|
||||
|
@ -1,68 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __I_SCENE_NODE_FACTORY_H_INCLUDED__
|
||||
#define __I_SCENE_NODE_FACTORY_H_INCLUDED__
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "ESceneNodeTypes.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
namespace scene
|
||||
{
|
||||
class ISceneNode;
|
||||
|
||||
//! Interface for dynamic creation of scene nodes
|
||||
/** To be able to add custom scene nodes to Irrlicht and to make it possible for the
|
||||
scene manager to save and load those external scene nodes, simply implement this
|
||||
interface and register it in you scene manager via ISceneManager::registerSceneNodeFactory.
|
||||
Note: When implementing your own scene node factory, don't call ISceneNodeManager::grab() to
|
||||
increase the reference counter of the scene node manager. This is not necessary because the
|
||||
scene node manager will grab() the factory anyway, and otherwise cyclic references will
|
||||
be created and the scene manager and all its nodes won't get deallocated.
|
||||
*/
|
||||
class ISceneNodeFactory : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
//! adds a scene node to the scene graph based on its type id
|
||||
/** \param type: Type of the scene node to add.
|
||||
\param parent: Parent scene node of the new node, can be null to add the scene node to the root.
|
||||
\return Returns pointer to the new scene node or null if not successful.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addSceneNode(ESCENE_NODE_TYPE type, ISceneNode* parent=0) = 0;
|
||||
|
||||
//! adds a scene node to the scene graph based on its type name
|
||||
/** \param typeName: Type name of the scene node to add.
|
||||
\param parent: Parent scene node of the new node, can be null to add the scene node to the root.
|
||||
\return Returns pointer to the new scene node or null if not successful.
|
||||
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
|
||||
virtual ISceneNode* addSceneNode(const c8* typeName, ISceneNode* parent=0) = 0;
|
||||
|
||||
//! returns amount of scene node types this factory is able to create
|
||||
virtual u32 getCreatableSceneNodeTypeCount() const = 0;
|
||||
|
||||
//! returns type of a creatable scene node type
|
||||
/** \param idx: Index of scene node type in this factory. Must be a value between 0 and
|
||||
getCreatableSceneNodeTypeCount() */
|
||||
virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const = 0;
|
||||
|
||||
//! returns type name of a creatable scene node type by index
|
||||
/** \param idx: Index of scene node type in this factory. Must be a value between 0 and
|
||||
getCreatableSceneNodeTypeCount() */
|
||||
virtual const c8* getCreateableSceneNodeTypeName(u32 idx) const = 0;
|
||||
|
||||
//! returns type name of a creatable scene node type
|
||||
/** \param type: Type of scene node.
|
||||
\return: Returns name of scene node type if this factory can create the type, otherwise 0. */
|
||||
virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const = 0;
|
||||
};
|
||||
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
@ -41,7 +41,6 @@ namespace video
|
||||
struct S3DVertex;
|
||||
struct S3DVertex2TCoords;
|
||||
struct S3DVertexTangents;
|
||||
struct SLight;
|
||||
class IImageLoader;
|
||||
class IImageWriter;
|
||||
class IMaterialRenderer;
|
||||
@ -1053,33 +1052,6 @@ namespace video
|
||||
\return Amount of primitives drawn in the last frame. */
|
||||
virtual u32 getPrimitiveCountDrawn( u32 mode =0 ) const =0;
|
||||
|
||||
//! Deletes all dynamic lights which were previously added with addDynamicLight().
|
||||
virtual void deleteAllDynamicLights() =0;
|
||||
|
||||
//! adds a dynamic light, returning an index to the light
|
||||
//! \param light: the light data to use to create the light
|
||||
//! \return An index to the light, or -1 if an error occurs
|
||||
virtual s32 addDynamicLight(const SLight& light) =0;
|
||||
|
||||
//! Returns the maximal amount of dynamic lights the device can handle
|
||||
/** \return Maximal amount of dynamic lights. */
|
||||
virtual u32 getMaximalDynamicLightAmount() const =0;
|
||||
|
||||
//! Returns amount of dynamic lights currently set
|
||||
/** \return Amount of dynamic lights currently set */
|
||||
virtual u32 getDynamicLightCount() const =0;
|
||||
|
||||
//! Returns light data which was previously set by IVideoDriver::addDynamicLight().
|
||||
/** \param idx Zero based index of the light. Must be 0 or
|
||||
greater and smaller than IVideoDriver::getDynamicLightCount.
|
||||
\return Light data. */
|
||||
virtual const SLight& getDynamicLight(u32 idx) const =0;
|
||||
|
||||
//! Turns a dynamic light on or off
|
||||
//! \param lightIndex: the index returned by addDynamicLight
|
||||
//! \param turnOn: true to turn the light on, false to turn it off
|
||||
virtual void turnLightOn(s32 lightIndex, bool turnOn) =0;
|
||||
|
||||
//! Gets name of this video driver.
|
||||
/** \return Returns the name of the video driver, e.g. in case
|
||||
of the Direct3D8 driver, it would return "Direct3D 8.1". */
|
||||
|
@ -1,58 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__
|
||||
#define __IRR_I_VIDEO_MODE_LIST_H_INCLUDED__
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "dimension2d.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
|
||||
//! A list of all available video modes.
|
||||
/** You can get a list via IrrlichtDevice::getVideoModeList().
|
||||
You only need the null device (EDT_NULL) to get the video-modes. */
|
||||
class IVideoModeList : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
|
||||
//! Gets amount of video modes in the list.
|
||||
/** \return Returns amount of video modes. */
|
||||
virtual s32 getVideoModeCount() const = 0;
|
||||
|
||||
//! Get the screen size of a video mode in pixels.
|
||||
/** \param modeNumber: zero based index of the video mode.
|
||||
\return Size of screen in pixels of the specified video mode. */
|
||||
virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const = 0;
|
||||
|
||||
//! Get a supported screen size with certain constraints.
|
||||
/** \param minSize: Minimum dimensions required.
|
||||
\param maxSize: Maximum dimensions allowed.
|
||||
\return Size of screen in pixels which matches the requirements.
|
||||
as good as possible. */
|
||||
virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const = 0;
|
||||
|
||||
//! Get the pixel depth of a video mode in bits.
|
||||
/** \param modeNumber: zero based index of the video mode.
|
||||
\return Size of each pixel of the specified video mode in bits. */
|
||||
virtual s32 getVideoModeDepth(s32 modeNumber) const = 0;
|
||||
|
||||
//! Get current desktop screen resolution.
|
||||
/** \return Size of screen in pixels of the current desktop video mode. */
|
||||
virtual const core::dimension2d<u32>& getDesktopResolution() const = 0;
|
||||
|
||||
//! Get the pixel depth of a video mode in bits.
|
||||
/** \return Size of each pixel of the current desktop video mode in bits. */
|
||||
virtual s32 getDesktopDepth() const = 0;
|
||||
};
|
||||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -12,7 +12,6 @@
|
||||
#include "EDeviceTypes.h"
|
||||
#include "IEventReceiver.h"
|
||||
#include "ICursorControl.h"
|
||||
#include "IVideoModeList.h"
|
||||
#include "ITimer.h"
|
||||
#include "IOSOperator.h"
|
||||
|
||||
@ -20,7 +19,6 @@ namespace irr
|
||||
{
|
||||
class ILogger;
|
||||
class IEventReceiver;
|
||||
class IRandomizer;
|
||||
|
||||
namespace io {
|
||||
class IFileSystem;
|
||||
@ -111,14 +109,6 @@ namespace irr
|
||||
/** \return Pointer to the logger. */
|
||||
virtual ILogger* getLogger() = 0;
|
||||
|
||||
//! Gets a list with all video modes available.
|
||||
/** You only need a null driver (ED_NULL) to access
|
||||
those video modes. So you can get the available modes
|
||||
before starting any other video driver.
|
||||
\return Pointer to a list with all video modes supported
|
||||
by the gfx adapter. */
|
||||
virtual video::IVideoModeList* getVideoModeList() = 0;
|
||||
|
||||
//! Get context manager
|
||||
virtual video::IContextManager* getContextManager() = 0;
|
||||
|
||||
@ -136,22 +126,6 @@ namespace irr
|
||||
\return Pointer to the ITimer object. */
|
||||
virtual ITimer* getTimer() = 0;
|
||||
|
||||
//! Provides access to the engine's currently set randomizer.
|
||||
/** \return Pointer to the IRandomizer object. */
|
||||
virtual IRandomizer* getRandomizer() const =0;
|
||||
|
||||
//! Sets a new randomizer.
|
||||
/** \param r Pointer to the new IRandomizer object. This object is
|
||||
grab()'ed by the engine and will be released upon the next setRandomizer
|
||||
call or upon device destruction. */
|
||||
virtual void setRandomizer(IRandomizer* r) =0;
|
||||
|
||||
//! Creates a new default randomizer.
|
||||
/** The default randomizer provides the random sequence known from previous
|
||||
Irrlicht versions and is the initial randomizer set on device creation.
|
||||
\return Pointer to the default IRandomizer object. */
|
||||
virtual IRandomizer* createDefaultRandomizer() const =0;
|
||||
|
||||
//! Sets the caption of the window.
|
||||
/** \param text: New text of the window caption. */
|
||||
virtual void setWindowCaption(const wchar_t* text) = 0;
|
||||
@ -342,24 +316,6 @@ namespace irr
|
||||
{
|
||||
case video::EDT_NULL:
|
||||
return true;
|
||||
case video::EDT_SOFTWARE:
|
||||
#ifdef _IRR_COMPILE_WITH_SOFTWARE_
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
case video::EDT_BURNINGSVIDEO:
|
||||
#ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
case video::EDT_DIRECT3D9:
|
||||
#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
case video::EDT_OPENGL:
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
return true;
|
||||
|
101
include/SLight.h
101
include/SLight.h
@ -1,101 +0,0 @@
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __S_LIGHT_H_INCLUDED__
|
||||
#define __S_LIGHT_H_INCLUDED__
|
||||
|
||||
#include "SColor.h"
|
||||
#include "vector3d.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
|
||||
//! Enumeration for different types of lights
|
||||
enum E_LIGHT_TYPE
|
||||
{
|
||||
//! point light, it has a position in space and radiates light in all directions
|
||||
ELT_POINT,
|
||||
//! spot light, it has a position in space, a direction, and a limited cone of influence
|
||||
ELT_SPOT,
|
||||
//! directional light, coming from a direction from an infinite distance
|
||||
ELT_DIRECTIONAL,
|
||||
|
||||
//! Only used for counting the elements of this enum
|
||||
ELT_COUNT
|
||||
};
|
||||
|
||||
//! Names for light types
|
||||
const c8* const LightTypeNames[] =
|
||||
{
|
||||
"Point",
|
||||
"Spot",
|
||||
"Directional",
|
||||
0
|
||||
};
|
||||
|
||||
//! structure for holding data describing a dynamic point light.
|
||||
/** Irrlicht supports point lights, spot lights, and directional lights.
|
||||
*/
|
||||
struct SLight
|
||||
{
|
||||
SLight() : AmbientColor(0.f,0.f,0.f), DiffuseColor(1.f,1.f,1.f),
|
||||
SpecularColor(1.f,1.f,1.f), Attenuation(1.f,0.f,0.f),
|
||||
OuterCone(45.f), InnerCone(0.f), Falloff(2.f),
|
||||
Position(0.f,0.f,0.f), Direction(0.f,0.f,1.f),
|
||||
Radius(100.f), Type(ELT_POINT), CastShadows(true)
|
||||
{}
|
||||
|
||||
//! Ambient color emitted by the light
|
||||
SColorf AmbientColor;
|
||||
|
||||
//! Diffuse color emitted by the light.
|
||||
/** This is the primary color you want to set. */
|
||||
SColorf DiffuseColor;
|
||||
|
||||
//! Specular color emitted by the light.
|
||||
/** For details how to use specular highlights, see SMaterial::Shininess */
|
||||
SColorf SpecularColor;
|
||||
|
||||
//! Attenuation factors (constant, linear, quadratic)
|
||||
/** Changes the light strength fading over distance.
|
||||
Can also be altered by setting the radius, Attenuation will change to
|
||||
(0,1.f/radius,0). Can be overridden after radius was set. */
|
||||
core::vector3df Attenuation;
|
||||
|
||||
//! The angle of the spot's outer cone. Ignored for other lights.
|
||||
f32 OuterCone;
|
||||
|
||||
//! The angle of the spot's inner cone. Ignored for other lights.
|
||||
f32 InnerCone;
|
||||
|
||||
//! The light strength's decrease between Outer and Inner cone. Only for spot lights
|
||||
f32 Falloff;
|
||||
|
||||
//! Read-ONLY! Position of the light.
|
||||
/** If Type is ELT_DIRECTIONAL, it is ignored. Changed via light scene node's position. */
|
||||
core::vector3df Position;
|
||||
|
||||
//! Read-ONLY! Direction of the light.
|
||||
/** If Type is ELT_POINT, it is ignored. Changed via light scene node's rotation. */
|
||||
core::vector3df Direction;
|
||||
|
||||
//! Read-ONLY! Radius of light. Everything within this radius will be lighted.
|
||||
/** On OpenGL light doesn't stop at radius. To get same light as in OpenGL in other drivers
|
||||
do set the radius to a large value like sqrt(FLT_MAX) and then set the Attenuation afterwards.
|
||||
*/
|
||||
f32 Radius;
|
||||
|
||||
//! Read-ONLY! Type of the light. Default: ELT_POINT
|
||||
E_LIGHT_TYPE Type;
|
||||
|
||||
//! Read-ONLY! Does the light cast shadows?
|
||||
bool CastShadows:1;
|
||||
};
|
||||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
@ -24,199 +24,6 @@ namespace scene
|
||||
struct IVertexManipulator
|
||||
{
|
||||
};
|
||||
//! Vertex manipulator to set color to a fixed color for all vertices
|
||||
class SVertexColorSetManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorSetManipulator(video::SColor color) : Color(color) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color=Color;
|
||||
}
|
||||
private:
|
||||
video::SColor Color;
|
||||
};
|
||||
//! Vertex manipulator to set the alpha value of the vertex color to a fixed value
|
||||
class SVertexColorSetAlphaManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorSetAlphaManipulator(u32 alpha) : Alpha(alpha) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setAlpha(Alpha);
|
||||
}
|
||||
private:
|
||||
u32 Alpha;
|
||||
};
|
||||
//! Vertex manipulator which inverts the RGB values
|
||||
class SVertexColorInvertManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setRed(255-vertex.Color.getRed());
|
||||
vertex.Color.setGreen(255-vertex.Color.getGreen());
|
||||
vertex.Color.setBlue(255-vertex.Color.getBlue());
|
||||
}
|
||||
};
|
||||
//! Vertex manipulator to set vertex color to one of two values depending on a given threshold
|
||||
/** If average of the color value is >Threshold the High color is chosen, else Low. */
|
||||
class SVertexColorThresholdManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorThresholdManipulator(u8 threshold, video::SColor low,
|
||||
video::SColor high) : Threshold(threshold), Low(low), High(high) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color = ((u8)vertex.Color.getAverage()>Threshold)?High:Low;
|
||||
}
|
||||
private:
|
||||
u8 Threshold;
|
||||
video::SColor Low;
|
||||
video::SColor High;
|
||||
};
|
||||
//! Vertex manipulator which adjusts the brightness by the given amount
|
||||
/** A positive value increases brightness, a negative value darkens the colors. */
|
||||
class SVertexColorBrightnessManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorBrightnessManipulator(s32 amount) : Amount(amount) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setRed(core::clamp(vertex.Color.getRed()+Amount, 0u, 255u));
|
||||
vertex.Color.setGreen(core::clamp(vertex.Color.getGreen()+Amount, 0u, 255u));
|
||||
vertex.Color.setBlue(core::clamp(vertex.Color.getBlue()+Amount, 0u, 255u));
|
||||
}
|
||||
private:
|
||||
s32 Amount;
|
||||
};
|
||||
//! Vertex manipulator which adjusts the contrast by the given factor
|
||||
/** Factors over 1 increase contrast, below 1 reduce it. */
|
||||
class SVertexColorContrastManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorContrastManipulator(f32 factor) : Factor(factor) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+128, 0, 255));
|
||||
vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+128, 0, 255));
|
||||
vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+128, 0, 255));
|
||||
}
|
||||
private:
|
||||
f32 Factor;
|
||||
};
|
||||
//! Vertex manipulator which adjusts the contrast by the given factor and brightness by a signed amount.
|
||||
/** Factors over 1 increase contrast, below 1 reduce it.
|
||||
A positive amount increases brightness, a negative one darkens the colors. */
|
||||
class SVertexColorContrastBrightnessManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorContrastBrightnessManipulator(f32 factor, s32 amount) : Factor(factor), Amount(amount+128) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setRed(core::clamp(core::round32((vertex.Color.getRed()-128)*Factor)+Amount, 0, 255));
|
||||
vertex.Color.setGreen(core::clamp(core::round32((vertex.Color.getGreen()-128)*Factor)+Amount, 0, 255));
|
||||
vertex.Color.setBlue(core::clamp(core::round32((vertex.Color.getBlue()-128)*Factor)+Amount, 0, 255));
|
||||
}
|
||||
private:
|
||||
f32 Factor;
|
||||
s32 Amount;
|
||||
};
|
||||
//! Vertex manipulator which adjusts the brightness by a gamma operation
|
||||
/** A value over one increases brightness, one below darkens the colors. */
|
||||
class SVertexColorGammaManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorGammaManipulator(f32 gamma) : Gamma(1.f)
|
||||
{
|
||||
if (gamma != 0.f)
|
||||
Gamma = 1.f/gamma;
|
||||
}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setRed(core::clamp(core::round32(powf((f32)(vertex.Color.getRed()),Gamma)), 0, 255));
|
||||
vertex.Color.setGreen(core::clamp(core::round32(powf((f32)(vertex.Color.getGreen()),Gamma)), 0, 255));
|
||||
vertex.Color.setBlue(core::clamp(core::round32(powf((f32)(vertex.Color.getBlue()),Gamma)), 0, 255));
|
||||
}
|
||||
private:
|
||||
f32 Gamma;
|
||||
};
|
||||
//! Vertex manipulator which scales the color values
|
||||
/** Can e.g be used for white balance, factor would be 255.f/brightest color. */
|
||||
class SVertexColorScaleManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorScaleManipulator(f32 factor) : Factor(factor) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color.setRed(core::clamp(core::round32(vertex.Color.getRed()*Factor), 0, 255));
|
||||
vertex.Color.setGreen(core::clamp(core::round32(vertex.Color.getGreen()*Factor), 0, 255));
|
||||
vertex.Color.setBlue(core::clamp(core::round32(vertex.Color.getBlue()*Factor), 0, 255));
|
||||
}
|
||||
private:
|
||||
f32 Factor;
|
||||
};
|
||||
//! Vertex manipulator which desaturates the color values
|
||||
/** Uses the lightness value of the color. */
|
||||
class SVertexColorDesaturateToLightnessManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color=core::round32(vertex.Color.getLightness());
|
||||
}
|
||||
};
|
||||
//! Vertex manipulator which desaturates the color values
|
||||
/** Uses the average value of the color. */
|
||||
class SVertexColorDesaturateToAverageManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color=vertex.Color.getAverage();
|
||||
}
|
||||
};
|
||||
//! Vertex manipulator which desaturates the color values
|
||||
/** Uses the luminance value of the color. */
|
||||
class SVertexColorDesaturateToLuminanceManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color=core::round32(vertex.Color.getLuminance());
|
||||
}
|
||||
};
|
||||
//! Vertex manipulator which interpolates the color values
|
||||
/** Uses linear interpolation. */
|
||||
class SVertexColorInterpolateLinearManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorInterpolateLinearManipulator(video::SColor color, f32 factor) :
|
||||
Color(color), Factor(factor) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color=vertex.Color.getInterpolated(Color, Factor);
|
||||
}
|
||||
private:
|
||||
video::SColor Color;
|
||||
f32 Factor;
|
||||
};
|
||||
//! Vertex manipulator which interpolates the color values
|
||||
/** Uses linear interpolation. */
|
||||
class SVertexColorInterpolateQuadraticManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexColorInterpolateQuadraticManipulator(video::SColor color1, video::SColor color2, f32 factor) :
|
||||
Color1(color1), Color2(color2), Factor(factor) {}
|
||||
void operator()(video::S3DVertex& vertex) const
|
||||
{
|
||||
vertex.Color=vertex.Color.getInterpolated_quadratic(Color1, Color2, Factor);
|
||||
}
|
||||
private:
|
||||
video::SColor Color1;
|
||||
video::SColor Color2;
|
||||
f32 Factor;
|
||||
};
|
||||
|
||||
//! Vertex manipulator which scales the position of the vertex
|
||||
class SVertexPositionScaleManipulator : public IVertexManipulator
|
||||
@ -232,74 +39,6 @@ namespace scene
|
||||
core::vector3df Factor;
|
||||
};
|
||||
|
||||
//! Vertex manipulator which scales the position of the vertex along the normals
|
||||
/** This can look more pleasing than the usual Scale operator, but
|
||||
depends on the mesh geometry.
|
||||
*/
|
||||
class SVertexPositionScaleAlongNormalsManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexPositionScaleAlongNormalsManipulator(const core::vector3df& factor) : Factor(factor) {}
|
||||
template <typename VType>
|
||||
void operator()(VType& vertex) const
|
||||
{
|
||||
vertex.Pos += vertex.Normal*Factor;
|
||||
}
|
||||
private:
|
||||
core::vector3df Factor;
|
||||
};
|
||||
|
||||
//! Vertex manipulator which transforms the position of the vertex
|
||||
class SVertexPositionTransformManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexPositionTransformManipulator(const core::matrix4& m) : Transformation(m) {}
|
||||
template <typename VType>
|
||||
void operator()(VType& vertex) const
|
||||
{
|
||||
Transformation.transformVect(vertex.Pos);
|
||||
}
|
||||
private:
|
||||
core::matrix4 Transformation;
|
||||
};
|
||||
|
||||
//! Vertex manipulator which transforms the normal of the vertex
|
||||
class SVertexNormalTransformManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexNormalTransformManipulator(const core::matrix4& m) : Transformation(m) {}
|
||||
template <typename VType>
|
||||
void operator()(VType& vertex) const
|
||||
{
|
||||
Transformation.transformVect(vertex.Normal);
|
||||
}
|
||||
private:
|
||||
core::matrix4 Transformation;
|
||||
};
|
||||
|
||||
//! Vertex manipulator which scales the TCoords of the vertex
|
||||
class SVertexTCoordsScaleManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexTCoordsScaleManipulator(const core::vector2df& factor, u32 uvSet=1) : Factor(factor), UVSet(uvSet) {}
|
||||
void operator()(video::S3DVertex2TCoords& vertex) const
|
||||
{
|
||||
if (1==UVSet)
|
||||
vertex.TCoords *= Factor;
|
||||
else if (2==UVSet)
|
||||
vertex.TCoords2 *= Factor;
|
||||
}
|
||||
template <typename VType>
|
||||
void operator()(VType& vertex) const
|
||||
{
|
||||
if (1==UVSet)
|
||||
vertex.TCoords *= Factor;
|
||||
}
|
||||
private:
|
||||
core::vector2df Factor;
|
||||
u32 UVSet;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
|
@ -1,55 +0,0 @@
|
||||
// Copyright (C) 2009-2012 Christian Stehno
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __E_DRIVER_CHOICE_H_INCLUDED__
|
||||
#define __E_DRIVER_CHOICE_H_INCLUDED__
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include "EDriverTypes.h"
|
||||
#include "IrrlichtDevice.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
||||
//! ask user for driver
|
||||
static irr::video::E_DRIVER_TYPE driverChoiceConsole(bool allDrivers=false)
|
||||
{
|
||||
#if defined (_IRR_IPHONE_PLATFORM_) || defined (_IRR_ANDROID_PLATFORM_)
|
||||
return irr::video::EDT_OGLES2;
|
||||
#else
|
||||
printf("Please select the driver you want:\n");
|
||||
irr::u32 i=0;
|
||||
char c = 'a';
|
||||
|
||||
for (i=irr::video::EDT_COUNT; i>0; --i)
|
||||
{
|
||||
if ( allDrivers || irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1)) )
|
||||
{
|
||||
printf(" (%c) %s\n", c, irr::video::DRIVER_TYPE_NAMES[i-1]);
|
||||
++c;
|
||||
}
|
||||
}
|
||||
|
||||
char userSelection;
|
||||
std::cin >> userSelection;
|
||||
c = 'a';
|
||||
|
||||
for (i=irr::video::EDT_COUNT; i>0; --i)
|
||||
{
|
||||
if ( allDrivers || irr::IrrlichtDevice::isDriverSupported(irr::video::E_DRIVER_TYPE(i-1)) )
|
||||
{
|
||||
if (userSelection == c)
|
||||
return irr::video::E_DRIVER_TYPE(i-1);
|
||||
++c;
|
||||
}
|
||||
}
|
||||
|
||||
return irr::video::EDT_COUNT;
|
||||
#endif
|
||||
}
|
||||
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
@ -47,7 +47,6 @@
|
||||
#include "EMaterialFlags.h"
|
||||
#include "EMaterialTypes.h"
|
||||
#include "EMeshWriterEnums.h"
|
||||
#include "EMessageBoxFlags.h"
|
||||
#include "ESceneNodeTypes.h"
|
||||
#include "fast_atof.h"
|
||||
#include "IAnimatedMesh.h"
|
||||
@ -65,31 +64,21 @@
|
||||
#include "IGPUProgrammingServices.h"
|
||||
#include "IGUIButton.h"
|
||||
#include "IGUICheckBox.h"
|
||||
#include "IGUIColorSelectDialog.h"
|
||||
#include "IGUIComboBox.h"
|
||||
#include "IGUIContextMenu.h"
|
||||
#include "IGUIEditBox.h"
|
||||
#include "IGUIElement.h"
|
||||
#include "IGUIElementFactory.h"
|
||||
#include "IGUIEnvironment.h"
|
||||
#include "IGUIFileOpenDialog.h"
|
||||
#include "IGUIFont.h"
|
||||
#include "IGUIFontBitmap.h"
|
||||
#include "IGUIImage.h"
|
||||
#include "IGUIInOutFader.h"
|
||||
#include "IGUIListBox.h"
|
||||
#include "IGUIMeshViewer.h"
|
||||
#include "IGUIScrollBar.h"
|
||||
#include "IGUISkin.h"
|
||||
#include "IGUISpinBox.h"
|
||||
#include "IGUISpriteBank.h"
|
||||
#include "IGUIStaticText.h"
|
||||
#include "IGUITabControl.h"
|
||||
#include "IGUITable.h"
|
||||
#include "IGUIToolbar.h"
|
||||
#include "IGUIWindow.h"
|
||||
#include "IGUITreeView.h"
|
||||
#include "IGUIProfiler.h"
|
||||
#include "IImage.h"
|
||||
#include "IImageLoader.h"
|
||||
#include "IImageWriter.h"
|
||||
@ -108,7 +97,6 @@
|
||||
#include "IReadFile.h"
|
||||
#include "IReferenceCounted.h"
|
||||
#include "irrArray.h"
|
||||
#include "IRandomizer.h"
|
||||
#include "IRenderTarget.h"
|
||||
#include "IrrlichtDevice.h"
|
||||
#include "irrMath.h"
|
||||
@ -118,14 +106,12 @@
|
||||
#include "ISceneCollisionManager.h"
|
||||
#include "ISceneManager.h"
|
||||
#include "ISceneNode.h"
|
||||
#include "ISceneNodeFactory.h"
|
||||
#include "IShaderConstantSetCallBack.h"
|
||||
#include "ISkinnedMesh.h"
|
||||
#include "ITexture.h"
|
||||
#include "ITimer.h"
|
||||
#include "IVertexBuffer.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "IVideoModeList.h"
|
||||
#include "IWriteFile.h"
|
||||
#include "Keycodes.h"
|
||||
#include "line2d.h"
|
||||
@ -141,7 +127,6 @@
|
||||
#include "SColor.h"
|
||||
#include "SExposedVideoData.h"
|
||||
#include "SIrrCreationParameters.h"
|
||||
#include "SLight.h"
|
||||
#include "SMaterial.h"
|
||||
#include "SMesh.h"
|
||||
#include "SMeshBuffer.h"
|
||||
|
Reference in New Issue
Block a user