mirror of
https://github.com/Nexoniarz/Fry3DX.git
synced 2026-11-03 04:24:26 +00:00
Shapes with live settings, shape editing, knife and hole tools, drawing shapes onto other objects, combining objects (add / subtract / overlap), copies, thickness, painting with stickers and layers, a Layout tab, a Print tab with checks, packed .fry files with autosave, export to GLB, glTF, FBX, OBJ, 3MF, STL and PLY, folders in Layers, its own crash screen, and a website for GitHub Pages in docs/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NMSrd5oe1GpUD7E6d825KP
22 lines
1,007 B
C++
22 lines
1,007 B
C++
#pragma once
|
|
// Touch controls (phones, tablets, touch screens): while you play, a stick under your left thumb
|
|
// moves, dragging on the right looks, and buttons on the right press the same "+jump",
|
|
// "+attack"... a key would. In menus, touches are taps (SDL turns them into mouse clicks).
|
|
// They show on Android, and anywhere once a finger touches the screen (touch_controls 0: never).
|
|
union SDL_Event;
|
|
|
|
namespace keel::touch {
|
|
bool active();
|
|
// inGame: playing (the mouse is captured), when touches are controls, not taps.
|
|
void handleEvent(const SDL_Event& ev, bool inGame);
|
|
// The stick: forward and sideways, -1..1.
|
|
void move(float& forward, float& side);
|
|
// Looking since the last call, in mouse pixels (so mouse sensitivity applies).
|
|
void takeLook(float& dx, float& dy);
|
|
// The pause button was pressed (once).
|
|
bool takeEscape();
|
|
// Draws the controls over the game (playing only).
|
|
void draw(bool inGame);
|
|
// Lets go of everything held (a menu opened).
|
|
void releaseAll();
|
|
} // namespace keel::touch
|