From 013cde8a28774f92dd3921e386ffbc00accfe598 Mon Sep 17 00:00:00 2001 From: Xottab-DUTY Date: Mon, 13 May 2019 12:51:39 +0500 Subject: [PATCH] xrUICore/SpinBox/UICustomSpin.cpp: support old style spinbox (#382 and most likely #392) --- src/xrUICore/SpinBox/UICustomSpin.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/xrUICore/SpinBox/UICustomSpin.cpp b/src/xrUICore/SpinBox/UICustomSpin.cpp index b60e9b99a47..3c950a18c7e 100644 --- a/src/xrUICore/SpinBox/UICustomSpin.cpp +++ b/src/xrUICore/SpinBox/UICustomSpin.cpp @@ -51,14 +51,20 @@ void CUICustomSpin::InitSpin(Fvector2 pos, Fvector2 size) m_pFrameLine->SetWndPos(Fvector2().set(0, 0)); m_pFrameLine->SetWndSize(Fvector2().set(size.x, SPIN_HEIGHT)); - m_pFrameLine->InitTexture("ui_inGame2_spin_box", "hud" DELIMITER "default"); + + if (!m_pFrameLine->InitTexture("ui_inGame2_spin_box", "hud" DELIMITER "default", false)) + m_pFrameLine->InitTexture("ui_spiner", "hud" DELIMITER "default", false); m_pBtnUp->InitButton(Fvector2().set(size.x - BTN_SIZE_X - 2.0f, 1.0f), Fvector2().set(BTN_SIZE_X, BTN_SIZE_Y)); - m_pBtnUp->InitTexture("ui_inGame2_spin_box_button_top"); + + if (!m_pBtnUp->InitTexture("ui_inGame2_spin_box_button_top", false)) + m_pBtnUp->InitTexture("ui_spiner_button_t", false); m_pBtnDown->InitButton( Fvector2().set(size.x - BTN_SIZE_X - 2.0f, BTN_SIZE_Y + 2.0f), Fvector2().set(BTN_SIZE_X, BTN_SIZE_Y)); - m_pBtnDown->InitTexture("ui_inGame2_spin_box_button_bottom"); + + if (!m_pBtnDown->InitTexture("ui_inGame2_spin_box_button_bottom", false)) + m_pBtnDown->InitTexture("ui_spiner_button_b", false); m_pLines->m_wndPos.set(Fvector2().set(0, 0)); m_pLines->m_wndSize.set(Fvector2().set(size.x - BTN_SIZE_X - 10.0f, SPIN_HEIGHT));