DDNet documentation
Loading...
Searching...
No Matches
CEnvelopeEditor Class Reference

#include <envelope_editor.h>

Inheritance diagram for CEnvelopeEditor:
[legend]
Collaboration diagram for CEnvelopeEditor:
[legend]

Classes

class  CState
class  CPopupEnvelopePoint
class  CPopupEnvelopePointMulti
class  CPopupEnvelopePointCurveType
class  CPopupEnvelopeCurveType

Public Member Functions

void OnReset () override
void Render (CUIRect View)
Public Member Functions inherited from CEditorComponent
void OnInit (CEditor *pEditor) override
virtual void OnMapLoad ()
virtual bool OnInput (const IInput::CEvent &Event)
virtual void OnUpdate ()
void InitSubComponents ()
void RegisterSubComponent (CEditorComponent &Component)
Public Member Functions inherited from CEditorObject
virtual ~CEditorObject ()=default
CEditorEditor ()
const CEditorEditor () const
CEditorMapMap ()
const CEditorMapMap () const
IInputInput ()
const IInputInput () const
IClientClient ()
const IClientClient () const
CConfigConfig ()
const CConfigConfig () const
IEngineEngine ()
const IEngineEngine () const
IGraphicsGraphics ()
const IGraphicsGraphics () const
ISoundSound ()
const ISoundSound () const
ITextRenderTextRender ()
const ITextRenderTextRender () const
IStorageStorage ()
const IStorageStorage () const
CUiUi ()
const CUiUi () const
CRenderMapRenderMap ()
const CRenderMapRenderMap () const

Private Member Functions

void RenderColorBar (CUIRect ColorBar, const std::shared_ptr< CEnvelope > &pEnvelope)
void UpdateHotEnvelopeObject (const CUIRect &View, const CEnvelope *pEnvelope, int ActiveChannels)
void ZoomAdaptOffsetX (float ZoomFactor, const CUIRect &View)
void UpdateZoomEnvelopeX (const CUIRect &View)
void ZoomAdaptOffsetY (float ZoomFactor, const CUIRect &View)
void UpdateZoomEnvelopeY (const CUIRect &View)
void ResetZoomEnvelope (const std::shared_ptr< CEnvelope > &pEnvelope, int ActiveChannels)
void RemoveTimeOffsetEnvelope (const std::shared_ptr< CEnvelope > &pEnvelope)
float ScreenToEnvelopeX (const CUIRect &View, float x) const
float EnvelopeToScreenX (const CUIRect &View, float x) const
float ScreenToEnvelopeY (const CUIRect &View, float y) const
float EnvelopeToScreenY (const CUIRect &View, float y) const
float ScreenToEnvelopeDeltaX (const CUIRect &View, float DeltaX)
float ScreenToEnvelopeDeltaY (const CUIRect &View, float DeltaY)

Private Attributes

const char m_RedoButtonId = 0
const char m_UndoButtonId = 0
const char m_NewSoundEnvelopeButtonId = 0
const char m_NewColorEnvelopeButtonId = 0
const char m_NewPositionEnvelopeButtonId = 0
const char m_DeleteButtonId = 0
const char m_MoveRightButtonId = 0
const char m_MoveLeftButtonId = 0
const char m_ZoomOutButtonId = 0
const char m_ResetZoomButtonId = 0
const char m_ZoomInButtonId = 0
const char m_EnvelopeSelectorId = 0
const char m_PrevEnvelopeButtonId = 0
const char m_NextEnvelopeButtonId = 0
const char m_aChannelButtonIds [CEnvPoint::MAX_CHANNELS] = {0}
const char m_EnvelopeEditorId = 0
CLineInput m_NameInput
int m_EnvelopeEditorButtonUsed
EEnvelopeEditorOp m_Operation
std::vector< float > m_vAccurateDragValuesX
std::vector< float > m_vAccurateDragValuesY
vec2 m_MouseStart
vec2 m_ScaleFactor
vec2 m_Midpoint
std::vector< float > m_vInitialPositionsX
std::vector< float > m_vInitialPositionsY
CPopupEnvelopePoint m_PopupEnvelopePoint
CPopupEnvelopePointMulti m_PopupEnvelopePointMulti
CPopupEnvelopePointCurveType m_PopupEnvelopePointCurveType
CPopupEnvelopeCurveType m_PopupEnvelopeCurveType

Member Function Documentation

◆ EnvelopeToScreenX()

float CEnvelopeEditor::EnvelopeToScreenX ( const CUIRect & View,
float x ) const
private

◆ EnvelopeToScreenY()

float CEnvelopeEditor::EnvelopeToScreenY ( const CUIRect & View,
float y ) const
private

◆ OnReset()

void CEnvelopeEditor::OnReset ( )
overridevirtual

Reimplemented from CEditorComponent.

◆ RemoveTimeOffsetEnvelope()

void CEnvelopeEditor::RemoveTimeOffsetEnvelope ( const std::shared_ptr< CEnvelope > & pEnvelope)
private

◆ Render()

void CEnvelopeEditor::Render ( CUIRect View)

◆ RenderColorBar()

void CEnvelopeEditor::RenderColorBar ( CUIRect ColorBar,
const std::shared_ptr< CEnvelope > & pEnvelope )
private

◆ ResetZoomEnvelope()

void CEnvelopeEditor::ResetZoomEnvelope ( const std::shared_ptr< CEnvelope > & pEnvelope,
int ActiveChannels )
private

◆ ScreenToEnvelopeDeltaX()

float CEnvelopeEditor::ScreenToEnvelopeDeltaX ( const CUIRect & View,
float DeltaX )
private

◆ ScreenToEnvelopeDeltaY()

float CEnvelopeEditor::ScreenToEnvelopeDeltaY ( const CUIRect & View,
float DeltaY )
private

◆ ScreenToEnvelopeX()

float CEnvelopeEditor::ScreenToEnvelopeX ( const CUIRect & View,
float x ) const
private

◆ ScreenToEnvelopeY()

float CEnvelopeEditor::ScreenToEnvelopeY ( const CUIRect & View,
float y ) const
private

◆ UpdateHotEnvelopeObject()

void CEnvelopeEditor::UpdateHotEnvelopeObject ( const CUIRect & View,
const CEnvelope * pEnvelope,
int ActiveChannels )
private

◆ UpdateZoomEnvelopeX()

void CEnvelopeEditor::UpdateZoomEnvelopeX ( const CUIRect & View)
private

◆ UpdateZoomEnvelopeY()

void CEnvelopeEditor::UpdateZoomEnvelopeY ( const CUIRect & View)
private

◆ ZoomAdaptOffsetX()

void CEnvelopeEditor::ZoomAdaptOffsetX ( float ZoomFactor,
const CUIRect & View )
private

◆ ZoomAdaptOffsetY()

void CEnvelopeEditor::ZoomAdaptOffsetY ( float ZoomFactor,
const CUIRect & View )
private

Member Data Documentation

◆ m_aChannelButtonIds

const char CEnvelopeEditor::m_aChannelButtonIds[CEnvPoint::MAX_CHANNELS] = {0}
private

◆ m_DeleteButtonId

const char CEnvelopeEditor::m_DeleteButtonId = 0
private

◆ m_EnvelopeEditorButtonUsed

int CEnvelopeEditor::m_EnvelopeEditorButtonUsed
private

◆ m_EnvelopeEditorId

const char CEnvelopeEditor::m_EnvelopeEditorId = 0
private

◆ m_EnvelopeSelectorId

const char CEnvelopeEditor::m_EnvelopeSelectorId = 0
private

◆ m_Midpoint

vec2 CEnvelopeEditor::m_Midpoint
private

◆ m_MouseStart

vec2 CEnvelopeEditor::m_MouseStart
private

◆ m_MoveLeftButtonId

const char CEnvelopeEditor::m_MoveLeftButtonId = 0
private

◆ m_MoveRightButtonId

const char CEnvelopeEditor::m_MoveRightButtonId = 0
private

◆ m_NameInput

CLineInput CEnvelopeEditor::m_NameInput
private

◆ m_NewColorEnvelopeButtonId

const char CEnvelopeEditor::m_NewColorEnvelopeButtonId = 0
private

◆ m_NewPositionEnvelopeButtonId

const char CEnvelopeEditor::m_NewPositionEnvelopeButtonId = 0
private

◆ m_NewSoundEnvelopeButtonId

const char CEnvelopeEditor::m_NewSoundEnvelopeButtonId = 0
private

◆ m_NextEnvelopeButtonId

const char CEnvelopeEditor::m_NextEnvelopeButtonId = 0
private

◆ m_Operation

EEnvelopeEditorOp CEnvelopeEditor::m_Operation
private

◆ m_PopupEnvelopeCurveType

CPopupEnvelopeCurveType CEnvelopeEditor::m_PopupEnvelopeCurveType
private

◆ m_PopupEnvelopePoint

CPopupEnvelopePoint CEnvelopeEditor::m_PopupEnvelopePoint
private

◆ m_PopupEnvelopePointCurveType

CPopupEnvelopePointCurveType CEnvelopeEditor::m_PopupEnvelopePointCurveType
private

◆ m_PopupEnvelopePointMulti

CPopupEnvelopePointMulti CEnvelopeEditor::m_PopupEnvelopePointMulti
private

◆ m_PrevEnvelopeButtonId

const char CEnvelopeEditor::m_PrevEnvelopeButtonId = 0
private

◆ m_RedoButtonId

const char CEnvelopeEditor::m_RedoButtonId = 0
private

◆ m_ResetZoomButtonId

const char CEnvelopeEditor::m_ResetZoomButtonId = 0
private

◆ m_ScaleFactor

vec2 CEnvelopeEditor::m_ScaleFactor
private

◆ m_UndoButtonId

const char CEnvelopeEditor::m_UndoButtonId = 0
private

◆ m_vAccurateDragValuesX

std::vector<float> CEnvelopeEditor::m_vAccurateDragValuesX
private

◆ m_vAccurateDragValuesY

std::vector<float> CEnvelopeEditor::m_vAccurateDragValuesY
private

◆ m_vInitialPositionsX

std::vector<float> CEnvelopeEditor::m_vInitialPositionsX
private

◆ m_vInitialPositionsY

std::vector<float> CEnvelopeEditor::m_vInitialPositionsY
private

◆ m_ZoomInButtonId

const char CEnvelopeEditor::m_ZoomInButtonId = 0
private

◆ m_ZoomOutButtonId

const char CEnvelopeEditor::m_ZoomOutButtonId = 0
private

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