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.


Post Reply  Post Thread 
Fluid to lua converter
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: Fluid to lua converter

Quote:
I guess you are talking about C++ experiments?

No, I'm not yet what I consider a programmer. I learned limited scripting in various languages out of necessity...initially for job security and then from need to have control of my operating system. That has spilled into using Lua for fun and education, but I still have much to learn about the fundamentals of programming in general.
Anyway...when I mentioned pointers I was talking about the find_item() method.

This is the sort of thing I was talking about:

Code:
function menu_callback()
if menu2:text()=="&disable item3" then toggle_item:deactivate()
elseif menu2:text()=="&enable item3" then toggle_item:activate()
end
menu1:redraw()
end

window = fltk:Fl_Window(400, 200, "menu test")
main_menu=fltk:Fl_Menu_Button(0,0,0,0)
menu1=fltk:Fl_Menu_Bar(0,0,400,30)
menu2=fltk:Fl_Menu_Bar(0,40,400,30)

main_menu:add("menu1/item1")
main_menu:add("menu1/item2")
main_menu:add("menu1/&item3/item3a")
main_menu:add("menu1/&item3/item3b")
main_menu:add("menu1/item4")
main_menu:add("menu2/&File/item5")
main_menu:add("menu2/&File/item6")
main_menu:add("menu2/&File/item7")
main_menu:add("menu2/&File/&enable item3")
main_menu:add("menu2/&File/&disable item3")

menu1menu=main_menu:find_item("menu1/item1")
menu2menu=main_menu:find_item("menu2/&File")
menu1:menu(menu1menu)
menu2:menu(menu2menu)
toggle_item=menu1:find_item("&item3")
menu2:callback(menu_callback)
window:show()
Fl:run()

When using add() to multiple menu bars, they basically all stopped responding.

02-08-2008 10:55 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Fluid to lua converter - Tobi - 12-19-2007, 07:55 AM
RE: Fluid to lua converter - iGame3D - 12-19-2007, 12:33 PM
RE: Fluid to lua converter - Tobi - 12-20-2007, 01:38 AM
RE: Fluid to lua converter - xleitex - 12-24-2007, 07:06 AM
RE: Fluid to lua converter - iGame3D - 12-26-2007, 11:16 AM
RE: Fluid to lua converter - Tobi - 12-27-2007, 09:52 PM
RE: Fluid to lua converter - Tobi - 01-29-2008, 08:14 AM
Fluid to lua converter update - iGame3D - 02-06-2008, 09:33 AM
RE: Fluid to lua converter - JohnMurga - 02-06-2008, 08:15 PM
RE: Fluid to lua converter - Tobi - 02-08-2008, 01:50 AM
RE: Fluid to lua converter - Juergen - 02-08-2008, 03:40 AM
RE: Fluid to lua converter - mikshaw - 02-08-2008, 07:23 AM
RE: Fluid to lua converter - Juergen - 02-08-2008, 09:15 AM
RE: Fluid to lua converter - mikshaw - 02-08-2008 10:55 AM
RE: Fluid to lua converter - iGame3D - 02-15-2008, 02:30 PM
RE: Fluid to lua converter - Tobi - 04-23-2008, 04:35 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: