diff --git a/scripts/android/files/java/org/ddnet/client/NativeMain.java b/scripts/android/files/java/org/ddnet/client/NativeMain.java
index fc994236d4a..e56d4cebca8 100644
--- a/scripts/android/files/java/org/ddnet/client/NativeMain.java
+++ b/scripts/android/files/java/org/ddnet/client/NativeMain.java
@@ -29,8 +29,8 @@ public void onCreate(Bundle SavedInstanceState) {
if(gfxBackend != null) {
if(gfxBackend.equals("Vulkan")) {
launchArguments = new String[] {"gfx_backend Vulkan"};
- } else if(gfxBackend.equals("OpenGL")) {
- launchArguments = new String[] {"gfx_backend OpenGL"};
+ } else if(gfxBackend.equals("GLES")) {
+ launchArguments = new String[] {"gfx_backend GLES"};
}
}
}
diff --git a/scripts/android/files/res/values/strings.xml b/scripts/android/files/res/values/strings.xml
index 24bbf05b02c..c9b6483ce76 100644
--- a/scripts/android/files/res/values/strings.xml
+++ b/scripts/android/files/res/values/strings.xml
@@ -2,5 +2,5 @@
DDNet
Play (Vulkan)
- Play (OpenGL)
+ Play (OpenGL ES)
diff --git a/scripts/android/files/res/xml/shortcuts.xml b/scripts/android/files/res/xml/shortcuts.xml
index 558afd216d5..c2ebe2357d7 100644
--- a/scripts/android/files/res/xml/shortcuts.xml
+++ b/scripts/android/files/res/xml/shortcuts.xml
@@ -14,17 +14,17 @@
+ android:shortcutShortLabel="@string/shortcut_play_gles_short">
+ android:value="GLES" />
diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp
index b39b700be98..07cd529da78 100644
--- a/src/engine/client/serverbrowser.cpp
+++ b/src/engine/client/serverbrowser.cpp
@@ -1172,7 +1172,7 @@ void CServerBrowser::UpdateFromHttp()
}
// (Also add favorites we're not allowed to ping.)
CServerEntry *pEntry = Add(pFavorites[i].m_aAddrs, pFavorites[i].m_NumAddrs);
- if(pFavorites->m_AllowPing)
+ if(pFavorites[i].m_AllowPing)
{
QueueRequest(pEntry);
}
diff --git a/src/engine/shared/config_variables.h b/src/engine/shared/config_variables.h
index 6b5c7cd44ae..3323a49ccfd 100644
--- a/src/engine/shared/config_variables.h
+++ b/src/engine/shared/config_variables.h
@@ -109,6 +109,7 @@ MACRO_CONFIG_INT(EdShowkeys, ed_showkeys, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE
MACRO_CONFIG_INT(EdAlignQuads, ed_align_quads, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Enable/disable quad alignment. When enabled, red lines appear to show how quad/points are aligned and snapped to other quads/points when moving them")
MACRO_CONFIG_INT(EdShowQuadsRect, ed_show_quads_rect, 0, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show the bounds of the selected quad. In case of multiple quads, it shows the bounds of the englobing rect. Can be helpful when aligning a group of quads")
MACRO_CONFIG_INT(EdAutoMapReload, ed_auto_map_reload, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Run 'hot_reload' on the local server while rcon authed on map save")
+MACRO_CONFIG_INT(EdLayerSelector, ed_layer_selector, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Ctrl+right click tiles to select their layers in the editor")
MACRO_CONFIG_INT(ClShowWelcome, cl_show_welcome, 1, 0, 1, CFGFLAG_CLIENT | CFGFLAG_SAVE, "Show welcome message indicating the first launch of the client")
MACRO_CONFIG_INT(ClMotdTime, cl_motd_time, 10, 0, 100, CFGFLAG_CLIENT | CFGFLAG_SAVE, "How long to show the server message of the day")
@@ -717,7 +718,9 @@ MACRO_CONFIG_STR(Gfx3DTextureAnalysisRenderer, gfx_3d_texture_analysis_renderer,
MACRO_CONFIG_STR(Gfx3DTextureAnalysisVersion, gfx_3d_texture_analysis_version, 128, "", CFGFLAG_SAVE | CFGFLAG_CLIENT, "The version on which the analysis was performed")
MACRO_CONFIG_STR(GfxGpuName, gfx_gpu_name, 256, "auto", CFGFLAG_SAVE | CFGFLAG_CLIENT, "The GPU's name, which will be selected by the backend. (if supported by the backend)")
-#if !defined(CONF_ARCH_IA32) && !defined(CONF_PLATFORM_MACOS)
+#if defined(CONF_PLATFORM_ANDROID)
+MACRO_CONFIG_STR(GfxBackend, gfx_backend, 256, "GLES", CFGFLAG_SAVE | CFGFLAG_CLIENT, "The backend to use (e.g. GLES or Vulkan)")
+#elif !defined(CONF_ARCH_IA32) && !defined(CONF_PLATFORM_MACOS)
MACRO_CONFIG_STR(GfxBackend, gfx_backend, 256, "Vulkan", CFGFLAG_SAVE | CFGFLAG_CLIENT, "The backend to use (e.g. OpenGL or Vulkan)")
#else
MACRO_CONFIG_STR(GfxBackend, gfx_backend, 256, "OpenGL", CFGFLAG_SAVE | CFGFLAG_CLIENT, "The backend to use (e.g. OpenGL or Vulkan)")
diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp
index 1e61dd2878e..a4382cf3880 100644
--- a/src/game/editor/editor.cpp
+++ b/src/game/editor/editor.cpp
@@ -3216,7 +3216,12 @@ void CEditor::DoMapEditor(CUIRect View)
else if(m_pBrush->IsEmpty() && GetSelectedLayerType(0, LAYERTYPE_QUADS) != nullptr)
str_copy(m_aTooltip, "Use left mouse button to drag and create a brush. Hold shift to select multiple quads. Press R to rotate selected quads. Use ctrl+right mouse to select layer.");
else if(m_pBrush->IsEmpty())
- str_copy(m_aTooltip, "Use left mouse button to drag and create a brush. Use ctrl+right mouse to select layer.");
+ {
+ if(g_Config.m_EdLayerSelector)
+ str_copy(m_aTooltip, "Use left mouse button to drag and create a brush. Use ctrl+right click to select layer for hovered tile.");
+ else
+ str_copy(m_aTooltip, "Use left mouse button to drag and create a brush.");
+ }
else
str_copy(m_aTooltip, "Use left mouse button to paint with the brush. Right button clears the brush.");
@@ -7670,7 +7675,7 @@ void CEditor::RenderMenubar(CUIRect MenuBar)
if(DoButton_Ex(&s_SettingsButton, "Settings", 0, &SettingsButton, 0, nullptr, IGraphics::CORNER_T, EditorFontSizes::MENU, TEXTALIGN_ML))
{
static SPopupMenuId s_PopupMenuEntitiesId;
- Ui()->DoPopupMenu(&s_PopupMenuEntitiesId, SettingsButton.x, SettingsButton.y + SettingsButton.h - 1.0f, 200.0f, 106.0f, this, PopupMenuSettings, PopupProperties);
+ Ui()->DoPopupMenu(&s_PopupMenuEntitiesId, SettingsButton.x, SettingsButton.y + SettingsButton.h - 1.0f, 210.0f, 120.0f, this, PopupMenuSettings, PopupProperties);
}
CUIRect ChangedIndicator, Info, Help, Close;
diff --git a/src/game/editor/layer_selector.cpp b/src/game/editor/layer_selector.cpp
index f2e3c810e15..4db70b67c84 100644
--- a/src/game/editor/layer_selector.cpp
+++ b/src/game/editor/layer_selector.cpp
@@ -1,3 +1,5 @@
+#include
+
#include "editor.h"
#include "layer_selector.h"
@@ -16,6 +18,8 @@ bool CLayerSelector::SelectByTile()
return false;
if(!Input()->ModifierIsPressed() || !Ui()->MouseButtonClicked(1))
return false;
+ if(!g_Config.m_EdLayerSelector)
+ return false;
int MatchedGroup = -1;
int MatchedLayer = -1;
diff --git a/src/game/editor/popups.cpp b/src/game/editor/popups.cpp
index ed99be9c8bd..f53e50d3e20 100644
--- a/src/game/editor/popups.cpp
+++ b/src/game/editor/popups.cpp
@@ -388,6 +388,30 @@ CUi::EPopupMenuFunctionResult CEditor::PopupMenuSettings(void *pContext, CUIRect
}
}
+ View.HSplitTop(2.0f, nullptr, &View);
+ View.HSplitTop(12.0f, &Slot, &View);
+ {
+ Slot.VMargin(5.0f, &Slot);
+
+ CUIRect Label, Selector;
+ Slot.VSplitMid(&Label, &Selector);
+ CUIRect No, Yes;
+ Selector.VSplitMid(&No, &Yes);
+
+ pEditor->Ui()->DoLabel(&Label, "Select layers by tile", 10.0f, TEXTALIGN_ML);
+
+ static int s_ButtonNo = 0;
+ static int s_ButtonYes = 0;
+ if(pEditor->DoButton_Ex(&s_ButtonNo, "No", !g_Config.m_EdLayerSelector, &No, 0, "Do not select layers when Ctrl+right clicking on a tile", IGraphics::CORNER_L))
+ {
+ g_Config.m_EdLayerSelector = false;
+ }
+ if(pEditor->DoButton_Ex(&s_ButtonYes, "Yes", g_Config.m_EdLayerSelector, &Yes, 0, "Select layers when Ctrl+right clicking on a tile", IGraphics::CORNER_R))
+ {
+ g_Config.m_EdLayerSelector = true;
+ }
+ }
+
return CUi::POPUP_KEEP_OPEN;
}