• Halp, i cant figure this out!
    6 replies, posted
quick question so i've been working at this weapon wheel idea of mine replacing the Q menu for my game mode, so ive made so it apears but heres what i wondered if yo could help me with, I want it( each section of the weapon wheel) to detect the mouse above it so i can do some other things, but I can't figure out how, any help appreiciated :) any extra info needed I'd be glad to give! thanks in advance!
[url]http://wiki.garrysmod.com/page/Panel/IsHovered[/url] Is that what you want?
If you couldn't figure out this bit, I wouldn't bother.
[QUOTE=Pandaman09;47160660][url]http://wiki.garrysmod.com/page/Panel/IsHovered[/url] Is that what you want?[/QUOTE] No see I need as soon as the player cursor is over the element to call a event, I tried "isHovered" but hat has to be called but something its not triggered by the cursor :P
[QUOTE=Hoodiecraft;47159772] I've been working on this idea of mine: a weapon wheel that replaces the spawn menu for my gamemode. I've made it so it appears, but here's what I can't figure out: I want each section of the weapon wheel to detect the mouse (?) above it so I can do some other things. Any help is appreciated! :) [/QUOTE] Here's what I could interpret from that: So you want something like this: [weapon 2] - > [weapon 3] < - [weapon 4] and you can scroll through it and choose one or something? Well, you could store them all in a table, get the index of the selected one, then index the table with that number - 1 (you'd have to make sure if it's less than 1 it wraps)
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PANEL/OnCursorEntered]PANEL/OnCursorEntered[/url] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PANEL/OnCursorExited]PANEL/OnCursorExited[/url]
[QUOTE=zerf;47160999]Here's what I could interpret from that: So you want something like this: [weapon 2] - > [weapon 3] < - [weapon 4] and you can scroll through it and choose one or something? Well, you could store them all in a table, get the index of the selected one, then index the table with that number - 1 (you'd have to make sure if it's less than 1 it wraps)[/QUOTE] thanks but I already have that done it not with the mouse wheel its with the coursor([url]http://steamcommunity.com/id/cosmicfloppydisk/screenshot/28482658919768359[/url]) and I need to detect the mouse immediately upon touch a section [editline]17th February 2015[/editline] [QUOTE=PortalGod;47161027][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PANEL/OnCursorEntered]PANEL/OnCursorEntered[/url] [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/PANEL/OnCursorExited]PANEL/OnCursorExited[/url][/QUOTE] I didn't know those existed thanks ill try those :)
Sorry, you need to Log In to post a reply to this thread.