From 289705daaf2986cedd0a1ae994aeda73c4b4249e Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 25 May 2015 21:59:44 +0200 Subject: input: allow - as separator between commands, instead of _ Wnile it seems quite logical to me that commands use _ as word separator, while properties use -, I can't really explain the difference, and it tends to confuse users as well. So always prefer - as separator for everything. Using _ still works, and will probably forever. Not doing so would probably create too much chaos and confusion. --- player/lua/defaults.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'player/lua/defaults.lua') diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 265463a8f3..2ecb83fb77 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -89,7 +89,7 @@ function mp.set_key_bindings(list, section, flags) cb() end end - cfg = cfg .. key .. " script_binding " .. + cfg = cfg .. key .. " script-binding " .. mp.script_name .. "/" .. mangle .. "\n" else cfg = cfg .. key .. " " .. cb .. "\n" @@ -187,7 +187,7 @@ local function add_binding(attrs, key, name, fn, rp) end msg_cb = fn end - attrs.bind = bind .. " script_binding " .. mp.script_name .. "/" .. name + attrs.bind = bind .. " script-binding " .. mp.script_name .. "/" .. name attrs.name = name key_bindings[name] = attrs update_key_bindings() @@ -464,7 +464,7 @@ function mp.osd_message(text, duration) else duration = tostring(math.floor(duration * 1000)) end - mp.commandv("show_text", text, duration) + mp.commandv("show-text", text, duration) end local hook_table = {} @@ -475,7 +475,7 @@ local function hook_run(id, cont) if fn then fn() end - mp.commandv("hook_ack", cont) + mp.commandv("hook-ack", cont) end function mp.add_hook(name, pri, cb) @@ -485,7 +485,7 @@ function mp.add_hook(name, pri, cb) end local id = #hook_table + 1 hook_table[id] = cb - mp.commandv("hook_add", name, id, pri) + mp.commandv("hook-add", name, id, pri) end local mp_utils = package.loaded["mp.utils"] -- cgit v1.2.3