Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6362 for code


Ignore:
Timestamp:
Dec 16, 2009, 12:35:48 PM (15 years ago)
Author:
scheusso
Message:

joystick names are pretty now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/data/gui/scripts/KeyBindMenu.lua

    r6355 r6362  
    109109    elseif( group == "MouseButtons") then
    110110        return "Mouse " .. name
     111    elseif( string.find(group, "JoyStickButtons") ~= nil ) then
     112        return "Joystick " .. name
     113    elseif( string.find(group, "JoyStickAxes") ~= nil ) then
     114        return "Joystick Axis" .. string.sub(name, 5, 6) .. string.sub(name, string.find(name, 'Axis%d%d(.*)')+6)
    111115    elseif( group == "MouseAxes" ) then
    112         return "Mouse " .. string.sub(name, string.find(name, '.(.*)')+1) .. " " .. string.sub(name, 1, 1) .. "-Axes"
     116        return "Mouse " .. string.sub(name, string.find(name, '.(.*)')+1) .. " " .. string.sub(name, 1, 1) .. "-Axis"
    113117    end
    114118    return key
Note: See TracChangeset for help on using the changeset viewer.