Added EGDS_TITLEBARTEXT_DISTANCE_X and EGDS_TITLEBARTEXT_DISTANCE_Y to GUI, submitted by FuzzYspo0N

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2613 dfc29bdd-3216-0410-991c-e03cc46cb475
master
bitplane 2009-08-16 00:28:43 +00:00
parent ed373887aa
commit 62442a5240
4 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,7 @@
Changes in 1.6 (??.??.2009)
- Added EGDS_TITLEBARTEXT_DISTANCE_X and EGDS_TITLEBARTEXT_DISTANCE_Y to GUI, submitted by FuzzYspo0N
- Fix for UFT8 filenames displayed in file dialog, patch by MadHyde.
- Added const method for array::binary_search, potentially slow as it doesn't sort the list!

View File

@ -151,6 +151,10 @@ namespace gui
EGDS_TEXT_DISTANCE_X,
//! distance for text from background
EGDS_TEXT_DISTANCE_Y,
//! distance for text in the title bar, from the left of the window rect
EGDS_TITLEBARTEXT_DISTANCE_X,
//! distance for text in the title bar, from the top of the window rect
EGDS_TITLEBARTEXT_DISTANCE_Y,
//! this value is not used, it only specifies the amount of default sizes
//! available.
EGDS_COUNT

View File

@ -58,6 +58,9 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
Sizes[EGDS_TEXT_DISTANCE_X] = 2;
Sizes[EGDS_TEXT_DISTANCE_Y] = 0;
Sizes[EGDS_TITLEBARTEXT_DISTANCE_X] = 2;
Sizes[EGDS_TITLEBARTEXT_DISTANCE_Y] = 0;
}
else
{
@ -96,6 +99,9 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
Sizes[EGDS_TEXT_DISTANCE_X] = 3;
Sizes[EGDS_TEXT_DISTANCE_Y] = 2;
Sizes[EGDS_TITLEBARTEXT_DISTANCE_X] = 3;
Sizes[EGDS_TITLEBARTEXT_DISTANCE_Y] = 2;
}
Texts[EGDT_MSG_BOX_OK] = L"OK";

View File

@ -223,8 +223,8 @@ void CGUIWindow::draw()
if (DrawTitlebar && Text.size())
{
rect.UpperLeftCorner.X += skin->getSize(EGDS_TEXT_DISTANCE_X);
rect.UpperLeftCorner.Y += skin->getSize(EGDS_TEXT_DISTANCE_Y);
rect.UpperLeftCorner.X += skin->getSize(EGDS_TITLEBARTEXT_DISTANCE_X);
rect.UpperLeftCorner.Y += skin->getSize(EGDS_TITLEBARTEXT_DISTANCE_Y);
rect.LowerRightCorner.X -= skin->getSize(EGDS_WINDOW_BUTTON_WIDTH) + 5;
IGUIFont* font = skin->getFont(EGDF_WINDOW);