Better UI scaling, quest tweaking, contentpackage hash bugfix, misc bugfixes

This commit is contained in:
Regalis
2015-07-30 23:28:15 +03:00
parent c7dd6e55f0
commit 23d847a4ac
29 changed files with 287 additions and 138 deletions
+22
View File
@@ -42,6 +42,14 @@ namespace Subsurface
set;
}
public string ToolTip
{
get;
set;
}
private GUITextBlock toolTipBlock;
//protected float alpha;
public GUIComponent Parent
@@ -222,6 +230,20 @@ namespace Subsurface
//DrawChildren(spriteBatch);
}
public void DrawToolTip(SpriteBatch spriteBatch)
{
int width = 200;
if (toolTipBlock==null || (string)toolTipBlock.userData != ToolTip)
{
string wrappedText = ToolBox.WrapText(ToolTip, width, GUI.SmallFont);
toolTipBlock = new GUITextBlock(new Rectangle(0,0,width, wrappedText.Split('\n').Length*15), ToolTip, GUI.style, null, true);
toolTipBlock.userData = ToolTip;
}
toolTipBlock.rect = new Rectangle((int)PlayerInput.MousePosition.X, (int)PlayerInput.MousePosition.Y, toolTipBlock.rect.Width, toolTipBlock.rect.Height);
toolTipBlock.Draw(spriteBatch);
}
public virtual void Update(float deltaTime)
{
if (CanBeFocused)