var searchIndex = {}; searchIndex["rebind"] = {"doc":"rebind\n======","items":[[3,"RebindBuilder","rebind","Convenience object for constructing an InputMap.",null,null],[3,"ButtonTuple","","A three-element tuple of `Option<Button>`. For simplicity, a maximum number of 3\nbuttons can be bound to each action, and this is exposed through the `InputRebind`\nstruct.",null,null],[12,"0","","",0,null],[12,"1","","",0,null],[12,"2","","",0,null],[3,"ButtonTupleIter","","An iterator over a ButtonTuple.",null,null],[3,"InputTranslator","","An object which translates piston::input::Input events into input_map::Translated<A> events",null,null],[3,"InputRebind","","An interface for rebinding keys to actions. This is freely convertable to and\nfrom an InputTranslator.",null,null],[4,"Translated","","A translated action.",null,null],[13,"Press","","A keypress event which was bound to an action",1,null],[13,"Release","","A key release event which was bound to an action",1,null],[13,"Move","","A translated mouse motion. The logical origin of a translated MouseCursor event\nis in the top left corner of the window, and the logical scroll is non-natural.\nRelative events are unchanged for now.",1,null],[11,"new","","Creates a new `RebindBuilder` with the specified viewport size.",2,{"inputs":[{"name":"s"}],"output":{"name":"self"}}],[11,"x_scroll_inverted","","Set whether the x scroll is inverted on the builder.",2,null],[11,"get_x_scroll_inverted","","Returns true if the x scroll is inverted on the builder.",2,null],[11,"y_scroll_inverted","","Set whether the y scroll is inverted on the builder.",2,null],[11,"get_y_scroll_inverted","","Returns true if the y scroll is inverted on the builder.",2,null],[11,"x_motion_inverted","","Set whether the x axis motion is inverted on the builder.",2,null],[11,"get_x_motion_inverted","","Returns true if the x axis motion is inverted on the builder.",2,null],[11,"y_motion_inverted","","Set whether the y axis motion is inverted on the builder.",2,null],[11,"get_y_motion_inverted","","Returns true if the y axis motion is inverted on the builder.",2,null],[11,"mouse_sensitivity","","Set the mouse sensitivity.",2,null],[11,"get_mouse_sensitivity","","Returns the mouse sensitivity.",2,null],[11,"viewport_size","","Sets the viewport size used for mouse position calculations.",2,null],[11,"get_viewport_size","","Returns the currently set viewport size.",2,null],[11,"with_action_mapping","","Add an association between the Button and Action.",2,null],[11,"build_translator","","Creates an `InputTranslator` from this builder object.",2,null],[11,"build_rebind","","Creates an `InputRebind` from this builder object.",2,null],[11,"default","","",2,{"inputs":[],"output":{"name":"self"}}],[11,"into","","",2,null],[11,"into","","",2,null],[8,"Action","","Represents a logical action to be bound to a particular button press, e.g.\njump, attack, or move forward. Needs to be hashable, as it is used as a\nlookup key when rebinding an action to a different button.",null,null],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"hash","","",0,null],[11,"default","","",0,{"inputs":[],"output":{"name":"buttontuple"}}],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"new","","Creates a new tuple with no buttons in it (equivalent to `Default::default()`).",0,{"inputs":[],"output":{"name":"self"}}],[11,"contains","","Check if the button is in the tuple.",0,null],[11,"insert_inplace","","Insert a button into the tuple if there is room, searching from left to right.\nIf the button is inserted, returns true. Otherwise, if the button is not inserted,\nthis function returns false.",0,null],[11,"max_buttons","","Get the maximum number of buttons which this tuple can contain.",0,null],[11,"num_buttons_set","","Returns the number of buttons in the ButtonTuple which are not `None`.",0,null],[11,"iter","","Returns an iterator over this tuple.",0,null],[11,"into_iter","","",0,null],[11,"next","","",3,null],[11,"len","","",3,null],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"fmt","","",4,null],[11,"clone","","",4,null],[11,"new","","Creates an empty InputTranslator.",4,{"inputs":[{"name":"s"}],"output":{"name":"self"}}],[11,"translate","","Translate an Input into a Translated<A> event. Returns `None` if there is no\naction associated with the `Input` variant.",4,null],[11,"set_size","","Re-set the mouse bounds size used for calculating mouse events",4,null],[11,"set_size_from_viewport","","Re-set the mouse bounds size from a viewport",4,null],[11,"into_rebind","","Convert the `InputTranslator` into an `InputRebind`. Consumes the\n`InputTranslator`.",4,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"fmt","","",5,null],[11,"clone","","",5,null],[11,"new","","Creates a new InputRebind with no stored Action/ButtonTuple pairs.",5,{"inputs":[{"name":"s"}],"output":{"name":"self"}}],[11,"insert_action","","Insert an Action into this InputRebind. If the Action is already in the\nInputRebind, then its ButtonTuple will be reset to (None, None, None), and\nthe old ButtonTuple will be returned.",5,null],[11,"insert_action_with_buttons","","Insert an Action into this InputRebind, and assign it to the ButtonTuple.\nIf the Action is already in the InputRebind, the old ButtonTuple will be\nreturned.",5,null],[11,"get_bindings","","Return a reference to the current ButtonTuple stored for an action. If the action\nis not stored in this InputRebind, then `None` will be returned.",5,null],[11,"get_bindings_mut","","Returns a mutable reference to the current ButtonTuple stored for an action. If the\naction is not stored in this InputRebind, then `None` will be returned.",5,null],[11,"get_x_scroll_inverted","","Returns whether mouse scroll along the x axis is inverted.",5,null],[11,"set_x_scroll_inverted","","Set whether mouse scroll along the x axis is inverted.",5,null],[11,"get_y_scroll_inverted","","Returns whether mouse scroll along the y axis is inverted.",5,null],[11,"set_y_scroll_inverted","","Set whether mouse scroll along the y axis is inverted.",5,null],[11,"get_x_motion_inverted","","Returns whether mouse motion along the x axis is inverted.",5,null],[11,"set_x_motion_inverted","","Set whether mouse motion along the x axis is inverted.",5,null],[11,"get_y_motion_inverted","","Returns whether mouse scroll along the y axis is inverted.",5,null],[11,"set_y_motion_inverted","","Set whether mouse scroll along the y axis is inverted.",5,null],[11,"get_viewport_size","","Returns the viewport size used for calculating mouse positions.",5,null],[11,"set_viewport_size","","Set the viewport size used for calculating mouse positions.",5,null],[11,"into_translator","","Convert the `InputRebind` into an `InputTranslator`. Consumes the\n`InputRebind`.",5,null],[11,"default","","",5,{"inputs":[],"output":{"name":"self"}}],[11,"into","","",5,null],[11,"into","","",4,null]],"paths":[[3,"ButtonTuple"],[4,"Translated"],[3,"RebindBuilder"],[3,"ButtonTupleIter"],[3,"InputTranslator"],[3,"InputRebind"]]}; initSearch(searchIndex);