mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-19 17:14:18 +00:00
Compare commits
1 commit
c93cb1ba15
...
7a4a2c51cd
Author | SHA1 | Date | |
---|---|---|---|
Chiller Dragon | 7a4a2c51cd |
|
@ -1,40 +1,15 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
android:installLocation="auto">
|
|
||||||
|
|
||||||
<!-- Vulkan 1.1.0 is used if supported -->
|
<!-- Vulkan 1.1.0 is used if supported -->
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.vulkan.version"
|
android:name="android.hardware.vulkan.version"
|
||||||
android:required="false"
|
android:required="false"
|
||||||
android:version="0x00401000" />
|
android:version="0x00401000" />
|
||||||
<!-- android:glEsVersion is not specified as OpenGL ES 1.0 is supported as fallback -->
|
<!-- android:glEsVersion is not specified as OpenGL ES 1.0 is supported as fallback -->
|
||||||
|
|
||||||
<!-- Only playable in landscape mode -->
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.screen.landscape"
|
android:name="android.hardware.screen.landscape"
|
||||||
android:required="true" />
|
android:required="true" />
|
||||||
|
|
||||||
<!-- Touchscreen support -->
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.touchscreen"
|
|
||||||
android:required="false" />
|
|
||||||
|
|
||||||
<!-- Game controller support -->
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.bluetooth"
|
|
||||||
android:required="false" />
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.gamepad"
|
|
||||||
android:required="false" />
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.usb.host"
|
|
||||||
android:required="false" />
|
|
||||||
|
|
||||||
<!-- External mouse input events -->
|
|
||||||
<uses-feature
|
|
||||||
android:name="android.hardware.type.pc"
|
|
||||||
android:required="false" />
|
|
||||||
|
|
||||||
<!-- Teeworlds does broadcasts over local networks -->
|
<!-- Teeworlds does broadcasts over local networks -->
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
|
||||||
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
|
||||||
|
@ -50,24 +25,17 @@
|
||||||
android:isGame="true"
|
android:isGame="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
|
||||||
android:hardwareAccelerated="true">
|
|
||||||
<activity
|
<activity
|
||||||
android:name="org.ddnet.client.NativeMain"
|
android:name="org.ddnet.client.NativeMain"
|
||||||
android:alwaysRetainTaskState="true"
|
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
|
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
|
||||||
android:preferMinimalPostProcessing="true"
|
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="landscape"
|
||||||
android:launchMode="singleInstance">
|
android:launchMode="singleInstance">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
<!-- Let Android know that we can handle some USB devices and should receive this event -->
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
|
|
||||||
</intent-filter>
|
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="android.app.lib_name"
|
android:name="android.app.lib_name"
|
||||||
android:value="DDNet" />
|
android:value="DDNet" />
|
||||||
|
|
|
@ -283,7 +283,6 @@ void CVideo::Pause(bool Pause)
|
||||||
void CVideo::Stop()
|
void CVideo::Stop()
|
||||||
{
|
{
|
||||||
dbg_assert(!m_Stopped, "Already stopped");
|
dbg_assert(!m_Stopped, "Already stopped");
|
||||||
m_Stopped = true;
|
|
||||||
|
|
||||||
m_pGraphics->WaitForIdle();
|
m_pGraphics->WaitForIdle();
|
||||||
|
|
||||||
|
@ -342,6 +341,8 @@ void CVideo::Stop()
|
||||||
pSound->PauseAudioDevice();
|
pSound->PauseAudioDevice();
|
||||||
delete ms_pCurrentVideo;
|
delete ms_pCurrentVideo;
|
||||||
pSound->UnpauseAudioDevice();
|
pSound->UnpauseAudioDevice();
|
||||||
|
|
||||||
|
m_Stopped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVideo::NextVideoFrameThread()
|
void CVideo::NextVideoFrameThread()
|
||||||
|
|
|
@ -93,7 +93,6 @@ MAYBE_UNUSED static const char *FONT_ICON_EARTH_AMERICAS = "\xEF\x95\xBD";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_NETWORK_WIRED = "\xEF\x9B\xBF";
|
MAYBE_UNUSED static const char *FONT_ICON_NETWORK_WIRED = "\xEF\x9B\xBF";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_LIST_UL = "\xEF\x83\x8A";
|
MAYBE_UNUSED static const char *FONT_ICON_LIST_UL = "\xEF\x83\x8A";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_INFO = "\xEF\x84\xA9";
|
MAYBE_UNUSED static const char *FONT_ICON_INFO = "\xEF\x84\xA9";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_TERMINAL = "\xEF\x84\xA0";
|
|
||||||
|
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_SLASH = "\xEF\x9C\x95";
|
MAYBE_UNUSED static const char *FONT_ICON_SLASH = "\xEF\x9C\x95";
|
||||||
MAYBE_UNUSED static const char *FONT_ICON_PLAY = "\xEF\x81\x8B";
|
MAYBE_UNUSED static const char *FONT_ICON_PLAY = "\xEF\x81\x8B";
|
||||||
|
|
|
@ -160,6 +160,8 @@ class CGameConsole : public CComponent
|
||||||
static const ColorRGBA ms_SearchHighlightColor;
|
static const ColorRGBA ms_SearchHighlightColor;
|
||||||
static const ColorRGBA ms_SearchSelectedColor;
|
static const ColorRGBA ms_SearchSelectedColor;
|
||||||
|
|
||||||
|
void Toggle(int Type);
|
||||||
|
|
||||||
static void PossibleCommandsRenderCallback(int Index, const char *pStr, void *pUser);
|
static void PossibleCommandsRenderCallback(int Index, const char *pStr, void *pUser);
|
||||||
static void ConToggleLocalConsole(IConsole::IResult *pResult, void *pUserData);
|
static void ConToggleLocalConsole(IConsole::IResult *pResult, void *pUserData);
|
||||||
static void ConToggleRemoteConsole(IConsole::IResult *pResult, void *pUserData);
|
static void ConToggleRemoteConsole(IConsole::IResult *pResult, void *pUserData);
|
||||||
|
@ -194,7 +196,6 @@ public:
|
||||||
virtual bool OnInput(const IInput::CEvent &Event) override;
|
virtual bool OnInput(const IInput::CEvent &Event) override;
|
||||||
void Prompt(char (&aPrompt)[32]);
|
void Prompt(char (&aPrompt)[32]);
|
||||||
|
|
||||||
void Toggle(int Type);
|
|
||||||
bool IsClosed() { return m_ConsoleState == CONSOLE_CLOSED; }
|
bool IsClosed() { return m_ConsoleState == CONSOLE_CLOSED; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#include "menus.h"
|
#include "menus.h"
|
||||||
|
|
||||||
using namespace FontIcons;
|
|
||||||
|
|
||||||
void CMenus::RenderStartMenu(CUIRect MainView)
|
void CMenus::RenderStartMenu(CUIRect MainView)
|
||||||
{
|
{
|
||||||
GameClient()->m_MenuBackground.ChangePosition(CMenuBackground::POS_START);
|
GameClient()->m_MenuBackground.ChangePosition(CMenuBackground::POS_START);
|
||||||
|
@ -188,27 +186,13 @@ void CMenus::RenderStartMenu(CUIRect MainView)
|
||||||
}
|
}
|
||||||
|
|
||||||
// render version
|
// render version
|
||||||
CUIRect CurVersion, ConsoleButton;
|
CUIRect VersionUpdate, CurVersion;
|
||||||
MainView.HSplitBottom(45.0f, nullptr, &CurVersion);
|
MainView.HSplitBottom(20.0f, nullptr, &VersionUpdate);
|
||||||
CurVersion.VSplitRight(40.0f, &CurVersion, nullptr);
|
VersionUpdate.VSplitRight(50.0f, &CurVersion, nullptr);
|
||||||
CurVersion.HSplitTop(20.0f, &ConsoleButton, &CurVersion);
|
VersionUpdate.VMargin(VMargin, &VersionUpdate);
|
||||||
CurVersion.HSplitTop(5.0f, nullptr, &CurVersion);
|
|
||||||
ConsoleButton.VSplitRight(40.0f, nullptr, &ConsoleButton);
|
|
||||||
Ui()->DoLabel(&CurVersion, GAME_RELEASE_VERSION, 14.0f, TEXTALIGN_MR);
|
Ui()->DoLabel(&CurVersion, GAME_RELEASE_VERSION, 14.0f, TEXTALIGN_MR);
|
||||||
|
|
||||||
static CButtonContainer s_ConsoleButton;
|
|
||||||
TextRender()->SetFontPreset(EFontPreset::ICON_FONT);
|
|
||||||
TextRender()->SetRenderFlags(ETextRenderFlags::TEXT_RENDER_FLAG_ONLY_ADVANCE_WIDTH | ETextRenderFlags::TEXT_RENDER_FLAG_NO_X_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_Y_BEARING | ETextRenderFlags::TEXT_RENDER_FLAG_NO_PIXEL_ALIGMENT | ETextRenderFlags::TEXT_RENDER_FLAG_NO_OVERSIZE);
|
|
||||||
if(DoButton_Menu(&s_ConsoleButton, FONT_ICON_TERMINAL, 0, &ConsoleButton, nullptr, IGraphics::CORNER_ALL, 5.0f, 0.0f, ColorRGBA(0.0f, 0.0f, 0.0f, 0.1f)))
|
|
||||||
{
|
|
||||||
GameClient()->m_GameConsole.Toggle(CGameConsole::CONSOLETYPE_LOCAL);
|
|
||||||
}
|
|
||||||
TextRender()->SetRenderFlags(0);
|
|
||||||
TextRender()->SetFontPreset(EFontPreset::DEFAULT_FONT);
|
|
||||||
|
|
||||||
CUIRect VersionUpdate;
|
|
||||||
MainView.HSplitBottom(20.0f, nullptr, &VersionUpdate);
|
|
||||||
VersionUpdate.VMargin(VMargin, &VersionUpdate);
|
|
||||||
#if defined(CONF_AUTOUPDATE)
|
#if defined(CONF_AUTOUPDATE)
|
||||||
CUIRect UpdateButton;
|
CUIRect UpdateButton;
|
||||||
VersionUpdate.VSplitRight(100.0f, &VersionUpdate, &UpdateButton);
|
VersionUpdate.VSplitRight(100.0f, &VersionUpdate, &UpdateButton);
|
||||||
|
|
Loading…
Reference in a new issue