OpenSiv3D  v0.6.5
C++20 framework for creative coding
s3d::JoyCon Class Reference

#include <JoyCon.hpp>

Classes

struct  ButtonGuide
 

Public Member Functions

SIV3D_NODISCARD_CXX20 JoyCon ()=default
 
SIV3D_NODISCARD_CXX20 JoyCon (const detail::Gamepad_impl &gamepad)
 
bool isConnected () const noexcept
 
 operator bool () const noexcept
 
bool isJoyConL () const noexcept
 
bool isJoyConR () const noexcept
 
Optional< int32povD8 () const noexcept
 
const JoyCondrawShadowAt (const Vec2 &center, double size, double angle=0.0, bool covered=true, double offset=0.5, double blurRadius=1.0, double spread=0.5, const ColorF &color=ColorF{ 0.0, 0.3 }) const
 
const JoyCondrawAt (const Vec2 &center, double size, double angle=0.0, bool covered=true, const Optional< ColorF > &color=unspecified, const ColorF &colorPushed=ColorF{ 1.0, 0.8, 0.5 }) const
 
const JoyCondrawGuidedAt (const ButtonGuide &guide, const Vec2 &center, double size, double angle=0.0, bool covered=true, const Optional< ColorF > &color=ColorF{ 0.0, 0.75, 0.9 }, const ColorF &colorPushed=ColorF{ 1.0, 0.8, 0.5 }, const ColorF &guideColor=ColorF{ 1.0, 0.7, 0.6 }) const
 

Static Public Member Functions

static bool IsJoyCon (const detail::Gamepad_impl &gamepad) noexcept
 
static bool IsJoyConL (const detail::Gamepad_impl &gamepad) noexcept
 
static bool IsJoyConR (const detail::Gamepad_impl &gamepad) noexcept
 
static void DrawLShadowAt (const Vec2 &center, double size, double angle=0.0, bool covered=true, double offset=0.5, double blurRadius=1.0, double spread=0.5, const ColorF &color=ColorF{ 0.0, 0.3 })
 
static void DrawLAt (const Vec2 &center, double size, double angle=0.0, bool covered=true, const ColorF &color=ColorF{ 0.0, 0.75, 0.9 }, const ColorF &colorPushed=ColorF{ 1.0, 0.8, 0.5 })
 
static void DrawLGuidedAt (const ButtonGuide &guide, const Vec2 &center, double size, double angle=0.0, bool covered=true, const ColorF &color=ColorF{ 1.0, 0.4, 0.3 }, const ColorF &colorPushed=ColorF{ 1.0, 0.8, 0.5 }, const ColorF &guideColor=ColorF{ 1.0, 0.7, 0.6 })
 
static void DrawRShadowAt (const Vec2 &center, double size, double angle=0.0, bool covered=true, double offset=0.5, double blurRadius=1.0, double spread=0.5, const ColorF &color=ColorF{ 0.0, 0.3 })
 
static void DrawRAt (const Vec2 &center, double size, double angle=0.0, bool covered=true, const ColorF &color=ColorF{ 1.0, 0.4, 0.3 }, const ColorF &colorPushed=ColorF{ 1.0, 0.8, 0.5 })
 
static void DrawRGuidedAt (const ButtonGuide &guide, const Vec2 &center, double size, double angle=0.0, bool covered=true, const ColorF &color=ColorF{ 0.0, 0.75, 0.9 }, const ColorF &colorPushed=ColorF{ 1.0, 0.8, 0.5 }, const ColorF &guideColor=ColorF{ 1.0, 0.7, 0.6 })
 

Public Attributes

Input button0
 
Input button1
 
Input button2
 
Input button3
 
Input buttonSL
 
Input buttonSR
 
Input buttonMinus
 
Input buttonPlus
 
Input buttonStick
 
Input buttonHome
 
Input buttonScreenshot
 
Input buttonLR
 
Input buttonZLZR
 

Constructor & Destructor Documentation

◆ JoyCon() [1/2]

SIV3D_NODISCARD_CXX20 s3d::JoyCon::JoyCon ( )
default

◆ JoyCon() [2/2]

SIV3D_NODISCARD_CXX20 s3d::JoyCon::JoyCon ( const detail::Gamepad_impl &  gamepad)
explicit

Member Function Documentation

◆ drawAt()

const JoyCon& s3d::JoyCon::drawAt ( const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
const Optional< ColorF > &  color = unspecified,
const ColorF colorPushed = ColorF{ 1.0, 0.8, 0.5 } 
) const

◆ drawGuidedAt()

const JoyCon& s3d::JoyCon::drawGuidedAt ( const ButtonGuide guide,
const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
const Optional< ColorF > &  color = ColorF{ 0.0, 0.75, 0.9 },
const ColorF colorPushed = ColorF{ 1.0, 0.8, 0.5 },
const ColorF guideColor = ColorF{ 1.0, 0.7, 0.6 } 
) const

◆ DrawLAt()

static void s3d::JoyCon::DrawLAt ( const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
const ColorF color = ColorF{ 0.0, 0.75, 0.9 },
const ColorF colorPushed = ColorF{ 1.0, 0.8, 0.5 } 
)
static

◆ DrawLGuidedAt()

static void s3d::JoyCon::DrawLGuidedAt ( const ButtonGuide guide,
const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
const ColorF color = ColorF{ 1.0, 0.4, 0.3 },
const ColorF colorPushed = ColorF{ 1.0, 0.8, 0.5 },
const ColorF guideColor = ColorF{ 1.0, 0.7, 0.6 } 
)
static

◆ DrawLShadowAt()

static void s3d::JoyCon::DrawLShadowAt ( const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
double  offset = 0.5,
double  blurRadius = 1.0,
double  spread = 0.5,
const ColorF color = ColorF{ 0.0, 0.3 } 
)
static

◆ DrawRAt()

static void s3d::JoyCon::DrawRAt ( const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
const ColorF color = ColorF{ 1.0, 0.4, 0.3 },
const ColorF colorPushed = ColorF{ 1.0, 0.8, 0.5 } 
)
static

◆ DrawRGuidedAt()

static void s3d::JoyCon::DrawRGuidedAt ( const ButtonGuide guide,
const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
const ColorF color = ColorF{ 0.0, 0.75, 0.9 },
const ColorF colorPushed = ColorF{ 1.0, 0.8, 0.5 },
const ColorF guideColor = ColorF{ 1.0, 0.7, 0.6 } 
)
static

◆ DrawRShadowAt()

static void s3d::JoyCon::DrawRShadowAt ( const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
double  offset = 0.5,
double  blurRadius = 1.0,
double  spread = 0.5,
const ColorF color = ColorF{ 0.0, 0.3 } 
)
static

◆ drawShadowAt()

const JoyCon& s3d::JoyCon::drawShadowAt ( const Vec2 center,
double  size,
double  angle = 0.0,
bool  covered = true,
double  offset = 0.5,
double  blurRadius = 1.0,
double  spread = 0.5,
const ColorF color = ColorF{ 0.0, 0.3 } 
) const

◆ isConnected()

bool s3d::JoyCon::isConnected ( ) const
noexcept

◆ IsJoyCon()

static bool s3d::JoyCon::IsJoyCon ( const detail::Gamepad_impl &  gamepad)
staticnoexcept

◆ isJoyConL()

bool s3d::JoyCon::isJoyConL ( ) const
noexcept

◆ IsJoyConL()

static bool s3d::JoyCon::IsJoyConL ( const detail::Gamepad_impl &  gamepad)
staticnoexcept

◆ isJoyConR()

bool s3d::JoyCon::isJoyConR ( ) const
noexcept

◆ IsJoyConR()

static bool s3d::JoyCon::IsJoyConR ( const detail::Gamepad_impl &  gamepad)
staticnoexcept

◆ operator bool()

s3d::JoyCon::operator bool ( ) const
explicitnoexcept

◆ povD8()

Optional<int32> s3d::JoyCon::povD8 ( ) const
noexcept

Member Data Documentation

◆ button0

Input s3d::JoyCon::button0

◆ button1

Input s3d::JoyCon::button1

◆ button2

Input s3d::JoyCon::button2

◆ button3

Input s3d::JoyCon::button3

◆ buttonHome

Input s3d::JoyCon::buttonHome

◆ buttonLR

Input s3d::JoyCon::buttonLR

◆ buttonMinus

Input s3d::JoyCon::buttonMinus

◆ buttonPlus

Input s3d::JoyCon::buttonPlus

◆ buttonScreenshot

Input s3d::JoyCon::buttonScreenshot

◆ buttonSL

Input s3d::JoyCon::buttonSL

◆ buttonSR

Input s3d::JoyCon::buttonSR

◆ buttonStick

Input s3d::JoyCon::buttonStick

◆ buttonZLZR

Input s3d::JoyCon::buttonZLZR

The documentation for this class was generated from the following file: