font tool overlapping character fix by heiye. updated const signatures in gui editor and font tool.
git-svn-id: http://svn.code.sf.net/p/irrlicht/code/trunk@980 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
9207ed2d76
commit
9be7473508
@ -54,7 +54,7 @@ namespace gui
|
||||
AttribName->drop();
|
||||
}
|
||||
|
||||
virtual bool OnEvent(SEvent e)
|
||||
virtual bool OnEvent(const SEvent &e)
|
||||
{
|
||||
if (IsEnabled)
|
||||
{
|
||||
|
@ -89,7 +89,7 @@ namespace gui
|
||||
CGUIAttribute::setAttrib(attribs, attribIndex);
|
||||
}
|
||||
|
||||
virtual bool OnEvent(SEvent e)
|
||||
virtual bool OnEvent(const SEvent &e)
|
||||
{
|
||||
switch (e.EventType)
|
||||
{
|
||||
|
@ -145,14 +145,14 @@ IGUIElement* CGUIEditFactory::addGUIElement(const c8* typeName, IGUIElement* par
|
||||
|
||||
|
||||
//! returns amount of element types this factory is able to create
|
||||
s32 CGUIEditFactory::getCreatableGUIElementTypeCount()
|
||||
s32 CGUIEditFactory::getCreatableGUIElementTypeCount() const
|
||||
{
|
||||
return EGUIEDIT_COUNT;
|
||||
}
|
||||
|
||||
|
||||
//! returns type name of a createable element type
|
||||
const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx)
|
||||
const c8* CGUIEditFactory::getCreateableGUIElementTypeName(s32 idx) const
|
||||
{
|
||||
if (idx>=0 && idx<EGUIEDIT_COUNT)
|
||||
return GUIEditElementTypeNames[idx];
|
||||
|
@ -29,17 +29,17 @@ namespace gui
|
||||
virtual IGUIElement* addGUIElement(const c8* typeName, IGUIElement* parent=0);
|
||||
|
||||
//! returns amount of GUI element types this factory is able to create
|
||||
virtual s32 getCreatableGUIElementTypeCount();
|
||||
virtual s32 getCreatableGUIElementTypeCount() const;
|
||||
|
||||
//! returns type name of a createable 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);
|
||||
virtual const c8* getCreateableGUIElementTypeName(s32 idx) const;
|
||||
|
||||
|
||||
// not used:
|
||||
virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) {return 0;} ;
|
||||
virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) { return EGUIET_ELEMENT;};
|
||||
virtual const c8* getCreateableGUIElementTypeName(EGUI_ELEMENT_TYPE type) const {return 0;} ;
|
||||
virtual EGUI_ELEMENT_TYPE getCreateableGUIElementType(s32 idx) const { return EGUIET_ELEMENT;};
|
||||
virtual IGUIElement* addGUIElement(EGUI_ELEMENT_TYPE type, IGUIElement* parent=0) {return 0;};
|
||||
private:
|
||||
|
||||
|
@ -110,17 +110,17 @@ CGUIEditWindow::~CGUIEditWindow()
|
||||
ResizeButton->drop();
|
||||
}
|
||||
|
||||
CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor()
|
||||
CGUIAttributeEditor* CGUIEditWindow::getEnvironmentEditor() const
|
||||
{
|
||||
return EnvEditor;
|
||||
}
|
||||
|
||||
CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor()
|
||||
CGUIAttributeEditor* CGUIEditWindow::getAttributeEditor() const
|
||||
{
|
||||
return AttribEditor;
|
||||
}
|
||||
|
||||
CGUIAttributeEditor* CGUIEditWindow::getOptionEditor()
|
||||
CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const
|
||||
{
|
||||
return OptionEditor;
|
||||
}
|
||||
@ -181,7 +181,7 @@ void CGUIEditWindow::draw()
|
||||
|
||||
|
||||
//! called if an event happened.
|
||||
bool CGUIEditWindow::OnEvent(SEvent event)
|
||||
bool CGUIEditWindow::OnEvent(const SEvent &event)
|
||||
{
|
||||
switch(event.EventType)
|
||||
{
|
||||
@ -277,6 +277,6 @@ bool CGUIEditWindow::OnEvent(SEvent event)
|
||||
|
||||
// we're supposed to supply these if we're creating an IGUIWindow
|
||||
// but we don't need them so we'll just return null
|
||||
IGUIButton* CGUIEditWindow::getCloseButton() {return 0;}
|
||||
IGUIButton* CGUIEditWindow::getMinimizeButton() {return 0;}
|
||||
IGUIButton* CGUIEditWindow::getMaximizeButton() {return 0;}
|
||||
IGUIButton* CGUIEditWindow::getCloseButton() const {return 0;}
|
||||
IGUIButton* CGUIEditWindow::getMinimizeButton() const {return 0;}
|
||||
IGUIButton* CGUIEditWindow::getMaximizeButton() const {return 0;}
|
||||
|
@ -26,19 +26,19 @@ namespace gui
|
||||
//! this part draws the window
|
||||
virtual void draw();
|
||||
//! handles events
|
||||
virtual bool OnEvent(SEvent event);
|
||||
virtual bool OnEvent(const SEvent &event);
|
||||
|
||||
//! change selection
|
||||
virtual void setSelectedElement(IGUIElement *sel);
|
||||
|
||||
// not used
|
||||
virtual IGUIButton* getCloseButton();
|
||||
virtual IGUIButton* getMinimizeButton();
|
||||
virtual IGUIButton* getMaximizeButton();
|
||||
virtual IGUIButton* getCloseButton() const;
|
||||
virtual IGUIButton* getMinimizeButton() const;
|
||||
virtual IGUIButton* getMaximizeButton() const;
|
||||
|
||||
CGUIAttributeEditor* getAttributeEditor();
|
||||
CGUIAttributeEditor* getOptionEditor();
|
||||
CGUIAttributeEditor* getEnvironmentEditor();
|
||||
CGUIAttributeEditor* getAttributeEditor() const;
|
||||
CGUIAttributeEditor* getOptionEditor() const;
|
||||
CGUIAttributeEditor* getEnvironmentEditor() const;
|
||||
|
||||
//! this shoudln't be serialized, but this is included as it's an example
|
||||
virtual const c8* getTypeName() const { return "GUIEditWindow"; }
|
||||
|
@ -221,7 +221,7 @@ void CGUIEditWorkspace::selectPreviousSibling()
|
||||
}
|
||||
|
||||
//! called if an event happened.
|
||||
bool CGUIEditWorkspace::OnEvent(SEvent e)
|
||||
bool CGUIEditWorkspace::OnEvent(const SEvent &e)
|
||||
{
|
||||
IGUIFileOpenDialog* dialog=0;
|
||||
switch(e.EventType)
|
||||
@ -416,7 +416,7 @@ bool CGUIEditWorkspace::OnEvent(SEvent e)
|
||||
sub->addItem(L"Default factory",-1,true, true);
|
||||
|
||||
// add elements from each factory
|
||||
for (i=0; i < Environment->getRegisteredGUIElementFactoryCount(); ++i)
|
||||
for (i=0; u32(i) < Environment->getRegisteredGUIElementFactoryCount(); ++i)
|
||||
{
|
||||
sub2 = sub->getSubMenu(i);
|
||||
|
||||
@ -428,7 +428,7 @@ bool CGUIEditWorkspace::OnEvent(SEvent e)
|
||||
c++;
|
||||
}
|
||||
|
||||
if (i+1 < Environment->getRegisteredGUIElementFactoryCount())
|
||||
if (u32(i+1) < Environment->getRegisteredGUIElementFactoryCount())
|
||||
{
|
||||
core::stringw strFact;
|
||||
strFact = L"Factory ";
|
||||
@ -574,7 +574,7 @@ bool CGUIEditWorkspace::OnEvent(SEvent e)
|
||||
// load a gui file
|
||||
case EGET_FILE_SELECTED:
|
||||
dialog = (IGUIFileOpenDialog*)e.GUIEvent.Caller;
|
||||
Environment->loadGUI(core::stringc(dialog->getFilename()).c_str());
|
||||
Environment->loadGUI(core::stringc(dialog->getFileName()).c_str());
|
||||
break;
|
||||
|
||||
case EGET_MENU_ITEM_SELECTED:
|
||||
|
@ -41,7 +41,7 @@ namespace gui
|
||||
~CGUIEditWorkspace();
|
||||
|
||||
//! called if an event happened.
|
||||
virtual bool OnEvent(SEvent event);
|
||||
virtual bool OnEvent(const SEvent &event);
|
||||
|
||||
//! Removes a child.
|
||||
virtual void removeChild(IGUIElement* child);
|
||||
|
@ -166,7 +166,7 @@ void CGUIPanel::setHScrollBarMode( E_SCROLL_BAR_MODE mode )
|
||||
NeedsUpdate = true;
|
||||
}
|
||||
|
||||
bool CGUIPanel::OnEvent( SEvent event )
|
||||
bool CGUIPanel::OnEvent(const SEvent &event)
|
||||
{
|
||||
// Redirect mouse wheel to scrollbar
|
||||
if ( event.EventType == EET_MOUSE_INPUT_EVENT && event.MouseInput.Event == EMIE_MOUSE_WHEEL )
|
||||
|
@ -79,7 +79,7 @@ public:
|
||||
//! returns the visible area inside the panel, excluding scrollbar and border
|
||||
core::rect<s32> getClientArea() const;
|
||||
|
||||
virtual bool OnEvent(SEvent event);
|
||||
virtual bool OnEvent(const SEvent &event);
|
||||
|
||||
//! adds a child to the panel
|
||||
virtual void addChild(IGUIElement* child);
|
||||
|
@ -61,7 +61,7 @@ namespace gui
|
||||
AttribButton->drop();
|
||||
}
|
||||
|
||||
virtual bool OnEvent(SEvent e)
|
||||
virtual bool OnEvent(const SEvent &e)
|
||||
{
|
||||
|
||||
if (IsEnabled)
|
||||
|
@ -183,7 +183,7 @@ void CGUITextureCacheBrowser::updateAbsolutePosition()
|
||||
}
|
||||
|
||||
//! called if an event happened.
|
||||
bool CGUITextureCacheBrowser::OnEvent(SEvent event)
|
||||
bool CGUITextureCacheBrowser::OnEvent(const SEvent &event)
|
||||
{
|
||||
switch(event.EventType)
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ namespace gui
|
||||
~CGUITextureCacheBrowser();
|
||||
|
||||
//! event handler
|
||||
bool OnEvent(SEvent event);
|
||||
virtual bool OnEvent(const SEvent &event);
|
||||
|
||||
//! draws the element
|
||||
virtual void draw();
|
||||
@ -41,13 +41,13 @@ namespace gui
|
||||
virtual const c8* getTypeName() const { return "textureCacheBrowser"; }
|
||||
|
||||
//! Returns pointer to the close button
|
||||
virtual IGUIButton* getCloseButton() { return CloseButton; }
|
||||
virtual IGUIButton* getCloseButton() const { return CloseButton; }
|
||||
|
||||
//! Returns pointer to the minimize button
|
||||
virtual IGUIButton* getMinimizeButton() { return 0;}
|
||||
virtual IGUIButton* getMinimizeButton() const { return 0;}
|
||||
|
||||
//! Returns pointer to the maximize button
|
||||
virtual IGUIButton* getMaximizeButton() { return 0;}
|
||||
virtual IGUIButton* getMaximizeButton() const { return 0;}
|
||||
|
||||
void setSelected(s32 index=-1);
|
||||
|
||||
|
@ -14,7 +14,7 @@ CMemoryReadWriteFile::CMemoryReadWriteFile(const c8* filename)
|
||||
}
|
||||
|
||||
|
||||
s32 CMemoryReadWriteFile::write(const void* buffer, s32 sizeToWrite)
|
||||
s32 CMemoryReadWriteFile::write(const void* buffer, u32 sizeToWrite)
|
||||
{
|
||||
|
||||
// no point in writing 0 bytes
|
||||
@ -34,7 +34,7 @@ s32 CMemoryReadWriteFile::write(const void* buffer, s32 sizeToWrite)
|
||||
|
||||
}
|
||||
|
||||
bool CMemoryReadWriteFile::seek(s32 finalPos, bool relativeMovement)
|
||||
bool CMemoryReadWriteFile::seek(long finalPos, bool relativeMovement)
|
||||
{
|
||||
if (relativeMovement)
|
||||
{
|
||||
@ -55,12 +55,12 @@ bool CMemoryReadWriteFile::seek(s32 finalPos, bool relativeMovement)
|
||||
|
||||
}
|
||||
|
||||
const c8* CMemoryReadWriteFile::getFileName()
|
||||
const c8* CMemoryReadWriteFile::getFileName() const
|
||||
{
|
||||
return FileName.c_str();
|
||||
}
|
||||
|
||||
s32 CMemoryReadWriteFile::getPos()
|
||||
long CMemoryReadWriteFile::getPos() const
|
||||
{
|
||||
return Pos;
|
||||
}
|
||||
@ -71,7 +71,7 @@ core::array<c8>& CMemoryReadWriteFile::getData()
|
||||
}
|
||||
|
||||
|
||||
s32 CMemoryReadWriteFile::getSize()
|
||||
long CMemoryReadWriteFile::getSize() const
|
||||
{
|
||||
return Data.size();
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ namespace io
|
||||
//! \param buffer: Pointer to buffer of bytes to write.
|
||||
//! \param sizeToWrite: Amount of bytes to wrtie to the file.
|
||||
//! \return Returns how much bytes were written.
|
||||
virtual s32 write(const void* buffer, s32 sizeToWrite);
|
||||
virtual s32 write(const void* buffer, u32 sizeToWrite);
|
||||
|
||||
//! Changes position in file, returns true if successful.
|
||||
//! \param finalPos: Destination position in the file.
|
||||
@ -35,11 +35,11 @@ namespace io
|
||||
//! changed relative to current position. Otherwise the position is changed
|
||||
//! from begin of file.
|
||||
//! \return Returns true if successful, otherwise false.
|
||||
virtual bool seek(s32 finalPos, bool relativeMovement = false);
|
||||
virtual bool seek(long finalPos, bool relativeMovement = false);
|
||||
|
||||
//! Returns size of file.
|
||||
//! \return Returns the size of the file in bytes.
|
||||
virtual s32 getSize();
|
||||
virtual long getSize() const;
|
||||
|
||||
//! Reads an amount of bytes from the file.
|
||||
//! \param buffer: Pointer to buffer where to read bytes will be written to.
|
||||
@ -49,11 +49,11 @@ namespace io
|
||||
|
||||
//! Returns the current position in the file.
|
||||
//! \return Returns the current position in the file in bytes.
|
||||
virtual s32 getPos();
|
||||
virtual long getPos() const;
|
||||
|
||||
//! Returns name of file.
|
||||
//! \return Returns the file name as zero terminated character string.
|
||||
virtual const c8* getFileName();
|
||||
virtual const c8* getFileName() const;
|
||||
|
||||
//! Returns file data as an array
|
||||
core::array<c8>& getData();
|
||||
|
@ -124,7 +124,7 @@ inline u32 getTextureSizeFromSurfaceSize(u32 size)
|
||||
{
|
||||
WCRANGE* current = &glyphs->ranges[range];
|
||||
|
||||
maxy=0;
|
||||
//maxy=0;
|
||||
|
||||
// loop through each glyph and write its size and position
|
||||
for (s32 ch=current->wcLow; ch< current->wcLow + current->cGlyphs; ch++)
|
||||
|
@ -18,4 +18,3 @@ Global
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -100,7 +100,7 @@ public:
|
||||
device->setEventReceiver(this);
|
||||
}
|
||||
|
||||
virtual bool OnEvent(SEvent event)
|
||||
virtual bool OnEvent(const SEvent &event)
|
||||
{
|
||||
if (event.EventType == EET_GUI_EVENT)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user