diff --git a/adapted_group_monitor_gmcp.xml b/adapted_group_monitor_gmcp.xml index 4cb6ed1..a6a2342 100644 --- a/adapted_group_monitor_gmcp.xml +++ b/adapted_group_monitor_gmcp.xml @@ -510,143 +510,45 @@ function validate_percent(input) end function right_click_menu () - return false - -- menustring ="!Change Font|>Show Players|"..((show_self==1 and "+") or "").."Include Self|All Others|No Others|-|" - -- local member_count = 0 - -- local member_names = {} - -- if full_group_data and full_group_data.members and char_data and char_data.name then - -- for i,v in ipairs(full_group_data.members) do - -- if v.name ~= char_data.name then - -- menustring = menustring..(((hidden_members[v.name] == nil) and "+") or "")..v.name.."|" - -- member_count = member_count + 1 - -- table.insert(member_names, v.name) - -- end - -- end - -- end - -- menustring = menustring.."<|-|>Configure Colors|>Health|Main|Border|<|>Mana|Main|Border|<|>Moves|Main|Border|<|>Align|Evil|Good|<|<|>Show Info|"..((show_hp==1 and "+") or "").."Health|"..((show_mn==1 and "+") or "").."Mana|"..((show_mv==1 and "+") or "").."Moves|<|"..((flat_gauges==1 and "+") or "").."Use Flat Gauges|"..((overlay_numbers==1 and "+") or "").."Overlay Numbers|>HP Thresholds|>First|"..(((thresh1active == 1) and "+") or "").."Activate|Set Percent ("..thresh1percent.."%)|Set Color ("..RGBColourToName(thresh1color)..")|<|>Second|"..(((thresh2active == 1) and "+") or "").."Activate|Set Percent ("..thresh2percent.."%)|Set Color ("..RGBColourToName(thresh2color)..")|<|<|-|Bring To Front|Send To Back|-|Reset Defaults" - -- result = WindowMenu (win, - -- WindowInfo (win, 14), -- x position - -- WindowInfo (win, 15), -- y position - -- menustring) -- content - - -- if result ~= "" then - -- numResult = tonumber(result) - -- if numResult == 1 then - -- -- change font - -- wanted_font = utils.fontpicker (font_name, font_size) --font dialog - -- if wanted_font then - -- font_name = wanted_font.name - -- font_size = wanted_font.size - -- end - -- elseif numResult == 2 then - -- -- show/hide self - -- show_self = (((show_self == 0) and 1) or 0) - -- if (show_self == 0) then - -- ColourNote("yellow", "", "You will no longer see your own status in the group monitor.") - -- else - -- ColourNote("yellow", "", "You will now see your own status in the group monitor.") - -- end - -- elseif numResult == 3 then - -- -- remove all from the hidden list - -- hidden_members = {} - -- elseif numResult == 4 then - -- -- add all to the hidden list - -- hideAllMembers() - -- elseif numResult >= 5 and numResult <= member_count+4 then - -- -- add/remove members in the hidden list - -- local adjustedNumResult = numResult - 4 - -- hidden_members[member_names[adjustedNumResult]] = (((hidden_members[member_names[adjustedNumResult]]== nil) and true) or nil) - -- elseif numResult >= member_count+5 and numResult <= member_count+12 then - -- -- change color settings - -- local adjustedNumResult = numResult-member_count-4 - -- local colourIndex = 2 - -- if (adjustedNumResult % 2 == 1) then - -- colourIndex = 1 - -- end - -- local newcolour = PickColour (colorVals[barIndex[math.ceil(adjustedNumResult/2)]][colourIndex]) - -- if newcolour ~= -1 then - -- colorVals[barIndex[math.ceil(adjustedNumResult/2)]][colourIndex] = newcolour - -- end - -- elseif numResult == member_count+13 then - -- -- show/hide HP info - -- show_hp = (((show_hp == 0) and 1) or 0) - -- if (show_hp == 0) then - -- ColourNote("yellow", "", "You will no longer see HP info in the group monitor.") - -- else - -- ColourNote("yellow", "", "You will now see HP info in the group monitor.") - -- end - -- elseif numResult == member_count+14 then - -- -- show/hide MANA info - -- show_mn = (((show_mn == 0) and 1) or 0) - -- if (show_mn == 0) then - -- ColourNote("yellow", "", "You will no longer see MN info in the group monitor.") - -- else - -- ColourNote("yellow", "", "You will now see MN info in the group monitor.") - -- end - -- elseif numResult == member_count+15 then - -- -- show/hide MOVES info - -- show_mv = (((show_mv == 0) and 1) or 0) - -- if (show_mv == 0) then - -- ColourNote("yellow", "", "You will no longer see MV info in the group monitor.") - -- else - -- ColourNote("yellow", "", "You will now see MV info in the group monitor.") - -- end - -- elseif numResult == member_count+16 then - -- -- use flat/shaded gauges - -- flat_gauges = (((flat_gauges == 0) and 1) or 0) - -- elseif numResult == member_count+17 then - -- -- toggle overlay numbers on top of gauges - -- overlay_numbers = (((overlay_numbers == 0) and 1) or 0) - -- elseif numResult == member_count+18 then - -- thresh1active = (((thresh1active == 0) and 1) or 0) - -- elseif numResult == member_count+19 then - -- local perc = utils.inputbox( "I want the HP bars to change color when they drop below this percent...\n(enter a whole number between 1 and 100)", "Group Monitor HP Threshold #1", thresh1percent, nil, nil, {validate=validate_percent}) - -- if perc then - -- if string.sub(perc, -1) == "%" then - -- perc = string.sub(perc, 1,-2) - -- end - -- thresh1percent = tonumber(perc) - -- end - -- elseif numResult == member_count+20 then - -- local newColor = PickColour (thresh1color) - -- if newcolor ~= -1 then - -- thresh1color = newColor - -- end - -- elseif numResult == member_count+21 then - -- thresh2active = (((thresh2active == 0) and 1) or 0) - -- elseif numResult == member_count+22 then - -- local perc = utils.inputbox( "I want the HP bars to change color when they drop below this percent...\n(enter a whole number between 1 and 100)", "Group Monitor HP Threshold #2", thresh2percent, nil, nil, {validate=validate_percent}) - -- if perc then - -- if string.sub(perc, -1) == "%" then - -- perc = string.sub(perc, 1,-2) - -- end - -- thresh2percent = tonumber(perc) - -- end - -- elseif numResult == member_count+23 then - -- local newColor = PickColour (thresh2color) - -- if newcolor ~= -1 then - -- thresh2color = newColor - -- end - -- elseif numResult == member_count+24 then - -- -- bring to front - -- CallPlugin("462b665ecb569efbf261422f","boostMe", win) - -- elseif numResult == member_count+25 then - -- -- send to back - -- CallPlugin("462b665ecb569efbf261422f","dropMe", win) - -- elseif numResult == member_count+26 then - -- -- reset - -- font_name = default_font_name - -- font_size = default_font_size - -- height = default_height - -- width = default_width - -- show_coords = 0 - -- end -- if - - -- RemoveMembersFromGroupDisplay() - -- -- save and reload - -- SaveState() - -- OnPluginInstall() - -- end +-- return false + menustring ="" + local member_count = 0 + + menustring ="!Change Font|-|Bring To Front|Send To Back|-|Reset Defaults" + result = WindowMenu (win, + WindowInfo (win, 14), -- x position + WindowInfo (win, 15), -- y position + menustring) -- content + + if result ~= "" then + numResult = tonumber(result) + if numResult == 1 then + -- change font + wanted_font = utils.fontpicker (font_name, font_size) --font dialog + if wanted_font then + font_name = wanted_font.name + font_size = wanted_font.size + end + elseif numResult == 2 then + -- bring to front + CallPlugin("462b665ecb569efbf261422f","boostMe", win) + elseif numResult == 3 then + -- send to back + CallPlugin("462b665ecb569efbf261422f","dropMe", win) + elseif numResult == 4 then + -- reset + font_name = default_font_name + font_size = default_font_size + height = default_height + width = default_width + show_coords = 0 + end -- if + + RemoveMembersFromGroupDisplay() + -- save and reload + SaveState() + OnPluginInstall() + end end -- right_click_menu invitations = {}