Permalink
Browse files

Merge pull request #34 from Jimbly/master

v1.65
  • Loading branch information...
2 parents e384bdd + 10ef130 commit 1624f9a0f9b1ac3ec7b10cb37ce8ac076a574a42 @Vaevictusnet committed Apr 28, 2012
Showing with 18 additions and 0 deletions.
  1. BIN VeggieTales/VeggieTales.exe
  2. +18 −0 VeggieTales/luaScripts/UITest.lua.example
View
Binary file not shown.
@@ -16,6 +16,8 @@ function doit()
-- promptNumber() in ui_utils.inc is a good example of an EditBox and buttons and text
local value = promptNumber("Enter a number!", 777);
+
+ local from_clipboard = "Clipboard text pasted here";
-- Display the value read from the edit box
while not lsButtonText(lsScreenX - 110, lsScreenY - 30, z, 100, 0xFFFFFFff, "Done") do
@@ -26,6 +28,22 @@ function doit()
dropdown_cur_value = lsDropdown("UITestDropDown", 10, 50, z, 100, dropdown_cur_value, dropdown_values);
+ if lsButtonText(10, 100, z, 100, 0xFFFFFFff, "Paste") then
+ from_clipboard = lsClipboardGet();
+ end
+ if from_clipboard then
+ local w = lsScreenX - 120;
+ lsScrollAreaBegin("clipboard_display", 115, 100, z, w, lsScreenY - 100 - 40);
+ local sub_scale = 0.7;
+ w = w - 24; -- make room for the scroll bar
+ local h = lsPrintWrapped(0, 0, z, w, sub_scale, sub_scale, 0x808080ff, from_clipboard);
+ lsScrollAreaEnd(h);
+ end
+
+ if lsButtonText(10, 130, z, 100, 0xFFFFFFff, "Copy \"hi\"") then
+ lsClipboardSet("hi");
+ end
+
lsDoFrame();
lsSleep(10); -- Sleep just so we don't eat up all the CPU for no reason

0 comments on commit 1624f9a

Please sign in to comment.