Thread: Radial Menu
View Single Post
Old 01-20-2017, 02:49 PM   #27
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,593
Default

Ok I've found perfect solution for dead center menu that I very much love ,option to set center menu:
the code that drives it (also fixed that issue where center was always selecting last menu like you sayed)
Code:
if mouse_r < 32 then
    if cur_depth ~= 0 then
      mouse_mnu = -1 mnu_clicked = -1
    else
      if def_center_menu then
        mouse_mnu , mnu_clicked = def_center_menu,def_center_menu
      else
        mouse_mnu = -1 mnu_clicked = -1
      end
    end    
  else
    mnu_clicked = mouse_mnu  % (#mnu_arr[cur_depth] + 1)
  end

I'm weird I know but I like me

oh and btw

its little cpu hogy

edit: nevermind simple fix
Code:
if mouse_mnu ~= last_mouse_mnu then
  draw_mnu()
  last_mouse_mnu = mouse_mnu
end
minimal now

Last edited by Sexan; 01-20-2017 at 04:21 PM.
Sexan is online now   Reply With Quote