Ketchup Engine
Loading...
Searching...
No Matches
ScreenScale Class Reference

#include <ScreenScale.h>

Collaboration diagram for ScreenScale:
Collaboration graph

Static Public Member Functions

static void ScaleMousePos (float &x, float &y)
 Scale mouse position from Mouse::GetPos() to adjust for screen scaling.
 
static float GetOrigH ()
 Gets original pixel height of the window.
 
static float GetOrigW ()
 Gets original pixel width of the window.
 

Private Member Functions

 ScreenScale ()
 
 ScreenScale (const ScreenScale &)=delete
 
ScreenScaleoperator= (const ScreenScale &)=delete
 
 ~ScreenScale ()
 

Static Private Member Functions

static ScreenScaleInstance ()
 
static void Init ()
 
static void Free ()
 

Private Attributes

float m_origScreenH
 
float m_origScreenW
 

Static Private Attributes

static ScreenScalep_instance
 

Friends

class ScreenScaleAttorney
 

Constructor & Destructor Documentation

◆ ScreenScale() [1/2]

ScreenScale::ScreenScale ( )
private

◆ ScreenScale() [2/2]

ScreenScale::ScreenScale ( const ScreenScale )
privatedelete

◆ ~ScreenScale()

ScreenScale::~ScreenScale ( )
private

Member Function Documentation

◆ Free()

void ScreenScale::Free ( )
staticprivate

◆ GetOrigH()

float ScreenScale::GetOrigH ( )
static

Gets original pixel height of the window.

Haru, 3/19/2023.

Returns
The original height.

◆ GetOrigW()

float ScreenScale::GetOrigW ( )
static

Gets original pixel width of the window.

Haru, 3/19/2023.

Returns
The original width.

◆ Init()

void ScreenScale::Init ( )
staticprivate

◆ Instance()

ScreenScale * ScreenScale::Instance ( )
staticprivate

◆ operator=()

ScreenScale & ScreenScale::operator= ( const ScreenScale )
privatedelete

◆ ScaleMousePos()

void ScreenScale::ScaleMousePos ( float &  x,
float &  y 
)
static

Scale mouse position from Mouse::GetPos() to adjust for screen scaling.

Haru, 3/19/2023.

Parameters
x[in,out] The x coordinate.
y[in,out] The y coordinate.

Friends And Related Function Documentation

◆ ScreenScaleAttorney

friend class ScreenScaleAttorney
friend

Member Data Documentation

◆ m_origScreenH

float ScreenScale::m_origScreenH
private

◆ m_origScreenW

float ScreenScale::m_origScreenW
private

◆ p_instance

ScreenScale * ScreenScale::p_instance
staticprivate

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