Lua tooltips

This commit is contained in:
2012-10-17 11:27:31 +02:00
parent bcbddf1b2c
commit 00159095ed
7 changed files with 90 additions and 15 deletions
@@ -145,6 +145,12 @@
<Importer>LuaImporter</Importer>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="scripts\tooltip.lua">
<Name>tooltip</Name>
<Importer>LuaImporter</Importer>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -1,10 +1,11 @@
local frame = CreateFrame('Frame');
frame.X = 100;
frame.X = 100;
local button = CreateFrame('Button', frame);
button:SetTexture('images/Enter');
button.Width = 100;
button.Height = 50;
button.OnClick = function(clickPos)
Console.WriteLine(clickPos.X .. ' ' .. clickPos.Y);
end
button.OnClick = function(clickPos)
Console.WriteLine(clickPos.X .. ' ' .. clickPos.Y)
end
+5
View File
@@ -0,0 +1,5 @@
ToolTip = CreateFrame("Frame")
local text = CreateFrame("Text", ToolTip)
text:SetFont("Arial")
text.Value = "99%"