tweak text bubble widget so that the text cannot go too close to the right edge of the widget

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5906 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2010-09-06 17:50:29 +00:00
parent 381ac727b0
commit bc7f48d5e5
3 changed files with 3 additions and 2 deletions

View File

@@ -1639,7 +1639,7 @@ void Skin::draw3DSunkenPane (IGUIElement *element, video::SColor bgcolor, bool f
// minor adjustments...
rect2.UpperLeftCorner.X -= 7;
//rect2.LowerRightCorner.X -= 15;
rect2.LowerRightCorner.X += BUBBLE_MARGIN_ON_RIGHT;
if (bubble->isFocusedForPlayer(PLAYER_ID_GAME_MASTER))
drawBoxFromStretchableTexture(widget, rect2, SkinConfig::m_render_params["textbubble::focused"]);

View File

@@ -34,7 +34,7 @@ BubbleWidget::BubbleWidget() : Widget(WTYPE_BUBBLE)
void BubbleWidget::add()
{
m_shrinked_size = rect<s32>(m_x, m_y, m_x + m_w, m_y + m_h);
m_shrinked_size = rect<s32>(m_x, m_y, m_x + m_w - BUBBLE_MARGIN_ON_RIGHT, m_y + m_h);
stringw message = getText();
EGUI_ALIGNMENT align = EGUIA_UPPERLEFT;

View File

@@ -23,6 +23,7 @@
namespace GUIEngine
{
const int BUBBLE_MARGIN_ON_RIGHT = 15;
class BubbleWidget : public Widget
{