3#ifndef GAME_EDITOR_EDITOR_H
4#define GAME_EDITOR_EDITOR_H
138 std::shared_ptr<CEnvelope> pEnv = std::make_shared<CEnvelope>(Type);
151 std::shared_ptr<CLayerGroup> pGroup = std::make_shared<CLayerGroup>();
152 pGroup->m_pMap =
this;
159 if(Index0 < 0 || Index0 >= (
int)
m_vpGroups.size())
161 if(Index1 < 0 || Index1 >= (
int)
m_vpGroups.size())
172 if(Index < 0 || Index >= (
int)
m_vpGroups.size())
182 pGroup->ModifyImageIndex(pfnFunc);
189 pGroup->ModifyEnvelopeIndex(pfnFunc);
196 pGroup->ModifySoundIndex(pfnFunc);
203 bool Save(
const char *pFilename,
const std::function<
void(
const char *pErrorMessage)> &ErrorHandler);
205 bool Load(
const char *pFilename,
int StorageType,
const std::function<
void(
const char *pErrorMessage)> &ErrorHandler);
206 void PerformSanityChecks(
const std::function<
void(
const char *pErrorMessage)> &ErrorHandler);
225 CProperty(
const char *pName,
int Value,
int Type,
int Min,
int Max) :
354#define REGISTER_QUICK_ACTION(name, text, callback, disabled, active, button_color, description) CQuickAction m_QuickAction##name;
356#undef REGISTER_QUICK_ACTION
359#define
REGISTER_QUICK_ACTION(name, text, callback, disabled, active, button_color, description) m_QuickAction##name(text, description, callback, disabled, active, button_color),
360#include <game/editor/quick_actions.h>
444 CursorTexture.Invalidate();
495 void Init()
override;
516 void InvokeFileDialog(
int StorageType,
int FileType,
const char *pTitle,
const char *pButtonText,
517 const char *pBasepath,
bool FilenameAsDefault,
518 bool (*pfnFunc)(
const char *pFilename,
int StorageType,
void *pUser),
void *pUser);
530 void Reset(
bool CreateDefault = true);
531 bool Save(const
char *pFilename) override;
532 bool Load(const
char *pFilename,
int StorageType) override;
533 bool HandleMapDrop(const
char *pFilename,
int StorageType) override;
534 bool Append(const
char *pFilename,
int StorageType,
bool IgnoreHistory = false);
549 void SelectLayer(
int LayerIndex,
int GroupIndex = -1);
847 static void EnvelopeEval(
int TimeOffsetMillis,
int Env,
ColorRGBA &Result,
size_t Channels,
void *pUser);
862 int DoButton_Editor(
const void *pId,
const char *pText,
int Checked,
const CUIRect *pRect,
int Flags,
const char *pToolTip);
863 int DoButton_Env(
const void *pId,
const char *pText,
int Checked,
const CUIRect *pRect,
const char *pToolTip,
ColorRGBA Color,
int Corners);
866 int DoButton_FontIcon(
const void *pId,
const char *pText,
int Checked,
const CUIRect *pRect,
int Flags,
const char *pToolTip,
int Corners,
float FontSize = 10.0f);
867 int DoButton_MenuItem(
const void *pId,
const char *pText,
int Checked,
const CUIRect *pRect,
int Flags = 0,
const char *pToolTip =
nullptr);
883 SEditResult<int> UiDoValueSelector(
void *pId,
CUIRect *pRect,
const char *pLabel,
int Current,
int Min,
int Max,
int Step,
float Scale,
const char *pToolTip,
bool IsDegree =
false,
bool IsHex =
false,
int Corners =
IGraphics::CORNER_ALL,
const ColorRGBA *pColor =
nullptr,
bool ShowValue =
true);
923 static bool CallbackOpenMap(
const char *pFileName,
int StorageType,
void *pUser);
924 static bool CallbackAppendMap(
const char *pFileName,
int StorageType,
void *pUser);
925 static bool CallbackSaveMap(
const char *pFileName,
int StorageType,
void *pUser);
928 static bool CallbackSaveImage(
const char *pFileName,
int StorageType,
void *pUser);
929 static bool CallbackSaveSound(
const char *pFileName,
int StorageType,
void *pUser);
946 void DoQuadPoint(
int LayerIndex,
const std::shared_ptr<CLayerQuads> &pLayer,
CQuad *pQuad,
int QuadIndex,
int v);
977 void DoQuad(
int LayerIndex,
const std::shared_ptr<CLayerQuads> &pLayer,
CQuad *pQuad,
int Index);
978 void PreparePointDrag(
const std::shared_ptr<CLayerQuads> &pLayer,
CQuad *pQuad,
int QuadIndex,
int PointIndex);
979 void DoPointDrag(
const std::shared_ptr<CLayerQuads> &pLayer,
CQuad *pQuad,
int QuadIndex,
int PointIndex,
int OffsetX,
int OffsetY);
1003 void ComputePointAlignments(
const std::shared_ptr<CLayerQuads> &pLayer,
CQuad *pQuad,
int QuadIndex,
int PointIndex,
int OffsetX,
int OffsetY, std::vector<SAlignmentInfo> &vAlignments,
bool Append =
false)
const;
1004 void ComputePointsAlignments(
const std::shared_ptr<CLayerQuads> &pLayer,
bool Pivot,
int OffsetX,
int OffsetY, std::vector<SAlignmentInfo> &vAlignments)
const;
1006 void DrawPointAlignments(
const std::vector<SAlignmentInfo> &vAlignments,
int OffsetX,
int OffsetY)
const;
1008 void ApplyAlignments(
const std::vector<SAlignmentInfo> &vAlignments,
int &OffsetX,
int &OffsetY);
1011 bool ReplaceImage(
const char *pFilename,
int StorageType,
bool CheckDuplicate);
1013 bool ReplaceSound(
const char *pFileName,
int StorageType,
bool CheckDuplicate);
1015 static bool AddImage(
const char *pFilename,
int StorageType,
void *pUser);
1016 static bool AddSound(
const char *pFileName,
int StorageType,
void *pUser);
1056 void DoAudioPreview(
CUIRect View,
const void *pPlayPauseButtonId,
const void *pStopButtonId,
const void *pSeekBarId,
int SampleId);
1134 static const char *
ExplainFNG(
int Tile,
int Layer);
1145 void ResetZoomEnvelope(
const std::shared_ptr<CEnvelope> &pEnvelope,
int ActiveChannels);
void Run() override
Definition: editor.h:258
CDataFileWriter m_Writer
Definition: editor.h:256
const char * GetRealFileName() const
Definition: editor.h:271
const char * GetTempFileName() const
Definition: editor.h:272
char m_aTempFileName[IO_MAX_PATH_LENGTH]
Definition: editor.h:255
CDataFileWriterFinishJob(const char *pRealFileName, const char *pTempFileName, CDataFileWriter &&Writer)
Definition: editor.h:264
char m_aRealFileName[IO_MAX_PATH_LENGTH]
Definition: editor.h:254
Definition: datafile.h:71
void Finish()
Definition: datafile.cpp:770
Definition: editor_history.h:11
char m_aAuthor[32]
Definition: editor.h:106
char m_aCredits[128]
Definition: editor.h:108
void Copy(const CMapInfo &Source)
Definition: editor.h:119
char m_aVersion[16]
Definition: editor.h:107
void Reset()
Definition: editor.h:111
char m_aLicense[32]
Definition: editor.h:109
bool m_Modified
Definition: editor.h:91
void VisitEnvelopeReferences(F &&Visitor)
Definition: map.cpp:51
CMapInfo m_MapInfoTmp
Definition: editor.h:128
CEditor * m_pEditor
Definition: editor.h:79
void MakeGameGroup(std::shared_ptr< CLayerGroup > pGroup)
Definition: map.cpp:90
void OnModify()
Definition: map.cpp:5
std::vector< CEditorMapSetting > m_vSettings
Definition: editor.h:130
void MakeTuneLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: map.cpp:174
float m_LastSaveTime
Definition: editor.h:94
void CreateDefault(IGraphics::CTextureHandle EntitiesTexture)
Definition: map.cpp:122
void PerformSanityChecks(const std::function< void(const char *pErrorMessage)> &ErrorHandler)
Definition: map_io.cpp:1049
std::shared_ptr< class CLayerSpeedup > m_pSpeedupLayer
Definition: editor.h:211
void SwapEnvelopes(int Index0, int Index1)
Definition: map.cpp:29
std::vector< std::shared_ptr< CLayerGroup > > m_vpGroups
Definition: editor.h:98
std::vector< std::shared_ptr< CEditorImage > > m_vpImages
Definition: editor.h:99
float m_LastAutosaveUpdateTime
Definition: editor.h:95
std::shared_ptr< CEnvelope > NewEnvelope(CEnvelope::EType Type)
Definition: editor.h:135
bool PerformPreSaveSanityChecks(const std::function< void(const char *pErrorMessage)> &ErrorHandler)
Definition: map_io.cpp:411
void DeleteGroup(int Index)
Definition: editor.h:170
std::vector< std::shared_ptr< CEditorSound > > m_vpSounds
Definition: editor.h:101
void Clean()
Definition: map.cpp:97
void DeleteEnvelope(int Index)
Definition: map.cpp:12
void ModifyImageIndex(FIndexModifyFunction pfnFunc)
Definition: editor.h:178
float m_LastModifiedTime
Definition: editor.h:93
void MakeSpeedupLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: map.cpp:156
bool Load(const char *pFilename, int StorageType, const std::function< void(const char *pErrorMessage)> &ErrorHandler)
Definition: map_io.cpp:439
CEditorMap()
Definition: editor.h:81
CMapInfo m_MapInfo
Definition: editor.h:127
void MakeTeleLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: map.cpp:150
std::vector< std::shared_ptr< CEnvelope > > m_vpEnvelopes
Definition: editor.h:100
bool m_ModifiedAuto
Definition: editor.h:92
void MakeSwitchLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: map.cpp:168
void ModifyEnvelopeIndex(FIndexModifyFunction pfnFunc)
Definition: editor.h:185
std::shared_ptr< CLayerGroup > m_pGameGroup
Definition: editor.h:133
void ModifySoundIndex(FIndexModifyFunction pfnFunc)
Definition: editor.h:192
void MakeGameLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: map.cpp:84
std::shared_ptr< class CLayerFront > m_pFrontLayer
Definition: editor.h:212
void MakeFrontLayer(const std::shared_ptr< CLayer > &pLayer)
Definition: map.cpp:162
std::shared_ptr< class CLayerTele > m_pTeleLayer
Definition: editor.h:210
std::shared_ptr< class CLayerTune > m_pTuneLayer
Definition: editor.h:214
~CEditorMap()
Definition: editor.h:86
std::shared_ptr< class CLayerSwitch > m_pSwitchLayer
Definition: editor.h:213
int SwapGroups(int Index0, int Index1)
Definition: editor.h:157
std::shared_ptr< class CLayerGame > m_pGameLayer
Definition: editor.h:132
bool Save(const char *pFilename, const std::function< void(const char *pErrorMessage)> &ErrorHandler)
Definition: map_io.cpp:37
std::shared_ptr< CLayerGroup > NewGroup()
Definition: editor.h:148
CHoverTile(int Group, int Layer, int x, int y, const CTile Tile)
Definition: editor.h:477
int m_Layer
Definition: editor.h:487
const CTile m_Tile
Definition: editor.h:490
int m_Group
Definition: editor.h:486
int m_X
Definition: editor.h:488
int m_Y
Definition: editor.h:489
static const char * ExplainFNG(int Tile, int Layer)
Definition: explanations.cpp:491
IGraphics::CTextureHandle GetSpeedupTexture()
Definition: editor.cpp:8403
unsigned char m_SpeedupForce
Definition: editor.h:1167
int m_ShiftBy
Definition: editor.h:845
static CUi::EPopupMenuFunctionResult PopupSelectImage(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2185
class IStorage * m_pStorage
Definition: editor.h:286
static CUi::EPopupMenuFunctionResult PopupMenuFile(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:24
CEditorMap m_Map
Definition: editor.h:842
CEditorHistory m_EnvelopeEditorHistory
Definition: editor.h:1182
void OnClose() override
Definition: editor.cpp:8816
int m_QuadKnifeCount
Definition: editor.h:813
int DoButton_DraggableEx(const void *pId, const char *pText, int Checked, const CUIRect *pRect, bool *pClicked, bool *pAbrupted, int Flags, const char *pToolTip=nullptr, int Corners=IGraphics::CORNER_ALL, float FontSize=10.0f)
Definition: editor.cpp:262
@ TILE_PUB_CREDITS3
Definition: editor.h:1068
@ TILE_PUB_CREDITS7
Definition: editor.h:1072
@ TILE_PUB_ENTITIES_OFF2
Definition: editor.h:1076
@ TILE_PUB_CREDITS1
Definition: editor.h:1066
@ TILE_PUB_CREDITS6
Definition: editor.h:1071
@ TILE_PUB_CREDITS5
Definition: editor.h:1070
@ TILE_PUB_DEATH
Definition: editor.h:1063
@ TILE_PUB_AIR
Definition: editor.h:1061
@ TILE_PUB_ENTITIES_OFF1
Definition: editor.h:1075
@ TILE_PUB_CREDITS8
Definition: editor.h:1073
@ TILE_PUB_UNHOOKABLE
Definition: editor.h:1064
@ TILE_PUB_CREDITS4
Definition: editor.h:1069
@ TILE_PUB_CREDITS2
Definition: editor.h:1067
@ TILE_PUB_HOOKABLE
Definition: editor.h:1062
void DoColorPickerButton(const void *pId, const CUIRect *pRect, ColorRGBA Color, const std::function< void(ColorRGBA Color)> &SetColor)
Definition: editor.cpp:3697
int DoButton_Env(const void *pId, const char *pText, int Checked, const CUIRect *pRect, const char *pToolTip, ColorRGBA Color, int Corners)
Definition: editor.cpp:206
int m_FileDialogStorageType
Definition: editor.h:639
int PopupSelectGameTileOpResult()
Definition: popups.cpp:2363
bool m_ShowMousePointer
Definition: editor.h:746
int m_ToolbarPreviewSound
Definition: editor.h:664
char m_aFileSaveName[IO_MAX_PATH_LENGTH]
Definition: editor.h:595
void ZoomAdaptOffsetY(float ZoomFactor, const CUIRect &View)
Definition: editor.cpp:5945
void RenderPressedKeys(CUIRect View)
Definition: editor.cpp:8176
static CUi::EPopupMenuFunctionResult PopupLayer(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:682
static bool CallbackCustomEntities(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:941
bool IsNonGameTileLayerSelected() const
Definition: quick_actions.cpp:142
void DoMapSettingsEditBox(CMapSettingsBackend::CContext *pContext, const CUIRect *pRect, float FontSize, float DropdownMaxHeight, int Corners=IGraphics::CORNER_ALL, const char *pToolTip=nullptr)
Definition: editor_server_settings.cpp:289
void DoMapEditor(CUIRect View)
Definition: editor.cpp:3032
CPrompt m_Prompt
Definition: editor.h:293
int RenderEditBoxDropdown(SEditBoxDropdownContext *pDropdown, CUIRect View, CLineInput *pLineInput, int x, float MaxHeight, bool AutoWidth, const std::vector< T > &vData, const FDropdownRenderCallback< T > &pfnMatchCallback)
Definition: editor_server_settings.cpp:463
char m_aFileName[IO_MAX_PATH_LENGTH]
Definition: editor.h:593
bool m_IngameMoved
Definition: editor.h:629
std::map< int, unsigned char > m_TeleNumbers
Definition: editor.h:1163
IGraphics::CTextureHandle GetFrontTexture()
Definition: editor.cpp:8389
int m_SelectedSource
Definition: editor.h:807
int m_FilePreviewImageWidth
Definition: editor.h:660
bool m_BrushColorEnabled
Definition: editor.h:591
float m_AnimateSpeed
Definition: editor.h:771
std::vector< int > SortImages()
Definition: editor.cpp:4707
static bool ReplaceSoundCallback(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:4687
bool m_ValidSaveFilename
Definition: editor.h:596
bool m_EditorWasUsedBefore
Definition: editor.h:295
IGraphics::CTextureHandle GetTuneTexture()
Definition: editor.cpp:8417
void RenderEnvelopeEditor(CUIRect View)
Definition: editor.cpp:6199
void DeselectQuads()
Definition: editor.cpp:520
static CUi::EPopupMenuFunctionResult PopupSource(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1057
CMapSettingsBackend::CContext m_MapSettingsCommandContext
Definition: editor.h:851
bool HasUnsavedData() const override
Definition: editor.h:502
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_FileDialogFilterInput
Definition: editor.h:649
std::shared_ptr< CLayerTiles > m_pTilesetPicker
Definition: editor.h:837
IGraphics::CTextureHandle m_FrontTexture
Definition: editor.h:299
int DoButton_Editor(const void *pId, const char *pText, int Checked, const CUIRect *pRect, int Flags, const char *pToolTip)
Definition: editor.cpp:197
unsigned char m_ViewSwitch
Definition: editor.h:1173
void DeleteSelectedLayer()
Definition: quick_actions.cpp:193
CLayerSelector m_LayerSelector
Definition: editor.h:292
void DoQuadPoint(int LayerIndex, const std::shared_ptr< CLayerQuads > &pLayer, CQuad *pQuad, int QuadIndex, int v)
Definition: editor.cpp:2329
void RenderMousePointer()
Definition: editor.cpp:8284
void * m_pFileDialogUser
Definition: editor.h:644
void AddGroup()
Definition: quick_actions.cpp:49
vec2 m_MouseDeltaWorld
Definition: editor.h:754
void Init() override
Definition: editor.cpp:8431
static CUi::EPopupMenuFunctionResult PopupGoto(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2722
bool m_ShowPicker
Definition: editor.h:793
std::map< const char *, CUi::SMessagePopupContext *, SStringKeyComparator > m_PopupMessageContexts
Definition: editor.h:526
std::vector< CHoverTile > m_vHoverTiles
Definition: editor.h:492
void OnUpdate() override
Definition: editor.cpp:8723
int m_FilesSelectedIndex
Definition: editor.h:654
void PopupSelectImageInvoke(int Current, float x, float y)
Definition: popups.cpp:2247
void DoQuadEnvelopes(const std::vector< CQuad > &vQuads, IGraphics::CTextureHandle Texture=IGraphics::CTextureHandle())
Definition: editor.cpp:2804
void OnDialogClose() override
Definition: editor.cpp:8826
std::vector< CQuad * > GetSelectedQuads()
Definition: editor.cpp:465
static CUi::EPopupMenuFunctionResult PopupSwitch(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2597
const void * m_pContainerPannedLast
Definition: editor.h:756
void SelectNextLayer()
Definition: editor.cpp:741
unsigned char m_SpeedupMaxSpeed
Definition: editor.h:1168
float ScreenToEnvelopeDX(const CUIRect &View, float DeltaX)
Definition: editor.cpp:6042
bool Save(const char *pFilename) override
Definition: editor.cpp:8852
IGraphics::CTextureHandle m_TuneTexture
Definition: editor.h:303
CUi * Ui()
Definition: editor.h:328
vec2 m_MouseWorldNoParaPos
Definition: editor.h:753
float m_ToolBoxWidth
Definition: editor.h:784
void RenderMenubar(CUIRect Menubar)
Definition: editor.cpp:7757
IGraphics::CTextureHandle GetEntitiesTexture()
Definition: editor.cpp:8424
IGraphics::CTextureHandle GetTeleTexture()
Definition: editor.cpp:8396
char m_aTileartFilename[IO_MAX_PATH_LENGTH]
Definition: editor.h:854
char m_aFilesSelectedName[IO_MAX_PATH_LENGTH]
Definition: editor.h:648
char m_aFileDialogCurrentFolder[IO_MAX_PATH_LENGTH]
Definition: editor.h:646
bool m_GuiActive
Definition: editor.h:747
IGraphics::CTextureHandle m_FilePreviewImage
Definition: editor.h:657
int DoProperties(CUIRect *pToolbox, CProperty *pProps, int *pIds, int *pNewVal, const std::vector< ColorRGBA > &vColors={})
Definition: editor_props.cpp:12
char * m_pFileDialogPath
Definition: editor.h:650
EAxis GetDragAxis(int OffsetX, int OffsetY) const
Definition: editor.cpp:1555
char m_aFileNamePending[IO_MAX_PATH_LENGTH]
Definition: editor.h:594
void AddSoundLayer()
Definition: quick_actions.cpp:56
void ShowFileDialogError(const char *pFormat,...) GNUC_ATTRIBUTE((format(printf
Definition: editor.cpp:5735
void DeleteSelectedQuads()
Definition: editor.cpp:556
int FindNextFreeTeleNumber(int Index)
Definition: editor.cpp:9166
int m_PopupEventActivated
Definition: editor.h:621
bool m_LargeLayerWasWarned
Definition: editor.h:623
int FindNextFreeSwitchNumber()
Definition: editor.cpp:9151
void DoEditorDragBar(CUIRect View, CUIRect *pDragBar, EDragSide Side, float *pValue, float MinValue=100.0f, float MaxValue=400.0f)
Definition: editor.cpp:7703
std::pair< int, int > m_SelectedTangentOutPoint
Definition: editor.h:809
class ITextRender * TextRender() const
Definition: editor.h:326
void HandleCursorMovement()
Definition: editor.cpp:8502
void OnRender() override
Definition: editor.cpp:8764
bool m_FileDialogMultipleStorages
Definition: editor.h:652
std::map< int, CPoint[5]> m_QuadDragOriginalPoints
Definition: editor.h:1190
void ToggleSelectQuadPoint(int QuadIndex, int Index)
Definition: editor.cpp:536
void SelectLayer(int LayerIndex, int GroupIndex=-1)
Definition: editor.cpp:487
void LayerSelectImage()
Definition: quick_actions.cpp:161
@ TILE_FNG_SPIKE_OLD3
Definition: editor.h:1105
@ TILE_FNG_SPIKE_RED
Definition: editor.h:1083
@ TILE_FNG_LASER
Definition: editor.h:1101
@ TILE_FNG_SHOTGUN
Definition: editor.h:1098
@ TILE_FNG_SPIKE_GOLD
Definition: editor.h:1081
@ TILE_FNG_FLAG_BLUE
Definition: editor.h:1095
@ TILE_FNG_SPIKE_BLUE
Definition: editor.h:1084
@ TILE_FNG_SPIKE_OLD2
Definition: editor.h:1104
@ TILE_FNG_SPAWN_RED
Definition: editor.h:1092
@ TILE_FNG_SPIKE_PURPLE
Definition: editor.h:1089
@ TILE_FNG_SPAWN
Definition: editor.h:1091
@ TILE_FNG_NINJA
Definition: editor.h:1100
@ TILE_FNG_SPIKE_OLD1
Definition: editor.h:1103
@ TILE_FNG_FLAG_RED
Definition: editor.h:1094
@ TILE_FNG_HEART
Definition: editor.h:1097
@ TILE_FNG_SCORE_BLUE
Definition: editor.h:1086
@ TILE_FNG_SPAWN_BLUE
Definition: editor.h:1093
@ TILE_FNG_SPIKE_NORMAL
Definition: editor.h:1082
@ TILE_FNG_SCORE_RED
Definition: editor.h:1085
@ TILE_FNG_SHIELD
Definition: editor.h:1096
@ TILE_FNG_GRENADE
Definition: editor.h:1099
@ TILE_FNG_SPIKE_GREEN
Definition: editor.h:1088
static bool CallbackSaveMap(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:822
void DoToolbarLayers(CUIRect Toolbar)
Definition: editor.cpp:1059
@ FILETYPE_IMG
Definition: editor.h:634
@ FILETYPE_MAP
Definition: editor.h:633
@ NUM_FILETYPES
Definition: editor.h:636
@ FILETYPE_SOUND
Definition: editor.h:635
int m_SelectedQuadPoints
Definition: editor.h:800
CUi::SColorPickerPopupContext m_ColorPickerPopupContext
Definition: editor.h:583
void ResetZoomEnvelope(const std::shared_ptr< CEnvelope > &pEnvelope, int ActiveChannels)
Definition: editor.cpp:5958
bool m_Animate
Definition: editor.h:768
static CUi::EPopupMenuFunctionResult PopupEntities(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2766
class IConfigManager * ConfigManager() const
Definition: editor.h:320
static bool CallbackSaveSound(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:913
void SelectGameLayer()
Definition: editor.cpp:4692
vec2 m_aQuadKnifePoints[4]
Definition: editor.h:814
void PopupSelectGametileOpInvoke(float x, float y)
Definition: popups.cpp:2356
const char * m_pFileDialogTitle
Definition: editor.h:641
EAxis
Definition: editor.h:956
bool IsEnvelopeUsed(int EnvelopeIndex) const
Definition: editor.cpp:5871
bool IsTangentSelected() const
Definition: editor.cpp:703
static CUi::EPopupMenuFunctionResult PopupEnvPointMulti(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1505
bool IsTangentInSelected() const
Definition: editor.cpp:693
EExplanation
Definition: editor.h:1125
static CUi::EPopupMenuFunctionResult PopupAnimateSettings(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2828
bool IsTangentOutSelected() const
Definition: editor.cpp:698
static CUi::EPopupMenuFunctionResult PopupTune(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2695
static CUi::EPopupMenuFunctionResult PopupEnvPointCurveType(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1522
const CMapView * MapView() const
Definition: editor.h:332
bool Append(const char *pFilename, int StorageType, bool IgnoreHistory=false)
Definition: editor.cpp:8905
void TileartCheckColors()
Definition: tileart.cpp:173
void PopupSelectConfigAutoMapInvoke(int Current, float x, float y)
Definition: popups.cpp:2412
const std::vector< CHoverTile > & HoverTiles() const
Definition: editor.h:493
std::shared_ptr< CLayer > GetSelectedLayer(int Index) const
Definition: editor.cpp:441
float TriangleArea(vec2 A, vec2 B, vec2 C)
Definition: editor.cpp:2555
int DoButton_MenuItem(const void *pId, const char *pText, int Checked, const CUIRect *pRect, int Flags=0, const char *pToolTip=nullptr)
Definition: editor.cpp:218
static CUi::EPopupMenuFunctionResult PopupSpeedup(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2558
bool m_QuadKnifeActive
Definition: editor.h:812
void AddTeleLayer()
Definition: quick_actions.cpp:131
IGraphics::CTextureHandle m_aCursorTextures[ECursorType::NUM_CURSORS]
Definition: editor.h:831
bool IsEnvPointSelected(int Index, int Channel) const
Definition: editor.cpp:647
@ TILE_VANILLA_FLAG_RED
Definition: editor.h:1113
@ TILE_VANILLA_SPAWN
Definition: editor.h:1110
@ TILE_VANILLA_SHIELD
Definition: editor.h:1115
@ TILE_VANILLA_SHOTGUN
Definition: editor.h:1117
@ TILE_VANILLA_NINJA
Definition: editor.h:1119
@ TILE_VANILLA_GRENADE
Definition: editor.h:1118
@ TILE_VANILLA_HEART
Definition: editor.h:1116
@ TILE_VANILLA_SPAWN_BLUE
Definition: editor.h:1112
@ TILE_VANILLA_SPAWN_RED
Definition: editor.h:1111
@ TILE_VANILLA_LASER
Definition: editor.h:1120
@ TILE_VANILLA_FLAG_BLUE
Definition: editor.h:1114
bool ReplaceImage(const char *pFilename, int StorageType, bool CheckDuplicate)
Definition: editor.cpp:4446
int m_SelectedEnvelope
Definition: editor.h:801
std::shared_ptr< CLayer > GetSelectedLayerType(int Index, int Type) const
Definition: editor.cpp:457
bool(* m_pfnFileDialogFunc)(const char *pFileName, int StorageType, void *pUser)
Definition: editor.h:643
std::shared_ptr< CLayerGroup > m_pBrush
Definition: editor.h:836
void HandleAutosave()
Definition: editor.cpp:8597
void UpdateColorPipette()
Definition: editor.cpp:8232
static bool ReplaceImageCallback(const char *pFilename, int StorageType, void *pUser)
Definition: editor.cpp:4502
void DoToolbarSounds(CUIRect Toolbar)
Definition: editor.cpp:1409
bool IsTangentInPointSelected(int Index, int Channel) const
Definition: editor.cpp:688
void RenderBackground(CUIRect View, IGraphics::CTextureHandle Texture, float Size, float Brightness) const
Definition: editor.cpp:284
void DoQuadEnvPoint(const CQuad *pQuad, int QIndex, int pIndex)
Definition: editor.cpp:2931
EShowTile
Definition: editor.h:760
@ SHOW_TILE_DECIMAL
Definition: editor.h:762
@ SHOW_TILE_OFF
Definition: editor.h:761
@ SHOW_TILE_HEXADECIMAL
Definition: editor.h:763
void AddFrontLayer()
Definition: quick_actions.cpp:98
CSmoothValue m_ZoomEnvelopeY
Definition: editor.h:739
class IConsole * m_pConsole
Definition: editor.h:281
void AddTileart(bool IgnoreHistory=false)
Definition: tileart.cpp:141
int m_Mode
Definition: editor.h:587
CSoundSource * GetSelectedSource() const
Definition: editor.cpp:477
static const char * ExplainDDNet(int Tile, int Layer)
Definition: explanations.cpp:6
ColorRGBA m_PipetteColor
Definition: editor.h:818
static CUi::EPopupMenuFunctionResult PopupEnvPoint(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1332
CEnvelopeEditorOperationTracker m_EnvOpTracker
Definition: editor.h:1184
class IEngine * m_pEngine
Definition: editor.h:282
EShowTile m_ShowTileInfo
Definition: editor.h:765
char m_MapEditorId
Definition: editor.h:757
IGraphics::CTextureHandle m_CheckerTexture
Definition: editor.h:821
CLineInputBuffered< 256 > m_SettingsCommandInput
Definition: editor.h:849
void DoQuadKnife(int QuadIndex)
Definition: editor.cpp:2581
static void MapSettingsDropdownRenderCallback(const SPossibleValueMatch &Match, char(&aOutput)[128], std::vector< STextColorSplit > &vColorSplits)
Definition: editor_server_settings.cpp:1020
int m_SelectedImage
Definition: editor.h:805
static bool CompareTimeModifiedAscending(const CFilelistItem *pLhs, const CFilelistItem *pRhs)
Definition: editor.h:704
char m_aFileDialogCurrentLink[IO_MAX_PATH_LENGTH]
Definition: editor.h:647
bool HandleMapDrop(const char *pFilename, int StorageType) override
Definition: editor.cpp:8865
void RenderModebar(CUIRect View)
Definition: editor.cpp:5760
EShowEnvelope
Definition: editor.h:787
@ SHOWENV_ALL
Definition: editor.h:790
@ SHOWENV_NONE
Definition: editor.h:788
@ SHOWENV_SELECTED
Definition: editor.h:789
static bool CallbackAppendMap(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:806
ECursorType m_CursorType
Definition: editor.h:832
int m_FileDialogLastPopulatedStorageType
Definition: editor.h:640
IGraphics::CTextureHandle m_SpeedupTexture
Definition: editor.h:301
void AddQuadsLayer()
Definition: quick_actions.cpp:77
int DoEditBoxDropdown(SEditBoxDropdownContext *pDropdown, CLineInput *pLineInput, const CUIRect *pEditBoxRect, int x, float MaxHeight, bool AutoWidth, const std::vector< T > &vData, const FDropdownRenderCallback< T > &pfnMatchCallback)
Definition: editor_server_settings.cpp:402
static CUi::EPopupMenuFunctionResult PopupProofMode(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2803
float EnvelopeToScreenX(const CUIRect &View, float x) const
Definition: editor.cpp:6027
void SelectTangentOutPoint(int Index, int Channel)
Definition: editor.cpp:671
void AddSpeedupLayer()
Definition: quick_actions.cpp:120
void ApplyAxisAlignment(int &OffsetX, int &OffsetY) const
Definition: editor.cpp:2000
char m_aTooltip[256]
Definition: editor.h:589
int DoButton_Ex(const void *pId, const char *pText, int Checked, const CUIRect *pRect, int Flags, const char *pToolTip, int Corners, float FontSize=EditorFontSizes::MENU, int Align=TEXTALIGN_MC)
Definition: editor.cpp:234
class IInput * Input() const
Definition: editor.h:318
bool DoEditBox(CLineInput *pLineInput, const CUIRect *pRect, float FontSize, int Corners=IGraphics::CORNER_ALL, const char *pToolTip=nullptr, const std::vector< STextColorSplit > &vColorSplits={})
Definition: editor.cpp:114
CMapSettingsBackend m_MapSettingsBackend
Definition: editor.h:850
void RenderServerSettingsEditor(CUIRect View, bool ShowServerSettingsEditorLast)
Definition: editor_server_settings.cpp:55
static bool CallbackOpenMap(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:789
static CUi::EPopupMenuFunctionResult PopupQuad(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:796
const void * m_pColorPickerPopupActiveId
Definition: editor.h:584
class IStorage * Storage() const
Definition: editor.h:327
std::vector< std::pair< int, int > > m_vSelectedEnvelopePoints
Definition: editor.h:802
void AdjustBrushSpecialTiles(bool UseNextFree, int Adjust=0)
Definition: editor.cpp:9066
vec2 m_MouseWorldPos
Definition: editor.h:752
static CUi::EPopupMenuFunctionResult PopupEnvelopeCurvetype(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2885
float m_OffsetEnvelopeY
Definition: editor.h:744
class IGraphics * m_pGraphics
Definition: editor.h:283
int PopupSelectConfigAutoMapResult()
Definition: popups.cpp:2423
class IClient * m_pClient
Definition: editor.h:278
void FreeDynamicPopupMenus()
Definition: editor.cpp:8216
static CUi::EPopupMenuFunctionResult PopupImage(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1627
static CUi::EPopupMenuFunctionResult PopupPoint(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1248
void RenderTooltip(CUIRect TooltipRect)
Definition: editor.cpp:5854
std::vector< std::reference_wrapper< CEditorComponent > > m_vComponents
Definition: editor.h:290
void ToggleSelectQuad(int Index)
Definition: editor.cpp:511
void DoPointDrag(const std::shared_ptr< CLayerQuads > &pLayer, CQuad *pQuad, int QuadIndex, int PointIndex, int OffsetX, int OffsetY)
Definition: editor.cpp:1549
void SelectTangentInPoint(int Index, int Channel)
Definition: editor.cpp:682
std::vector< std::string > m_vSelectEntitiesFiles
Definition: editor.h:734
static CUi::EPopupMenuFunctionResult PopupSelectSound(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2268
IGraphics::CTextureHandle m_SwitchTexture
Definition: editor.h:302
int m_SortByTimeModified
Definition: editor.h:732
EExtraEditor m_ActiveExtraEditor
Definition: editor.h:782
void SetHotQuadPoint(const std::shared_ptr< CLayerQuads > &pLayer)
Definition: editor.cpp:3652
static void EnvelopeEval(int TimeOffsetMillis, int Env, ColorRGBA &Result, size_t Channels, void *pUser)
Definition: editor.cpp:97
EPreviewState
Definition: editor.h:308
@ PREVIEW_UNLOADED
Definition: editor.h:309
@ PREVIEW_ERROR
Definition: editor.h:311
@ PREVIEW_LOADED
Definition: editor.h:310
static CUi::EPopupMenuFunctionResult PopupGroup(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:419
bool DoClearableEditBox(CLineInput *pLineInput, const CUIRect *pRect, float FontSize, int Corners=IGraphics::CORNER_ALL, const char *pToolTip=nullptr, const std::vector< STextColorSplit > &vColorSplits={})
Definition: editor.cpp:120
void MapDetails()
Definition: quick_actions.cpp:175
int GetTextureUsageFlag() const
Definition: editor.cpp:8384
void SelectQuad(int Index)
Definition: editor.cpp:505
void DrawAABB(const SAxisAlignedBoundingBox &AABB, int OffsetX=0, int OffsetY=0) const
Definition: editor.cpp:1910
int m_PopupEnvelopeSelectedPoint
Definition: editor.h:920
std::vector< int > m_vSelectedQuads
Definition: editor.h:796
int DoButton_Editor_Common(const void *pId, const char *pText, int Checked, const CUIRect *pRect, int Flags, const char *pToolTip)
Definition: editor.cpp:185
CEditorHistory m_EditorHistory
Definition: editor.h:1180
int FindEnvPointIndex(int Index, int Channel) const
Definition: editor.cpp:605
void RenderStatusbar(CUIRect View, CUIRect *pTooltipRect)
Definition: editor.cpp:5828
int m_CurrentQuadIndex
Definition: editor.h:804
float ScreenToEnvelopeX(const CUIRect &View, float x) const
Definition: editor.cpp:6022
static CUi::EPopupMenuFunctionResult PopupNewFolder(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1859
static bool CompareTimeModifiedDescending(const CFilelistItem *pLhs, const CFilelistItem *pRhs)
Definition: editor.h:717
void OnIngameMoved() override
Definition: editor.h:505
void QuadSelectionAABB(const std::shared_ptr< CLayerQuads > &pLayer, SAxisAlignedBoundingBox &OutAABB)
Definition: editor.cpp:1934
void void Reset(bool CreateDefault=true)
Definition: editor.cpp:8334
int m_Dialog
Definition: editor.h:588
class IClient * Client() const
Definition: editor.h:319
void UpdateMentions() override
Definition: editor.h:503
void OnActivate() override
Definition: editor.cpp:8805
static const char * ExplainVanilla(int Tile, int Layer)
Definition: explanations.cpp:599
void ComputeAABBAlignments(const std::shared_ptr< CLayerQuads > &pLayer, const SAxisAlignedBoundingBox &AABB, int OffsetX, int OffsetY, std::vector< SAlignmentInfo > &vAlignments) const
Definition: editor.cpp:1774
int m_FilePreviewSound
Definition: editor.h:658
void AddSelectedLayer(int LayerIndex)
Definition: editor.cpp:498
static bool IsVanillaImage(const char *pImage)
Definition: editor.cpp:80
std::pair< int, int > EnvGetSelectedTimeAndValue() const
Definition: editor.cpp:708
void RemoveUnusedEnvelopes()
Definition: editor.cpp:5910
void OnWindowResize() override
Definition: editor.cpp:8811
float m_AnimateTime
Definition: editor.h:770
bool m_ColorPipetteActive
Definition: editor.h:819
bool m_UpdateEnvPointInfo
Definition: editor.h:810
bool m_ResetZoomEnvelope
Definition: editor.h:741
void RenderSavingIndicator(CUIRect View)
Definition: editor.cpp:8198
class ISound * Sound() const
Definition: editor.h:325
std::shared_ptr< CLayerGroup > m_apSavedBrushes[10]
Definition: editor.h:314
void FilelistPopulate(int StorageType, bool KeepSelection=false)
Definition: editor.cpp:5607
class ISound * m_pSound
Definition: editor.h:285
void RemoveTimeOffsetEnvelope(const std::shared_ptr< CEnvelope > &pEnvelope)
Definition: editor.cpp:6052
const void * m_pContainerPanned
Definition: editor.h:755
EDragSide
Definition: editor.h:1040
float ScreenToEnvelopeY(const CUIRect &View, float y) const
Definition: editor.cpp:6032
static CUi::EPopupMenuFunctionResult PopupEvent(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1985
void DrawPointAlignments(const std::vector< SAlignmentInfo > &vAlignments, int OffsetX, int OffsetY) const
Definition: editor.cpp:1886
void DoQuad(int LayerIndex, const std::shared_ptr< CLayerQuads > &pLayer, CQuad *pQuad, int Index)
Definition: editor.cpp:2009
static bool AddImage(const char *pFilename, int StorageType, void *pUser)
Definition: editor.cpp:4507
bool IsQuadPointSelected(int QuadIndex, int Index) const
Definition: editor.cpp:592
char m_aMenuBackgroundTooltip[256]
Definition: editor.h:749
bool m_AnimateUpdatePopup
Definition: editor.h:772
static const void * ms_pUiGotContext
Definition: editor.h:840
static bool CallbackSaveImage(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:885
class IConsole * Console() const
Definition: editor.h:322
CQuadEditTracker m_QuadTracker
Definition: editor.h:1183
int64_t m_AnimateStart
Definition: editor.h:769
static CUi::EPopupMenuFunctionResult PopupMapInfo(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1910
class ITextRender * m_pTextRender
Definition: editor.h:284
int FindSelectedQuadIndex(int Index) const
Definition: editor.cpp:597
const char * m_pFileDialogButtonText
Definition: editor.h:642
int DoButton_FontIcon(const void *pId, const char *pText, int Checked, const CUIRect *pRect, int Flags, const char *pToolTip, int Corners, float FontSize=10.0f)
Definition: editor.cpp:249
void ComputePointsAlignments(const std::shared_ptr< CLayerQuads > &pLayer, bool Pivot, int OffsetX, int OffsetY, std::vector< SAlignmentInfo > &vAlignments) const
Definition: editor.cpp:1711
void ApplyAlignments(const std::vector< SAlignmentInfo > &vAlignments, int &OffsetX, int &OffsetY)
Definition: editor.cpp:1968
void AddTuneLayer()
Definition: quick_actions.cpp:109
int m_SelectedQuadPoint
Definition: editor.h:797
void OnMouseMove(vec2 MousePos)
Definition: editor.cpp:8549
bool CanFillGameTiles() const
Definition: quick_actions.cpp:15
std::vector< CFilelistItem > m_vCompleteFileList
Definition: editor.h:675
bool IsQuadCornerSelected(int Index) const
Definition: editor.cpp:587
CRenderTools m_RenderTools
Definition: editor.h:287
void SetHotEnvelopePoint(const CUIRect &View, const std::shared_ptr< CEnvelope > &pEnvelope, int ActiveChannels)
Definition: editor.cpp:6145
void PreparePointDrag(const std::shared_ptr< CLayerQuads > &pLayer, CQuad *pQuad, int QuadIndex, int PointIndex)
Definition: editor.cpp:1544
IGraphics::CTextureHandle GetSwitchTexture()
Definition: editor.cpp:8410
static CUi::EPopupMenuFunctionResult PopupMenuSettings(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:219
void ToggleEnvPoint(int Index, int Channel)
Definition: editor.cpp:632
int m_SelectedSound
Definition: editor.h:806
std::shared_ptr< CLayerGroup > GetSelectedGroup() const
Definition: editor.cpp:434
void SelectEnvPoint(int Index)
Definition: editor.cpp:618
float EnvelopeToScreenY(const CUIRect &View, float y) const
Definition: editor.cpp:6037
static CUi::EPopupMenuFunctionResult PopupTele(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2435
std::string m_SelectEntitiesImage
Definition: editor.h:735
@ POPEVENT_IMAGE_MAX
Definition: editor.h:612
@ POPEVENT_LOAD
Definition: editor.h:601
@ POPEVENT_LARGELAYER
Definition: editor.h:609
@ POPEVENT_SAVE_COPY
Definition: editor.h:606
@ POPEVENT_EXIT
Definition: editor.h:600
@ POPEVENT_SOUND_MAX
Definition: editor.h:613
@ POPEVENT_SAVE_SOUND
Definition: editor.h:608
@ POPEVENT_LOADCURRENT
Definition: editor.h:602
@ POPEVENT_NEW
Definition: editor.h:604
@ POPEVENT_PIXELART_BIG_IMAGE
Definition: editor.h:615
@ POPEVENT_PREVENTUNUSEDTILES
Definition: editor.h:610
@ POPEVENT_PLACE_BORDER_TILES
Definition: editor.h:614
@ POPEVENT_SAVE
Definition: editor.h:605
@ POPEVENT_SAVE_IMG
Definition: editor.h:607
@ POPEVENT_LOADDROP
Definition: editor.h:603
@ POPEVENT_PIXELART_TOO_MANY_COLORS
Definition: editor.h:617
@ POPEVENT_PIXELART_MANY_COLORS
Definition: editor.h:616
@ POPEVENT_IMAGEDIV16
Definition: editor.h:611
class IConfigManager * m_pConfigManager
Definition: editor.h:279
class CConfig * Config() const
Definition: editor.h:321
bool m_BrushDrawDestructive
Definition: editor.h:626
class IInput * m_pInput
Definition: editor.h:277
bool m_PreviewZoom
Definition: editor.h:750
float m_OffsetEnvelopeX
Definition: editor.h:743
void RenderMapSettingsErrorDialog()
Definition: editor_server_settings.cpp:547
void AddSwitchLayer()
Definition: quick_actions.cpp:87
ColorRGBA GetButtonColor(const void *pId, int Checked)
Definition: editor.cpp:126
class IEngine * Engine() const
Definition: editor.h:323
static const char * Explain(EExplanation Explanation, int Tile, int Layer)
Definition: explanations.cpp:669
int PopupSelectImageResult()
Definition: popups.cpp:2255
void UpdateZoomEnvelopeX(const CUIRect &View)
Definition: editor.cpp:5938
CMapView * MapView()
Definition: editor.h:331
ECursorType
Definition: editor.h:825
@ NUM_CURSORS
Definition: editor.h:829
@ CURSOR_NORMAL
Definition: editor.h:826
@ CURSOR_RESIZE_V
Definition: editor.h:827
@ CURSOR_RESIZE_H
Definition: editor.h:828
static bool CompareFilenameDescending(const CFilelistItem *pLhs, const CFilelistItem *pRhs)
Definition: editor.h:691
std::pair< int, int > m_SelectedTangentInPoint
Definition: editor.h:808
void RedoLastAction()
Definition: editor.cpp:9056
void HandleWriterFinishJobs()
Definition: editor.cpp:8665
void Render()
Definition: editor.cpp:7845
EPreviewState m_FilePreviewState
Definition: editor.h:659
static bool CompareFilenameAscending(const CFilelistItem *pLhs, const CFilelistItem *pRhs)
Definition: editor.h:678
void ResetIngameMoved() override
Definition: editor.h:506
int m_SelectedGroup
Definition: editor.h:799
class CConfig * m_pConfig
Definition: editor.h:280
static const ColorRGBA ms_DefaultPropColor
Definition: editor.h:315
void RenderSelectedImage(CUIRect View)
Definition: editor.cpp:4892
void DeselectQuadPoints()
Definition: editor.cpp:525
int m_SelectedQuadEnvelope
Definition: editor.h:803
CMapView m_MapView
Definition: editor.h:291
IGraphics::CTextureHandle m_EntitiesTexture
Definition: editor.h:297
void PlaceBorderTiles()
Definition: editor.cpp:8479
bool Load(const char *pFilename, int StorageType) override
Definition: editor.cpp:8880
void UpdateZoomEnvelopeY(const CUIRect &View)
Definition: editor.cpp:5951
void RefreshFilteredFileList()
Definition: editor.cpp:5572
short m_SpeedupAngle
Definition: editor.h:1169
bool ReplaceSound(const char *pFileName, int StorageType, bool CheckDuplicate)
Definition: editor.cpp:4635
unsigned char m_ViewTeleNumber
Definition: editor.h:1162
void AddQuadOrSound()
Definition: quick_actions.cpp:23
EExtraEditor
Definition: editor.h:775
@ EXTRAEDITOR_ENVELOPES
Definition: editor.h:777
@ EXTRAEDITOR_NONE
Definition: editor.h:776
@ NUM_EXTRAEDITORS
Definition: editor.h:780
@ EXTRAEDITOR_SERVER_SETTINGS
Definition: editor.h:778
@ EXTRAEDITOR_HISTORY
Definition: editor.h:779
std::shared_ptr< CLayerQuads > m_pQuadsetPicker
Definition: editor.h:838
int m_FileDialogFileType
Definition: editor.h:651
ColorRGBA m_aSavedColors[8]
Definition: editor.h:817
void InvokeFileDialog(int StorageType, int FileType, const char *pTitle, const char *pButtonText, const char *pBasepath, bool FilenameAsDefault, bool(*pfnFunc)(const char *pFilename, int StorageType, void *pUser), void *pUser)
Definition: editor.cpp:5683
void RenderImagesList(CUIRect Toolbox)
Definition: editor.cpp:4741
void PopupSelectSoundInvoke(int Current, float x, float y)
Definition: popups.cpp:2302
static bool AddSound(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:4571
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_FileDialogFileNameInput
Definition: editor.h:645
int m_PopupEventType
Definition: editor.h:620
unsigned char m_TuningNum
Definition: editor.h:1165
void UpdateTooltip(const void *pId, const CUIRect *pRect, const char *pToolTip)
Definition: editor.cpp:177
void DoAudioPreview(CUIRect View, const void *pPlayPauseButtonId, const void *pStopButtonId, const void *pSeekBarId, int SampleId)
Definition: editor.cpp:972
static CUi::EPopupMenuFunctionResult PopupSelectGametileOp(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2338
int m_SortByFilename
Definition: editor.h:731
SEditResult< int > UiDoValueSelector(void *pId, CUIRect *pRect, const char *pLabel, int Current, int Min, int Max, int Step, float Scale, const char *pToolTip, bool IsDegree=false, bool IsHex=false, int Corners=IGraphics::CORNER_ALL, const ColorRGBA *pColor=nullptr, bool ShowValue=true)
Definition: editor.cpp:296
int m_AllowPlaceUnusedTiles
Definition: editor.h:625
int m_PopupEventWasActivated
Definition: editor.h:622
float ScreenToEnvelopeDY(const CUIRect &View, float DeltaY)
Definition: editor.cpp:6047
static CUi::EPopupMenuFunctionResult PopupMenuTools(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:143
void RenderLayers(CUIRect LayersBox)
Definition: editor.cpp:3759
CEditor()
Definition: editor.h:358
void ZoomAdaptOffsetX(float ZoomFactor, const CUIRect &View)
Definition: editor.cpp:5932
int m_SelectedQuadIndex
Definition: editor.h:798
bool IsTangentOutPointSelected(int Index, int Channel) const
Definition: editor.cpp:677
class IGraphics * Graphics() const
Definition: editor.h:324
void AddTileLayer()
Definition: quick_actions.cpp:66
bool m_ShowDetail
Definition: editor.h:766
CRenderTools * RenderTools()
Definition: editor.h:329
int m_Mentions
Definition: editor.h:628
void ComputePointAlignments(const std::shared_ptr< CLayerQuads > &pLayer, CQuad *pQuad, int QuadIndex, int PointIndex, int OffsetX, int OffsetY, std::vector< SAlignmentInfo > &vAlignments, bool Append=false) const
Definition: editor.cpp:1588
bool m_FileDialogOpening
Definition: editor.h:662
CImageInfo m_TileartImageInfo
Definition: editor.h:853
static bool CallbackAddTileart(const char *pFilepath, int StorageType, void *pUser)
Definition: tileart.cpp:192
int m_FilePreviewImageHeight
Definition: editor.h:661
CSmoothValue m_ZoomEnvelopeX
Definition: editor.h:738
void FillGameTiles(EGameTileOp FillTile) const
Definition: quick_actions.cpp:8
static CUi::EPopupMenuFunctionResult PopupSound(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:1760
void RenderSounds(CUIRect Toolbox)
Definition: editor.cpp:4915
bool IsQuadSelected(int Index) const
Definition: editor.cpp:582
float m_aExtraEditorSplits[NUM_EXTRAEDITORS]
Definition: editor.h:783
std::deque< std::shared_ptr< CDataFileWriterFinishJob > > m_WriterFinishJobs
Definition: editor.h:843
CEditorHistory m_ServerSettingsHistory
Definition: editor.h:1181
bool IsInTriangle(vec2 Point, vec2 A, vec2 B, vec2 C)
Definition: editor.cpp:2560
std::vector< int > m_vSelectedLayers
Definition: editor.h:795
CLayerSelector * LayerSelector()
Definition: editor.h:333
void LoadCurrentMap()
Definition: editor.cpp:8834
void SortFilteredFileList()
Definition: editor.cpp:5033
void DoSoundSource(int LayerIndex, CSoundSource *pSource, int Index)
Definition: editor.cpp:1441
IGraphics::CTextureHandle m_BackgroundTexture
Definition: editor.h:822
void RenderEditorHistory(CUIRect View)
Definition: editor.cpp:7552
bool PerformAutosave()
Definition: editor.cpp:8629
void SelectPreviousLayer()
Definition: editor.cpp:765
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_FileDialogNewFolderNameInput
Definition: editor.h:655
int PopupSelectSoundResult()
Definition: popups.cpp:2310
SEditResult< E > DoPropertiesWithState(CUIRect *pToolbox, CProperty *pProps, int *pIds, int *pNewVal, const std::vector< ColorRGBA > &vColors={})
Definition: editor_props.cpp:19
unsigned char m_SwitchDelay
Definition: editor.h:1172
void UndoLastAction()
Definition: editor.cpp:9046
void DeselectEnvPoints()
Definition: editor.cpp:664
bool m_PreventUnusedTilesWasWarned
Definition: editor.h:624
bool m_FileDialogShowingRoot
Definition: editor.h:653
void SelectQuadPoint(int QuadIndex, int Index)
Definition: editor.cpp:530
CUi m_UI
Definition: editor.h:288
IGraphics::CTextureHandle m_TeleTexture
Definition: editor.h:300
static bool CallbackSaveCopyMap(const char *pFileName, int StorageType, void *pUser)
Definition: editor.cpp:860
std::vector< const CFilelistItem * > m_vpFilteredFileList
Definition: editor.h:676
unsigned char m_SwitchNum
Definition: editor.h:1171
float m_MouseWorldScale
Definition: editor.h:751
static CUi::EPopupMenuFunctionResult PopupSelectConfigAutoMap(void *pContext, CUIRect View, bool Active)
Definition: popups.cpp:2376
EShowEnvelope m_ShowEnvelopePreview
Definition: editor.h:792
void ResetMentions() override
Definition: editor.h:504
void DrawAxis(EAxis Axis, CPoint &OriginalPoint, CPoint &Point) const
Definition: editor.cpp:1566
void RenderFileDialog()
Definition: editor.cpp:5054
Definition: editor_trackers.h:73
EType
Definition: envelope.h:15
Definition: layer_group.h:10
Definition: layer_selector.h:7
class ITextRender * TextRender()
Definition: editor.h:1195
class CEditor * m_pEditor
Definition: layer.h:18
class IGraphics * Graphics()
Definition: editor.h:1194
Definition: editor_server_settings.h:227
Definition: editor_server_settings.h:195
Definition: map_view.h:14
int m_Max
Definition: editor.h:235
int m_Value
Definition: editor.h:232
int m_Type
Definition: editor.h:233
CProperty(std::nullptr_t)
Definition: editor.h:228
CProperty(const char *pName, int Value, int Type, int Min, int Max)
Definition: editor.h:225
const char * m_pName
Definition: editor.h:231
int m_Min
Definition: editor.h:234
Definition: editor_trackers.h:19
Definition: smooth_value.h:12
Definition: mapitems.h:236
EPopupMenuFunctionResult
Definition: ui.h:289
Definition: graphics.h:200
void Invalidate()
Definition: graphics.h:213
Definition: graphics.h:183
@ CORNER_ALL
Definition: graphics.h:430
Definition: textrender.h:312
std::function< void(int *pIndex)> FIndexModifyFunction
Definition: editor.h:52
#define REGISTER_QUICK_ACTION(name, text, callback, disabled, active, button_color, description)
Definition: editor.h:354
std::function< void(const T &, char(&aOutput)[128], std::vector< STextColorSplit > &)> FDropdownRenderCallback
Definition: editor.h:54
@ PROPTYPE_NULL
Definition: editor.h:240
@ PROPTYPE_BOOL
Definition: editor.h:241
@ PROPTYPE_SHIFT
Definition: editor.h:247
@ PROPTYPE_COLOR
Definition: editor.h:244
@ PROPTYPE_ENVELOPE
Definition: editor.h:246
@ PROPTYPE_AUTOMAPPER
Definition: editor.h:249
@ PROPTYPE_ANGLE_SCROLL
Definition: editor.h:243
@ PROPTYPE_IMAGE
Definition: editor.h:245
@ PROPTYPE_SOUND
Definition: editor.h:248
@ PROPTYPE_INT
Definition: editor.h:242
@ DIALOG_NONE
Definition: editor.h:64
@ DIALOG_QUICK_PROMPT
Definition: editor.h:67
@ DIALOG_FILE
Definition: editor.h:65
@ MODE_SOUNDS
Definition: editor.h:61
@ MODE_LAYERS
Definition: editor.h:59
@ DIALOG_MAPSETTINGS_ERROR
Definition: editor.h:66
@ NUM_MODES
Definition: editor.h:62
@ MODE_IMAGES
Definition: editor.h:60
EGameTileOp
Definition: enums.h:20
void mem_zero(T *block, size_t size)
Definition: system.h:178
int str_comp_filenames(const char *a, const char *b)
Definition: system.cpp:2943
int str_comp(const char *a, const char *b)
Definition: system.cpp:2933
int str_copy(char *dst, const char *src, int dst_size)
Definition: system.cpp:2720
#define GNUC_ATTRIBUTE(x)
Definition: log.h:10
@ TILE_TELEINEVIL
Definition: mapitems.h:111
@ TILE_TELEIN
Definition: mapitems.h:129
@ TILE_TELECHECKOUT
Definition: mapitems.h:133
@ TILE_TELEINWEAPON
Definition: mapitems.h:115
@ TILE_TELEOUT
Definition: mapitems.h:130
@ TILE_TELECHECK
Definition: mapitems.h:132
@ TILE_TELEINHOOK
Definition: mapitems.h:116
static MAYBE_UNUSED constexpr float MENU
Definition: editor_ui.h:19
bool m_IsLink
Definition: editor.h:671
bool m_IsDir
Definition: editor.h:670
int m_StorageType
Definition: editor.h:672
time_t m_TimeModified
Definition: editor.h:673
char m_aName[IO_MAX_PATH_LENGTH]
Definition: editor.h:669
char m_aFilename[IO_MAX_PATH_LENGTH]
Definition: editor.h:668
int m_Diff
Definition: editor.h:1001
CPoint m_AlignedPoint
Definition: editor.h:991
int m_X
Definition: editor.h:996
int m_Y
Definition: editor.h:997
int m_PointIndex
Definition: editor.h:1000
EAxis m_Axis
Definition: editor.h:999
@ NUM_POINTS
Definition: editor.h:970
@ POINT_CENTER
Definition: editor.h:969
@ POINT_TR
Definition: editor.h:966
@ POINT_TL
Definition: editor.h:965
@ POINT_BL
Definition: editor.h:967
@ POINT_BR
Definition: editor.h:968
CPoint m_aPoints[NUM_POINTS]
Definition: editor.h:972
bool operator()(const char *pLhs, const char *pRhs) const
Definition: editor.h:521
Definition: layer_tiles.h:140
Definition: mapitems.h:223
Definition: mapitems.h:483
Definition: editor_ui.h:7
Definition: editor_server_settings.h:47
@ TEXTALIGN_MC
Definition: textrender.h:35
@ IO_MAX_PATH_LENGTH
Definition: types.h:43
vector2_base< float > vec2
Definition: vmath.h:158