mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Re-add "long tap to punch" as a client-side setting
This commit is contained in:
parent
e8a8525bcd
commit
517f1602aa
8 changed files with 54 additions and 19 deletions
|
@ -30,10 +30,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "texture_override.h" // TextureOverride
|
||||
#include "tool.h"
|
||||
#include "util/pointabilities.h"
|
||||
#include "util/pointedthing.h"
|
||||
|
||||
class IGameDef;
|
||||
class Client;
|
||||
struct ToolCapabilities;
|
||||
struct PointedThing;
|
||||
#ifndef SERVER
|
||||
#include "client/texturesource.h"
|
||||
struct ItemMesh;
|
||||
|
@ -57,6 +58,7 @@ enum TouchInteractionMode : u8
|
|||
{
|
||||
LONG_DIG_SHORT_PLACE,
|
||||
SHORT_DIG_LONG_PLACE,
|
||||
TouchInteractionMode_USER, // Meaning depends on client-side settings
|
||||
TouchInteractionMode_END, // Dummy for validity check
|
||||
};
|
||||
|
||||
|
@ -67,7 +69,9 @@ struct TouchInteraction
|
|||
TouchInteractionMode pointed_object;
|
||||
|
||||
TouchInteraction();
|
||||
TouchInteractionMode getMode(const PointedThing &pointed) const;
|
||||
// Returns the right mode for the pointed thing and resolves any occurrence
|
||||
// of TouchInteractionMode_USER into an actual mode.
|
||||
TouchInteractionMode getMode(PointedThingType pointed_type) const;
|
||||
void serialize(std::ostream &os) const;
|
||||
void deSerialize(std::istream &is);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue