mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
6002: Explain -DANTIBOT=ON a bit better (fixes #6001) r=heinrich5991 a=def- <!-- What is the motivation for the changes of this pull request? --> <!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 6003: Fix height and margin of sound and image popups r=def- a=Robyt3 ## Checklist - [X] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test (especially base/) or added coverage to integration test - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Dennis Felsing <dennis@felsin9.de> Co-authored-by: Robert Müller <robytemueller@gmail.com>
This commit is contained in:
commit
8d7442e328
|
@ -116,7 +116,7 @@ option(AUTOUPDATE "Enable the autoupdater" OFF)
|
|||
option(INFORM_UPDATE "Inform about available updates" ON)
|
||||
option(VIDEORECORDER "Enable video recording support via FFmpeg" ON)
|
||||
option(UPNP "Enable UPnP support" OFF)
|
||||
option(ANTIBOT "Enable support for a dynamic anticheat library" OFF)
|
||||
option(ANTIBOT "Enable support for a dynamic anticheat library (not provided, see src/antibot for interface if you want to implement your own)" OFF)
|
||||
option(HEADLESS_CLIENT "Build the client without graphics" OFF)
|
||||
option(CLIENT "Compile client" ON)
|
||||
option(SERVER "Compile server" ON)
|
||||
|
|
|
@ -3814,7 +3814,6 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
static int s_RemoveButton = 0;
|
||||
|
||||
CUIRect Slot;
|
||||
View.HSplitTop(2.0f, &Slot, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
CEditorImage *pImg = pEditor->m_Map.m_vpImages[pEditor->m_SelectedImage];
|
||||
|
||||
|
@ -3826,7 +3825,7 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
pImg->m_External = 0;
|
||||
return 1;
|
||||
}
|
||||
View.HSplitTop(5.0f, &Slot, &View);
|
||||
View.HSplitTop(5.0f, nullptr, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
}
|
||||
else if(IsVanillaImage(pImg->m_aName))
|
||||
|
@ -3836,7 +3835,7 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
pImg->m_External = 1;
|
||||
return 1;
|
||||
}
|
||||
View.HSplitTop(5.0f, &Slot, &View);
|
||||
View.HSplitTop(5.0f, nullptr, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
}
|
||||
|
||||
|
@ -3845,12 +3844,12 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
bool bIsExternal = pImg->m_External;
|
||||
char aBuffer[1024];
|
||||
str_format(aBuffer, sizeof(aBuffer), "mapres/%s.png", pImg->m_aName);
|
||||
pEditor->ReplaceImage(aBuffer, IStorage::TYPE_ALL, pEditor);
|
||||
ReplaceImage(aBuffer, IStorage::TYPE_ALL, pEditor);
|
||||
pImg->m_External = bIsExternal;
|
||||
return 1;
|
||||
}
|
||||
|
||||
View.HSplitTop(5.0f, &Slot, &View);
|
||||
View.HSplitTop(5.0f, nullptr, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
if(pEditor->DoButton_MenuItem(&s_ReplaceButton, "Replace", 0, &Slot, 0, "Replaces the image with a new one"))
|
||||
{
|
||||
|
@ -3858,7 +3857,7 @@ int CEditor::PopupImage(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
return 1;
|
||||
}
|
||||
|
||||
View.HSplitTop(5.0f, &Slot, &View);
|
||||
View.HSplitTop(5.0f, nullptr, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
if(pEditor->DoButton_MenuItem(&s_RemoveButton, "Remove", 0, &Slot, 0, "Removes the image from the map"))
|
||||
{
|
||||
|
@ -3879,7 +3878,6 @@ int CEditor::PopupSound(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
static int s_RemoveButton = 0;
|
||||
|
||||
CUIRect Slot;
|
||||
View.HSplitTop(2.0f, &Slot, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
CEditorSound *pSound = pEditor->m_Map.m_vpSounds[pEditor->m_SelectedSound];
|
||||
|
||||
|
@ -3887,11 +3885,11 @@ int CEditor::PopupSound(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
{
|
||||
char aBuffer[1024];
|
||||
str_format(aBuffer, sizeof(aBuffer), "mapres/%s.opus", pSound->m_aName);
|
||||
pEditor->ReplaceSound(aBuffer, IStorage::TYPE_ALL, pEditor);
|
||||
ReplaceSound(aBuffer, IStorage::TYPE_ALL, pEditor);
|
||||
return 1;
|
||||
}
|
||||
|
||||
View.HSplitTop(5.0f, &Slot, &View);
|
||||
View.HSplitTop(5.0f, nullptr, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
if(pEditor->DoButton_MenuItem(&s_ReplaceButton, "Replace", 0, &Slot, 0, "Replaces the sound with a new one"))
|
||||
{
|
||||
|
@ -3899,7 +3897,7 @@ int CEditor::PopupSound(CEditor *pEditor, CUIRect View, void *pContext)
|
|||
return 1;
|
||||
}
|
||||
|
||||
View.HSplitTop(5.0f, &Slot, &View);
|
||||
View.HSplitTop(5.0f, nullptr, &View);
|
||||
View.HSplitTop(12.0f, &Slot, &View);
|
||||
if(pEditor->DoButton_MenuItem(&s_RemoveButton, "Remove", 0, &Slot, 0, "Removes the sound from the map"))
|
||||
{
|
||||
|
@ -4093,7 +4091,7 @@ void CEditor::RenderImagesList(CUIRect ToolBox)
|
|||
if(pImg->m_External || IsVanillaImage(pImg->m_aName))
|
||||
Height = 73;
|
||||
else
|
||||
Height = 60;
|
||||
Height = 56;
|
||||
UiInvokePopupMenu(&s_PopupImageID, 0, UI()->MouseX(), UI()->MouseY(), 120, Height, PopupImage);
|
||||
}
|
||||
}
|
||||
|
@ -4211,7 +4209,7 @@ void CEditor::RenderSounds(CUIRect ToolBox)
|
|||
|
||||
static int s_PopupSoundID = 0;
|
||||
if(Result == 2)
|
||||
UiInvokePopupMenu(&s_PopupSoundID, 0, UI()->MouseX(), UI()->MouseY(), 120, 43, PopupSound);
|
||||
UiInvokePopupMenu(&s_PopupSoundID, 0, UI()->MouseX(), UI()->MouseY(), 120, 56, PopupSound);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue