SphereCommunity
ADDCONTEXTENTY and "Flags" - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: ADDCONTEXTENTY and "Flags" (/Thread-ADDCONTEXTENTY-and-Flags)



ADDCONTEXTENTY and "Flags" - Gadianton - 08-29-2012 10:15 PM

Hi everybody,

I took a search to the forum and also on google, but in spite of it being said the internet cannot forget, there was no info on this issue.

I currently have the task of setting up contextmenüs for Items in our new crafting system. Putting up and evaluating Contextselections is quite straight forward, but I am a little puzzled:

The spherewiki says:

ADDCONTEXTENTRY entry_id, cliloc, flags, colour
Adds an entry to the context menu being sent to the client. Only valid in @ContextMenuRequest triggers.

Okay so far I have figured this out. Entry ID needs to be higher than 200something because the lower ones are reserved. CLILOC is clear. An ID from the CLILOC File...

Now here is the point where I am at a loss.
It mentions "flags" but there is no documentation on the values and their respective functions.
Also the "colour" parameter appears to be useless but I have found no clues on this.
Experimentally I found out that Flag 01 causes an option to be "grayed" but I am not able to get any other colors on the items.

If someone has experience or some docs on this it would help me a great deal.

Thanks in advance

Gadianton


RE: ADDCONTEXTENTY and "Flags" - Shaklaban - 08-29-2012 10:22 PM

if you set flag 01, entry is not clickable, 0 is clickable i don't try others.


RE: ADDCONTEXTENTY and "Flags" - darksun84 - 08-29-2012 11:04 PM

PHP Code:
Added: Function AddContextEntrywhat takes 2 to 4 arguments separated by a comma.
   
SRC.AddContextEntry EntryTag,TextID,Flags,Color
   EntryTag 
the number to return as ARGN by @(item)ContextMenuSelectMake it unique.
            - 
EntryTags from 0 to 100 are reserved by Sphere for internal use, so do not
              
use it.
   
TextID CLILOCed name of the buttonThe number from cliloc.[your_localization]
            
WITHOUT the leading "300" or suchJust type "5194" or "11010"
   
Flags 01 locked (will be grayed out)
         - 
02 consecutive entries with this flag set will be summarized under
                a golden arrow
         
020 can be colored
   Color 
(applied only if Flags 020) - hue 



RE: ADDCONTEXTENTY and "Flags" - Gadianton - 09-06-2012 09:50 PM

Hey thanks that helps a lot. Especially the thing about the 020 flag.

Thanks for assistance