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 
[WIP] MurgaLua Reference Tool
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: [WIP] MurgaLua Reference Tool - a little help?

Update:
Replacing my_menu:add("menu item") with an Fl_Menu_Item array seems like it *should* work. It no longer causes trouble for the main menu, but I can't figure out how to create the menu item array.

According to the FLTK docs (Fl_Menu_Item), it looks like a fairly simple table, but when I try to use my_menu:menu(my_array) it doesn't seem to do anything. The FLTK docs calls the array a "structure", however, which makes me wonder. I don't know what a structure is, or whether it can be created in Lua.

I've tried this:

Code:
menuitems={
        "FL_ALIGN_CENTER",
        "FL_ALIGN_TOP",
        "FL_ALIGN_BOTTOM",
        "FL_ALIGN_LEFT",
        "FL_ALIGN_TOP_LEFT",
        "FL_ALIGN_BOTTOM_LEFT",
        "FL_ALIGN_RIGHT",
        "FL_ALIGN_TOP_RIGHT",
        "FL_ALIGN_BOTTOM_RIGHT",
        "FL_ALIGN_INSIDE",
        "FL_ALIGN_TEXT_OVER_IMAGE",
        "FL_ALIGN_CLIP",
        "FL_ALIGN_WRAP",
}

and this:

Code:
menuitems={
        {"FL_ALIGN_CENTER"},
        {"FL_ALIGN_TOP"},
        {"FL_ALIGN_BOTTOM"},
        {"FL_ALIGN_LEFT"},
        {"FL_ALIGN_TOP_LEFT"},
        {"FL_ALIGN_BOTTOM_LEFT"},
        {"FL_ALIGN_RIGHT"},
        {"FL_ALIGN_TOP_RIGHT"},
        {"FL_ALIGN_BOTTOM_RIGHT"},
        {"FL_ALIGN_INSIDE"},
        {"FL_ALIGN_TEXT_OVER_IMAGE"},
        {"FL_ALIGN_CLIP"},
        {"FL_ALIGN_WRAP"},
        {0}
}

and this:

Code:
menuitems={
        {"FL_ALIGN_CENTER", 0, 0, 0, 0},
        {"FL_ALIGN_TOP", 0, 0, 0, 0},
        {"FL_ALIGN_BOTTOM", 0, 0, 0, 0},
        {"FL_ALIGN_LEFT", 0, 0, 0, 0},
        {"FL_ALIGN_TOP_LEFT", 0, 0, 0, 0},
        {"FL_ALIGN_BOTTOM_LEFT", 0, 0, 0, 0},
        {"FL_ALIGN_RIGHT", 0, 0, 0, 0},
        {"FL_ALIGN_TOP_RIGHT", 0, 0, 0, 0},
        {"FL_ALIGN_BOTTOM_RIGHT", 0, 0, 0, 0},
        {"FL_ALIGN_INSIDE", 0, 0, 0, 0},
        {"FL_ALIGN_TEXT_OVER_IMAGE", 0, 0, 0, 0},
        {"FL_ALIGN_CLIP", 0, 0, 0, 0},
        {"FL_ALIGN_WRAP", 0, 0, 0, 0},
        {0}
}

and none work. I have no idea what else can be tried.

Update:
I found a semi-adequate solution that at least allows me to modify the appearance of existing menu items in a multi-menu script:
http://www.murga-projects.com/forum/show...hp?tid=154

This post was last modified: 08-18-2007 01:48 AM by mikshaw.

08-17-2007 05:49 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
[WIP] MurgaLua Reference Tool - mikshaw - 07-10-2007, 05:00 PM
RE: [WIP] MurgaLua Reference Tool - a little help? - mikshaw - 08-17-2007 05:49 AM

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

Forum Jump: