Commit f7583dc1 authored by cutealien's avatar cutealien

IGUITable can now disable the active column.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4788 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 5cbc0836
--------------------------
Changes in 1.9 (not yet released)
- IGUITable can now disable the active column.
- IGUIElement::getElementFromPoint now virtual
- Fixed issue with wrongly enabled Z-writing for transparent shader materials. Thanks Hendu for this fix.
- Allow more control over particle behavior. This also changed the default behavior.
......
......@@ -102,9 +102,9 @@ namespace gui
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.
/** \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 if successful. */
\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
......@@ -188,10 +188,10 @@ namespace gui
//! 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
//! 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
//! Get the flags, as defined in ::EGUI_TABLE_DRAW_FLAGS, which influence the layout
virtual s32 getDrawFlags() const = 0;
};
......
......@@ -97,7 +97,7 @@ void CGUITable::addColumn(const wchar_t* caption, s32 columnIndex)
}
}
if (ActiveTab == -1)
if (ActiveTab == -1 && Columns.size() == 1) // first column added - make it active automatically
ActiveTab = 0;
recalculateWidths();
......@@ -136,11 +136,10 @@ s32 CGUITable::getRowCount() const
bool CGUITable::setActiveColumn(s32 idx, bool doOrder )
{
if (idx < 0 || idx >= (s32)Columns.size())
return false;
if ( idx >= (s32)Columns.size() )
idx = -1;
bool changed = (ActiveTab != idx);
ActiveTab = idx;
if ( ActiveTab < 0 )
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment