News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Pages (2): « First [1] 2 Next > Last »
Search Results
Post Author Forum Replies Views Posted []
  Thread: Using callbacks to move objects on the screen
Post: Using callbacks to move objects on the screen

I am brand new to lua and new to fltk/fluid, so expect dumb questions from me. I find this stuff highly interesting and full of promises ;-). So, I decided to try and learn it to see what is possible....
widged MurgaLua - General 10 16,392 05-26-2007, 03:45 AM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

Reading [url=/forum/showthread.php?tid=18]tobi's post[/url] that mentions a change from "->" to ":" that isn't applied, I gave a try to [code]green_left:position(green_left_x:value(),35);[/code] Work...
widged MurgaLua - General 10 16,392 05-26-2007, 04:07 AM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

Is it possible to have a drag and drop functionality? I can see an example at [url=http://seriss.com/people/erco/fltk/#DraggableBoxes]fltk cheat sheets - Draggable boxes[/url] How to detect and rea...
widged MurgaLua - General 10 16,392 05-26-2007, 04:20 AM
  Thread: animations in murgalua
Post: animations in murgalua

Having a go at this. Read the Lua 5.0 manual.. nice language! Problem is this is my first lua program. What I tried to do was rewrite a nice little script to move a sprite along a bezier line I wrote ...
widged MurgaLua - General 10 25,417 05-28-2007, 09:16 AM
  Thread: animations in murgalua
Post: RE: animations in murgalua

Bill (igame3D) provided the solution: [code]function animate_callback(object)       repeat         Fl:wait(.05);         coroutine.resume(anim)         window:redraw();       until coroutine....
widged MurgaLua - General 10 25,417 05-28-2007, 10:28 AM
  Thread: animations in murgalua
Post: RE: animations in murgalua

Okay, I don't need the coroutine business anymore. I only need a call [code]    run_anim(sprite,points) [/code] and a function [code]function run_animate(sprite,points)     local pos = {} ...
widged MurgaLua - General 10 25,417 05-28-2007, 10:36 AM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

Thanks Bill, that's spiffy stuff! Bill provided me with the code (from mikshaw, I assume), I only had to modify a few lines. It can be useful to know that thing = the crosshair widget. To see i...
widged MurgaLua - General 10 16,392 06-02-2007, 03:44 AM
  Thread: Windows position
Post: RE: Windows position

[quote=chrimo] Hi, I try it the same way :D Learning by doing. I've started a small project of Roboter-Simulation. Currently I'm using a Lego Mindstorms NXT Robot with pbLua-OS and try to write a ...
widged MurgaLua - General 17 27,785 06-02-2007, 03:49 AM
  Thread: Demo files
Post: Demo files

Perhaps a bit too early as murgalua is still undergoing testing... but this was easy to set up. A [url=http://www.widged.com/murgalua/gallery/]MurgaLua Gallery[/url] has been created. The gallery i...
widged MurgaLua - General 2 4,927 06-03-2007, 01:07 AM
  Thread: Different redraw behaviors with different box types
Post: Different redraw behaviors with different box type...

Take this (the clock test code provided by Mikshaw) [code]-- Demonstration of clock widget -- Code by mikshaw (http://damnsmalllinux.org/cgi-bin/forums/ikonboard.cgi) ww=180 --window width wh=20...
widged MurgaLua - General 6 11,605 06-03-2007, 02:22 AM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

[quote=widged]There shouldn't be the need for two square_cb functions... [/quote] Learning the basics of Lua. [code]square2:callback(square2_cb)[/code] is in fact equivalent to [code]squa...
widged MurgaLua - General 10 16,392 06-03-2007, 03:33 AM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

which allows to rewrite the code to be more generic: [code]------------ ww=350 --window (width and height) wh=400 fw = ww-20 -- frame fh = ww-20 dw = fw-10 -- drag and drop area dh = fw-10 ...
widged MurgaLua - General 10 16,392 06-03-2007, 04:26 AM
  Thread: group demo
Post: group demo

Peeking at some of mikshaw scripts, it seems that the syntax to define groups is something of the like: [code]ww=180 --window dims wh=200 gw=ww-20 -- group dims gh=wh-50 w=fltk:Fl_Window(ww,...
widged MurgaLua - General 3 6,250 06-05-2007, 10:21 PM
  Thread: Different redraw behaviors with different box types
Post: RE: Different redraw behaviors with different box ...

[quote=mikshaw] You could emulate no box by using FL_FLAT_BOX and set its color according to what its parent is. [/quote] Thanks for the tip. Unfortunately, what I was trying to achieve was to di...
widged MurgaLua - General 6 11,605 06-05-2007, 10:39 PM
  Thread: drawing graphics in murgaLua
Post: drawing graphics in murgaLua

After reading [url=http://embedded.centurysoftware.com/docs/nx/fltk-drawing-functions.html]information on drawing functions[/url], I tried this [code]ww=180 --window width wh=200 --window height ...
widged MurgaLua - General 16 29,661 06-05-2007, 11:01 PM
  Thread: Demo files
Post: RE: Demo files

Consider it as a thanks for your hard work ;-).
widged MurgaLua - General 2 4,927 06-05-2007, 11:06 PM
  Thread: group demo
Post: RE: group demo

Better UI Replace this: [code]but_show = fltk:Fl_Button(10,wh-30,50,22,"show"); but_show:callback(function()   group:show() end) but_hide = fltk:Fl_Button(75,wh-30,50,22,"hide"); but_hid...
widged MurgaLua - General 3 6,250 06-05-2007, 11:20 PM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

[quote=JohnMurga] OK, I'll have to think about how to implement the "handle" functionality. [/quote] A quick hack, this will react to the button being pressed down as well as up. These fltk const...
widged MurgaLua - General 10 16,392 06-05-2007, 11:42 PM
  Thread: Using callbacks to move objects on the screen
Post: RE: Using callbacks to move objects on the screen

to know if the mouse is up or down: [code]but = fltk:Fl_Button(10,wh-30,80,22,"a button"); but:when(1); but:callback(function(self)   message = "down"   if (Fl:event() == 2) then message ="up...
widged MurgaLua - General 10 16,392 06-06-2007, 12:29 AM
  Thread: Windows position
Post: RE: Windows position

[quote=chrimo]I've finished today my working NXTLuaSim and I'd like to give it away :D Problem: I'm no Software Developer and the code is extrem ugly and should be reviewed and cleaned before using it...
widged MurgaLua - General 17 27,785 06-06-2007, 12:54 AM
Pages (2): « First [1] 2 Next > Last »