@@ -2434,9 +2434,14 @@ void GUIFormSpecMenu::drawMenu()
2434
2434
// Viewport rectangle on screen
2435
2435
core::rect<s32> rect = imgrect + spec.pos ;
2436
2436
if (spec.parent_button && spec.parent_button ->isPressed ()) {
2437
+ #if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
2438
+ rect += core::dimension2d<s32>(
2439
+ 0.05 * (float )rect.getWidth (), 0.05 * (float )rect.getHeight ());
2440
+ #else
2437
2441
rect += core::dimension2d<s32>(
2438
2442
skin->getSize (irr::gui::EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X),
2439
2443
skin->getSize (irr::gui::EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y));
2444
+ #endif
2440
2445
}
2441
2446
drawItemStack (driver, m_font, item, rect, &AbsoluteClippingRect,
2442
2447
m_gamedef, IT_ROT_NONE);
@@ -2472,11 +2477,16 @@ void GUIFormSpecMenu::drawMenu()
2472
2477
const StaticTextSpec &spec = m_static_texts[i];
2473
2478
core::rect<s32> rect = spec.rect ;
2474
2479
if (spec.parent_button && spec.parent_button ->isPressed ()) {
2480
+ #if (IRRLICHT_VERSION_MAJOR == 1 && IRRLICHT_VERSION_MINOR < 8)
2481
+ rect += core::dimension2d<s32>(
2482
+ 0.05 * (float )rect.getWidth (), 0.05 * (float )rect.getHeight ());
2483
+ #else
2475
2484
// Use image offset instead of text's because its a bit smaller
2476
2485
// and fits better, also TEXT_OFFSET_X is always 0
2477
2486
rect += core::dimension2d<s32>(
2478
2487
skin->getSize (irr::gui::EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X),
2479
2488
skin->getSize (irr::gui::EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y));
2489
+ #endif
2480
2490
}
2481
2491
video::SColor color (255 , 255 , 255 , 255 );
2482
2492
m_font->draw (spec.text .c_str (), rect, color, true , true , &rect);
0 commit comments