Skip to content

v1.65 #34

Merged
merged 1 commit into from Apr 28, 2012
View
BIN VeggieTales/VeggieTales.exe
Binary file not shown.
View
18 VeggieTales/luaScripts/UITest.lua.example
@@ -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
Something went wrong with that request. Please try again.