Compare commits
36 Commits
54fa17e88d
...
v0.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
| b2cb5d904f | |||
| 6c92896dfd | |||
|
|
1184a53a81 | ||
|
|
03925e1ea8 | ||
| f4d5182b3f | |||
|
|
878934832a | ||
| 3db3075ca9 | |||
| a299f081d5 | |||
| e69a617a96 | |||
| d4b079bc75 | |||
| de1bd7c1b8 | |||
| 683287bfbb | |||
| 9b7f720564 | |||
| 254c8bb67d | |||
| 122eff7b03 | |||
| 5eeefc0e32 | |||
| cf4aa32061 | |||
| 0e1f2e0bd7 | |||
| 6dffd6786b | |||
| cdf30c7f09 | |||
| 4a118a3883 | |||
| 4f57184e78 | |||
| 1ab2a5069c | |||
| 2ef39942cd | |||
| d08f5169f3 | |||
| 0b83656b9d | |||
| 062232a0bc | |||
| 7b0f443426 | |||
| 08202d097f | |||
| 93a71a75b8 | |||
| 0be1ae97ff | |||
| 79a7829a24 | |||
| 3d0b16e862 | |||
| e03def7e2e | |||
| 8fcb266a42 | |||
| 31aac6252d |
@@ -8,34 +8,103 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 21
|
- name: Setup JDK
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '21'
|
java-version: '17'
|
||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
run: |
|
uses: android-actions/setup-android@v2
|
||||||
mkdir -p $ANDROID_HOME/cmdline-tools
|
|
||||||
cd $ANDROID_HOME/cmdline-tools
|
|
||||||
wget -q https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip
|
|
||||||
unzip -q cmdline-tools.zip
|
|
||||||
mv cmdline-tools latest
|
|
||||||
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null 2>&1
|
|
||||||
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
|
|
||||||
|
|
||||||
- name: Build APK
|
- name: Setup Keystore
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.ANDROIDKEYSTOREBASE64 }}" | base64 -d > app/helldivers.keystore
|
||||||
|
env:
|
||||||
|
ANDROIDKEYSTOREPATH: app/helldivers.keystore
|
||||||
|
ANDROIDKEYSTOREPASS: ${{ secrets.ANDROIDKEYSTOREPASS }}
|
||||||
|
ANDROIDKEYALIAS: ${{ secrets.ANDROIDKEYALIAS }}
|
||||||
|
ANDROIDKEYPASS: ${{ secrets.ANDROIDKEYPASS }}
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
run: |
|
run: |
|
||||||
chmod +x ./gradlew
|
chmod +x ./gradlew
|
||||||
./gradlew assembleRelease --no-daemon -Dorg.gradle.java.home=$JAVA_HOME
|
./gradlew assembleRelease --no-daemon
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: apk
|
name: apk
|
||||||
path: app/build/outputs/apk/release/*.apk
|
path: app/build/outputs/apk/release/*.apk
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
run: |
|
||||||
|
# Fetch the specific tag from remote
|
||||||
|
git fetch origin tag v0.2.0 --force
|
||||||
|
|
||||||
|
# Get tag name from git
|
||||||
|
TAG_NAME=$(git describe --tags --abbrev=0 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
if [ -z "$TAG_NAME" ]; then
|
||||||
|
TAG_NAME="${GITHUB_REF#refs/tags/}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Quitar la v del tag si existe
|
||||||
|
TAG_NAME_CLEAN="${TAG_NAME#v}"
|
||||||
|
|
||||||
|
APK_FILE=$(ls app/build/outputs/apk/release/*.apk | head -1)
|
||||||
|
|
||||||
|
# Rename APK with version
|
||||||
|
NEW_NAME="Helldivers-app-${TAG_NAME}.apk"
|
||||||
|
cp "$APK_FILE" "$NEW_NAME"
|
||||||
|
|
||||||
|
echo "=== Creating release for tag: $TAG_NAME ==="
|
||||||
|
echo "APK file: $APK_FILE"
|
||||||
|
|
||||||
|
# Use the token from secrets
|
||||||
|
if [ -z "${{ secrets.GITEATOKEN }}" ]; then
|
||||||
|
echo "ERROR: No GITEATOKEN found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create release using Gitea API - Create from existing tag
|
||||||
|
echo "Creating release..."
|
||||||
|
RELEASE_RESP=$(curl -s -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases" \
|
||||||
|
-H "accept: application/json" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||||
|
-d "{
|
||||||
|
\"tag_name\": \"${TAG_NAME}\",
|
||||||
|
\"name\": \"Release ${TAG_NAME_CLEAN}\",
|
||||||
|
\"body\": \"Built from tag ${TAG_NAME}\",
|
||||||
|
\"draft\": false,
|
||||||
|
\"prerelease\": false
|
||||||
|
}")
|
||||||
|
|
||||||
|
echo "Release response: $RELEASE_RESP"
|
||||||
|
|
||||||
|
# Extract release ID
|
||||||
|
RELEASE_ID=$(echo "$RELEASE_RESP" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
||||||
|
|
||||||
|
if [ -z "$RELEASE_ID" ]; then
|
||||||
|
echo "ERROR: Could not get release ID"
|
||||||
|
echo "$RELEASE_RESP"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Release ID: $RELEASE_ID"
|
||||||
|
|
||||||
|
# Upload the APK as an asset
|
||||||
|
echo "Uploading APK..."
|
||||||
|
UPLOAD_RESP=$(curl -s -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases/${RELEASE_ID}/assets" \
|
||||||
|
-H "accept: application/json" \
|
||||||
|
-H "Content-Type: multipart/form-data" \
|
||||||
|
-H "Authorization: token ${{ secrets.GITEATOKEN }}" \
|
||||||
|
-F "attachment=@${NEW_NAME}")
|
||||||
|
|
||||||
|
echo "Upload response: $UPLOAD_RESP"
|
||||||
|
echo "=== Release created successfully ==="
|
||||||
|
|||||||
3
.gitignore
vendored
@@ -36,3 +36,6 @@ google-services.json
|
|||||||
# Claude
|
# Claude
|
||||||
.claude/
|
.claude/
|
||||||
.settings/
|
.settings/
|
||||||
|
skills-lock.json
|
||||||
|
|
||||||
|
.agents
|
||||||
30
README.md
@@ -34,20 +34,6 @@ El APK se generará en: `app/build/outputs/apk/release/app-release.apk`
|
|||||||
adb install -r app/build/outputs/apk/release/app-release.apk
|
adb install -r app/build/outputs/apk/release/app-release.apk
|
||||||
```
|
```
|
||||||
|
|
||||||
## Pipeline CI/CD
|
|
||||||
|
|
||||||
El proyecto incluye pipeline automático para Gitea que compila releases al crear tags:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git tag v1.0.0
|
|
||||||
git push origin v1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
- **Trigger**: Tags con formato `v*`
|
|
||||||
- **JDK**: 21
|
|
||||||
- **Android SDK**: API 34, build-tools 34.0.0
|
|
||||||
- **Salida**: APK en artifacts
|
|
||||||
|
|
||||||
## Estructura del Proyecto
|
## Estructura del Proyecto
|
||||||
|
|
||||||
```
|
```
|
||||||
@@ -69,19 +55,19 @@ Helldivers/
|
|||||||
├── settings.gradle
|
├── settings.gradle
|
||||||
├── gradle.properties
|
├── gradle.properties
|
||||||
├── gradlew / gradlew.bat
|
├── gradlew / gradlew.bat
|
||||||
└── .gitea/workflows/android.yml # Pipeline CI/CD
|
└── .gitea/workflows/android.yml
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuración Técnica
|
## Configuración Técnica
|
||||||
|
|
||||||
|属性|Valor|
|
| Atributo | Valor |
|
||||||
|---|---|
|
|---|---|
|
||||||
|minSdk|18 (Android 4.3)|
|
| minSdk | 18 (Android 4.3) |
|
||||||
|targetSdk|21 (Android 5.0)|
|
| targetSdk | 21 (Android 5.0) |
|
||||||
|compileSdk|34|
|
| compileSdk | 34 |
|
||||||
|Java|21 con desugaring|
|
| Java | 21 con desugaring |
|
||||||
|AGP|8.3.0|
|
| AGP | 8.3.0 |
|
||||||
|Resolución|720x1280 xhdpi (landscape)|
|
| Resolución | 720x1280 xhdpi (landscape) |
|
||||||
|
|
||||||
## Contribución
|
## Contribución
|
||||||
|
|
||||||
|
|||||||
@@ -9,14 +9,24 @@ android {
|
|||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.helldivers.app"
|
applicationId "com.helldivers.app"
|
||||||
minSdk 18
|
minSdk 18
|
||||||
targetSdk 21
|
targetSdk 34
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName "1.0.0-LIBERTY"
|
versionName "1.0.0-LIBERTY"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
release {
|
||||||
|
storeFile file(System.getenv("ANDROIDKEYSTOREPATH") ?: "helldivers.keystore")
|
||||||
|
storePassword System.getenv("ANDROIDKEYSTOREPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
|
||||||
|
keyAlias System.getenv("ANDROIDKEYALIAS") ?: "helldivers"
|
||||||
|
keyPassword System.getenv("ANDROIDKEYPASS") ?: "HelldiversPorLaSuPerTierraYKevinTambien"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@@ -27,17 +37,11 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_21
|
sourceCompatibility JavaVersion.VERSION_17
|
||||||
targetCompatibility JavaVersion.VERSION_21
|
targetCompatibility JavaVersion.VERSION_17
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
|
||||||
toolchain {
|
|
||||||
languageVersion = JavaLanguageVersion.of(21)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
buildConfig true
|
buildConfig true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,100 +3,208 @@ package com.helldivers.app;
|
|||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.widget.Button;
|
import android.view.Gravity;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
public class ActivityGame extends AppCompatActivity {
|
public class ActivityGame extends AppCompatActivity {
|
||||||
|
|
||||||
private static final String[] ARROWS = new String[]{"\u2191", "\u2193", "\u2190", "\u2192"};
|
|
||||||
private static final int UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3;
|
private static final int UP = 0, DOWN = 1, LEFT = 2, RIGHT = 3;
|
||||||
|
|
||||||
private static final int[][] STRATAGEMS = new int[][]{
|
private static final int[][] STRATAGEMS = {
|
||||||
new int[]{UP, DOWN, RIGHT, LEFT, UP},
|
// SUPPORT WEAPONS (12 items) - from wiki
|
||||||
new int[]{DOWN, DOWN, UP, RIGHT},
|
new int[]{DOWN, LEFT, DOWN, UP, RIGHT}, // MG-43 Machine Gun
|
||||||
new int[]{UP, DOWN, RIGHT, UP},
|
new int[]{DOWN, DOWN, LEFT, UP, RIGHT}, // EAT-17 Expendable Anti-Tank
|
||||||
new int[]{RIGHT, UP, UP, DOWN},
|
new int[]{DOWN, LEFT, DOWN, UP, UP, LEFT}, // M-105 Stalwart
|
||||||
new int[]{DOWN, UP, LEFT, DOWN, UP, RIGHT, DOWN, UP},
|
new int[]{DOWN, LEFT, DOWN, UP, LEFT}, // LAS-98 Laser Cannon
|
||||||
new int[]{DOWN, UP, DOWN, UP},
|
new int[]{DOWN, LEFT, RIGHT, UP, DOWN}, // APW-1 Anti-Materiel Rifle
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, RIGHT},
|
new int[]{DOWN, LEFT, RIGHT, RIGHT, LEFT}, // GR-8 Recoilless Rifle
|
||||||
new int[]{DOWN, LEFT, RIGHT, UP, DOWN},
|
new int[]{DOWN, LEFT, UP, LEFT, DOWN}, // GL-21 Grenade Launcher
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, UP, LEFT},
|
new int[]{DOWN, LEFT, UP, DOWN, UP}, // FLAM-40 Flamethrower
|
||||||
new int[]{DOWN, DOWN, LEFT, UP, RIGHT},
|
new int[]{DOWN, LEFT, DOWN, UP, UP, RIGHT}, // AC-8 Autocannon
|
||||||
new int[]{DOWN, LEFT, RIGHT, RIGHT, LEFT},
|
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, LEFT}, // ARC-3 Arc Thrower
|
||||||
new int[]{DOWN, LEFT, UP, DOWN, UP},
|
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, RIGHT},// RS-422 Railgun
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, UP, RIGHT},
|
new int[]{DOWN, DOWN, UP, DOWN, DOWN}, // FAF-14 Spear
|
||||||
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, RIGHT},
|
|
||||||
new int[]{DOWN, DOWN, UP, DOWN, DOWN},
|
// ORBITAL (11 items)
|
||||||
new int[]{RIGHT, DOWN, LEFT, UP, UP},
|
new int[]{RIGHT, RIGHT, UP}, // Orbital Precision Strike
|
||||||
new int[]{RIGHT, RIGHT, RIGHT},
|
new int[]{RIGHT, DOWN, LEFT, UP, UP}, // Orbital Gatling Barrage
|
||||||
new int[]{RIGHT, RIGHT, DOWN, LEFT, RIGHT, DOWN},
|
new int[]{RIGHT, RIGHT, RIGHT}, // Orbital Airburst Strike
|
||||||
new int[]{RIGHT, DOWN, UP, UP, LEFT, DOWN, DOWN},
|
new int[]{RIGHT, RIGHT, DOWN, LEFT, RIGHT, DOWN}, // Orbital 120MM HE Barrage
|
||||||
new int[]{RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN},
|
new int[]{RIGHT, RIGHT, DOWN, UP}, // Orbital Smoke Strike
|
||||||
new int[]{RIGHT, DOWN, UP, RIGHT, DOWN},
|
new int[]{RIGHT, RIGHT, LEFT, DOWN}, // Orbital EMS Strike
|
||||||
new int[]{RIGHT, UP, DOWN, DOWN, RIGHT},
|
new int[]{RIGHT, DOWN, UP, UP, LEFT, DOWN, DOWN}, // Orbital 380MM HE Barrage
|
||||||
new int[]{UP, RIGHT, RIGHT},
|
new int[]{RIGHT, DOWN, RIGHT, DOWN, RIGHT, DOWN}, // Orbital Walking Barrage
|
||||||
new int[]{UP, RIGHT, DOWN, RIGHT},
|
new int[]{RIGHT, DOWN, UP, RIGHT, DOWN}, // Orbital Laser
|
||||||
new int[]{UP, RIGHT, DOWN, DOWN, RIGHT},
|
new int[]{RIGHT, UP, DOWN, DOWN, RIGHT}, // Orbital Railcannon Strike
|
||||||
new int[]{UP, RIGHT, DOWN, UP},
|
new int[]{RIGHT, RIGHT, DOWN, RIGHT}, // Orbital Gas Strike
|
||||||
new int[]{DOWN, UP, UP, DOWN, UP},
|
|
||||||
new int[]{UP, RIGHT, DOWN, UP},
|
// EAGLE (7 items)
|
||||||
new int[]{UP, RIGHT, UP, LEFT},
|
new int[]{UP, RIGHT, RIGHT}, // Eagle Strafing Run
|
||||||
new int[]{UP, RIGHT, DOWN, DOWN, DOWN},
|
new int[]{UP, RIGHT, DOWN, RIGHT}, // Eagle Airstrike
|
||||||
new int[]{UP, UP, LEFT, UP, RIGHT},
|
new int[]{UP, RIGHT, DOWN, DOWN, RIGHT}, // Eagle Cluster Bomb
|
||||||
new int[]{RIGHT, RIGHT, UP},
|
new int[]{UP, RIGHT, UP, DOWN}, // Eagle Smoke Strike
|
||||||
new int[]{RIGHT, RIGHT, DOWN, RIGHT},
|
new int[]{UP, RIGHT, DOWN, UP}, // Eagle Napalm Airstrike
|
||||||
new int[]{RIGHT, RIGHT, LEFT, DOWN},
|
new int[]{UP, RIGHT, UP, LEFT}, // Eagle 110MM Rocket Pods
|
||||||
new int[]{RIGHT, RIGHT, DOWN, UP},
|
new int[]{UP, RIGHT, DOWN, DOWN, DOWN}, // Eagle 500kg Bomb
|
||||||
new int[]{DOWN, UP, LEFT, RIGHT, RIGHT, LEFT},
|
|
||||||
new int[]{DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT},
|
// BACKPACKS (4 items)
|
||||||
new int[]{DOWN, UP, RIGHT, UP, LEFT, RIGHT},
|
new int[]{DOWN, LEFT, DOWN, UP, UP, DOWN}, // B-1 Supply Pack
|
||||||
new int[]{DOWN, LEFT, UP, RIGHT},
|
new int[]{DOWN, UP, UP, DOWN, UP}, // LIFT-850 Jump Pack
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, UP, DOWN},
|
new int[]{DOWN, LEFT, DOWN, DOWN, UP, LEFT}, // SH-20 Ballistic Shield Backpack
|
||||||
new int[]{DOWN, LEFT, UP, LEFT, DOWN},
|
new int[]{DOWN, UP, LEFT, RIGHT, LEFT, RIGHT},// SH-32 Shield Generator Pack
|
||||||
new int[]{DOWN, LEFT, DOWN, UP, LEFT},
|
|
||||||
new int[]{DOWN, LEFT, LEFT, DOWN},
|
// MINES (2 items)
|
||||||
new int[]{UP, DOWN, LEFT, UP, RIGHT, RIGHT},
|
new int[]{DOWN, LEFT, UP, RIGHT}, // MD-6 Anti-Personnel Minefield
|
||||||
new int[]{DOWN, LEFT, DOWN, DOWN, UP, LEFT},
|
new int[]{DOWN, LEFT, LEFT, DOWN}, // MD-I4 Incendiary Mines
|
||||||
new int[]{DOWN, RIGHT, DOWN, UP, LEFT, LEFT},
|
|
||||||
new int[]{DOWN, UP, LEFT, RIGHT, LEFT, RIGHT},
|
// EMPLACEMENTS (3 items)
|
||||||
new int[]{DOWN, UP, RIGHT, RIGHT, UP},
|
new int[]{DOWN, DOWN, LEFT, RIGHT,LEFT, RIGHT}, // FX-12 Shield Generator Relay
|
||||||
new int[]{DOWN, UP, RIGHT, LEFT},
|
new int[]{DOWN, UP, LEFT, RIGHT, RIGHT, LEFT}, // EMG-101 HMG Emplacement
|
||||||
new int[]{DOWN, UP, RIGHT, RIGHT, DOWN},
|
new int[]{DOWN, UP, RIGHT, UP, LEFT, RIGHT}, // AARC-3 Tesla Tower
|
||||||
new int[]{DOWN, UP, LEFT, UP, RIGHT, DOWN},
|
|
||||||
new int[]{DOWN, UP, RIGHT, UP, LEFT, UP},
|
// SENTRIES (6 items)
|
||||||
new int[]{DOWN, UP, RIGHT, RIGHT, LEFT},
|
new int[]{DOWN, UP, RIGHT, LEFT}, // AG-16 Gatling Sentry
|
||||||
new int[]{DOWN, UP, RIGHT, DOWN, RIGHT}
|
new int[]{DOWN, UP, RIGHT, RIGHT, UP}, // AMG-43 Machine Gun Sentry
|
||||||
|
new int[]{DOWN, UP, RIGHT, UP, LEFT, UP}, // AAC-8 Autocannon Sentry
|
||||||
|
new int[]{DOWN, UP, RIGHT, DOWN, UP, UP}, // AMLS-4X Rocket Sentry
|
||||||
|
new int[]{DOWN, UP, RIGHT, RIGHT, DOWN}, // AM-12 Mortar Sentry
|
||||||
|
new int[]{DOWN, UP, RIGHT, DOWN, RIGHT}, // AM-23 EMS Mortar Sentry
|
||||||
|
|
||||||
|
// MISSION (12 items)
|
||||||
|
new int[]{UP, DOWN, RIGHT, LEFT, UP}, // Reinforce
|
||||||
|
new int[]{DOWN, DOWN, UP, RIGHT}, // Resupply
|
||||||
|
new int[]{UP, DOWN, RIGHT, UP}, // SOS Beacon
|
||||||
|
new int[]{DOWN, UP, LEFT, DOWN, UP, RIGHT, DOWN}, // NUX-223 Hellbomb
|
||||||
|
new int[]{DOWN, DOWN, DOWN, UP, UP}, // SSSD Delivery
|
||||||
|
new int[]{UP, UP, LEFT, RIGHT, DOWN, DOWN}, // Seismic Probe
|
||||||
|
new int[]{UP, UP, LEFT, UP, RIGHT}, // Eagle Rearm
|
||||||
|
new int[]{DOWN, UP, DOWN, UP}, // Super Earth Flag
|
||||||
|
new int[]{LEFT, RIGHT, UP, UP, UP}, // Upload Data
|
||||||
|
new int[]{RIGHT, UP, UP, DOWN},// SEAF Artillery
|
||||||
|
new int[]{LEFT, UP, DOWN, RIGHT, DOWN, DOWN} // Hive Breaker Drill
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String[] NAMES = new String[]{
|
private static final String[] NAMES = {
|
||||||
"Reforzamiento", "Reabastecimiento", "Baliza SOS", "Artilleria", "Bomba Infernal",
|
// SUPPORT WEAPONS (0-11)
|
||||||
"Bandera", "Ametralladora", "Rifle material", "Leal", "Antitanque",
|
"MG-43 Machine Gun", "EAT-17", "M-105 Stalwart", "LAS-98 Laser Cannon", "APW-1 Anti-Materiel Rifle",
|
||||||
"Rifle retroceso", "Echador llama", "Canon auto", "Canon riel", "Lanza",
|
"GR-8 Recoilless Rifle", "GL-21 Grenade Launcher", "FLAM-40 Flamethrower", "AC-8 Autocannon",
|
||||||
"Bombardeo", "Ataque aereo", "HE 120mm", "HE 380mm", "Aluvion",
|
"ARC-3 Arc Thrower", "RS-422 Railgun", "FAF-14 Spear",
|
||||||
"Laser orbital", "Riel orbital", "Carrera", "Ataque", "Racimo",
|
// ORBITAL (12-22)
|
||||||
"Napalm", "Salto", "Humo", "Cohetes", "Bomba 500kg",
|
"Orbital Precision", "Orbital Gatling", "Orbital Airburst", "Orbital 120mm", "Orbital Smoke",
|
||||||
"Rearme", "Precision", "Gas", "EMS", "Humo2",
|
"Orbital EMS", "Orbital 380mm", "Orbital Walking", "Orbital Laser", "Orbital Railcannon", "Orbital Gas",
|
||||||
"HMG", "Escudo", "Tesla", "Minas", "Suministros",
|
// EAGLE (23-29)
|
||||||
"Granadas", "Laser", "Incendiarias", "Rover", "Balistico",
|
"Eagle Strafing", "Eagle Airstrike", "Eagle Cluster", "Eagle Smoke", "Eagle Napalm",
|
||||||
"Arco", "Escudo2", "Centinela1", "Centinela2", "Centinela3",
|
"Eagle Rocket Pods", "Eagle 500kg",
|
||||||
"Guardian", "Centinela4", "Centinela5", "Centinela6", "Centinela7"
|
// BACKPACKS (30-33)
|
||||||
|
"Supply Pack", "Jump Pack", "Ballistic Shield", "Shield Generator",
|
||||||
|
// MINES (34-35)
|
||||||
|
"Anti-Personnel Mines", "Incendiary Mines",
|
||||||
|
// EMPLACEMENTS (36-38)
|
||||||
|
"Shield Relay", "HMG Emplacement", "Tesla Tower",
|
||||||
|
// SENTRIES (39-44)
|
||||||
|
"Gatling Sentry", "MG Sentry", "Autocannon Sentry", "Rocket Sentry", "Mortar Sentry", "EMS Mortar Sentry",
|
||||||
|
// MISSION (45-56)
|
||||||
|
"Reinforce", "Resupply", "SOS Beacon", "Hellbomb", "SSSD", "Seismic Probe", "Eagle Rearm",
|
||||||
|
"Super Earth Flag", "Upload Data", "SEAF Artillery", "Hive Breaker"
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final int[] ICONS = new int[]{
|
||||||
|
// SUPPORT WEAPONS (0-11)
|
||||||
|
R.drawable.mg_43_machine_gun,
|
||||||
|
R.drawable.eat_17_expendable_anti_tank,
|
||||||
|
R.drawable.m_105_stalwart,
|
||||||
|
R.drawable.las_98_laser_cannon,
|
||||||
|
R.drawable.apw_1_anti_materiel_rifle,
|
||||||
|
R.drawable.gr_8_recoilless_rifle,
|
||||||
|
R.drawable.gl_21_grenade_launcher,
|
||||||
|
R.drawable.flam_40_flamethrower,
|
||||||
|
R.drawable.ac_8_autocannon,
|
||||||
|
R.drawable.arc_3_arc_thrower,
|
||||||
|
R.drawable.rs_422_railgun,
|
||||||
|
R.drawable.faf_14_spear_launcher,
|
||||||
|
// ORBITAL (12-22)
|
||||||
|
R.drawable.orbital_precision_strike,
|
||||||
|
R.drawable.orbital_gatling_barrage,
|
||||||
|
R.drawable.orbital_airburst_strike,
|
||||||
|
R.drawable.orbital_120mm_he_barrage,
|
||||||
|
R.drawable.orbital_smoke_strike,
|
||||||
|
R.drawable.orbital_ems_strike,
|
||||||
|
R.drawable.orbital_380mm_he_barrage,
|
||||||
|
R.drawable.orbital_walking_barrage,
|
||||||
|
R.drawable.orbital_laser,
|
||||||
|
R.drawable.orbital_railcannon_strike,
|
||||||
|
R.drawable.orbital_gas_strike,
|
||||||
|
// EAGLE (23-29)
|
||||||
|
R.drawable.eagle_strafing_run,
|
||||||
|
R.drawable.eagle_airstrike,
|
||||||
|
R.drawable.eagle_cluster_bomb,
|
||||||
|
R.drawable.eagle_smoke_strike,
|
||||||
|
R.drawable.eagle_napalm_airstrike,
|
||||||
|
R.drawable.eagle_110mm_rocket_pods,
|
||||||
|
R.drawable.eagle_500kg_bomb,
|
||||||
|
// BACKPACKS (30-33)
|
||||||
|
R.drawable.b_1_supply_pack,
|
||||||
|
R.drawable.lift_850_jump_pack,
|
||||||
|
R.drawable.sh_20_ballistic_shield_backpack,
|
||||||
|
R.drawable.sh_32_shield_generator_pack,
|
||||||
|
// MINES (34-35)
|
||||||
|
R.drawable.md_6_anti_personnel,
|
||||||
|
R.drawable.md_i4_incendiary_mines,
|
||||||
|
// EMPLACEMENTS (36-38)
|
||||||
|
R.drawable.fx_12_shield_generator_relay,
|
||||||
|
R.drawable.emg_101_hmg_emplacem_nt,
|
||||||
|
R.drawable.aarc_3_tesla_tower,
|
||||||
|
// SENTRIES (39-44)
|
||||||
|
R.drawable.ag_16_gatling_sentry,
|
||||||
|
R.drawable.amg_43_machine_gun_sentry,
|
||||||
|
R.drawable.aac_8_autocannon_sentry,
|
||||||
|
R.drawable.amls_4x_rocket_sentry,
|
||||||
|
R.drawable.am_12_mortar_sentry,
|
||||||
|
R.drawable.am_23_ems_mortar_sentry,
|
||||||
|
// MISSION (45-56)
|
||||||
|
R.drawable.reinforce,
|
||||||
|
R.drawable.resupply,
|
||||||
|
R.drawable.sos_beacon,
|
||||||
|
R.drawable.nux_223_hellbomb,
|
||||||
|
R.drawable.sssd_delivery,
|
||||||
|
R.drawable.seismic_probe,
|
||||||
|
R.drawable.eagle_rearm,
|
||||||
|
R.drawable.super_earth_flag,
|
||||||
|
R.drawable.nux_223_hellbomb,
|
||||||
|
R.drawable.sssd_delivery,
|
||||||
|
R.drawable.hive_breaker_drill
|
||||||
|
};
|
||||||
|
|
||||||
|
private static final int[] ARROW_ICONS = new int[]{
|
||||||
|
R.drawable.stepforward, R.drawable.stepforward, R.drawable.stepforward, R.drawable.stepforward
|
||||||
};
|
};
|
||||||
|
|
||||||
private SoundManager soundManager;
|
private SoundManager soundManager;
|
||||||
private Handler handler = new Handler();
|
private Handler handler = new Handler();
|
||||||
|
|
||||||
private TextView tvSequence;
|
private TextView tvCounter, tvFailuresCounter;
|
||||||
private TextView tvCounter;
|
private ImageView ivStratagemIcon;
|
||||||
private Button btnUp, btnDown, btnLeft, btnRight;
|
private LinearLayout sequenceContainer;
|
||||||
private Button btnVolver;
|
private ImageButton btnUp, btnDown, btnLeft, btnRight, btnVolver;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
private ImageView ivFailure;
|
||||||
|
|
||||||
private int[] sequence;
|
private int[] sequence;
|
||||||
private int playerIndex = 0;
|
private int playerIndex = 0;
|
||||||
private int completadas = 0;
|
private int completadas = 0;
|
||||||
|
private int fallos = 0;
|
||||||
private boolean esperando = false;
|
private boolean esperando = false;
|
||||||
private boolean juegoActivo = true;
|
private boolean juegoActivo = true;
|
||||||
private String[] ultimosArrows;
|
private int currentStratagemIndex = 0;
|
||||||
|
private boolean bloqueado = false;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -106,72 +214,126 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
try { soundManager = new SoundManager(this); }
|
try { soundManager = new SoundManager(this); }
|
||||||
catch (Exception e) { soundManager = null; }
|
catch (Exception e) { soundManager = null; }
|
||||||
|
|
||||||
tvSequence = findViewById(R.id.tv_sequence);
|
|
||||||
tvCounter = findViewById(R.id.tv_counter);
|
tvCounter = findViewById(R.id.tv_counter);
|
||||||
|
tvFailuresCounter = findViewById(R.id.tv_failures_counter);
|
||||||
|
ivStratagemIcon = findViewById(R.id.iv_stratagem_icon);
|
||||||
|
sequenceContainer = findViewById(R.id.sequence_container);
|
||||||
btnUp = findViewById(R.id.btn_up);
|
btnUp = findViewById(R.id.btn_up);
|
||||||
btnDown = findViewById(R.id.btn_down);
|
btnDown = findViewById(R.id.btn_down);
|
||||||
btnLeft = findViewById(R.id.btn_left);
|
btnLeft = findViewById(R.id.btn_left);
|
||||||
btnRight = findViewById(R.id.btn_right);
|
btnRight = findViewById(R.id.btn_right);
|
||||||
btnVolver = findViewById(R.id.btn_volver);
|
btnVolver = findViewById(R.id.btn_volver);
|
||||||
|
progressBar = findViewById(R.id.progress_bar);
|
||||||
|
ivFailure = findViewById(R.id.iv_failure);
|
||||||
|
|
||||||
btnVolver.setOnClickListener(v -> finish());
|
btnVolver.setOnClickListener(v -> finish());
|
||||||
|
|
||||||
if (btnUp != null) btnUp.setOnClickListener(v -> onInputWithSound(UP));
|
if (btnUp != null) btnUp.setOnClickListener(v -> { animateButtonClick(v); onInputWithSound(UP); });
|
||||||
if (btnDown != null) btnDown.setOnClickListener(v -> onInputWithSound(DOWN));
|
if (btnDown != null) btnDown.setOnClickListener(v -> { animateButtonClick(v); onInputWithSound(DOWN); });
|
||||||
if (btnLeft != null) btnLeft.setOnClickListener(v -> onInputWithSound(LEFT));
|
if (btnLeft != null) btnLeft.setOnClickListener(v -> { animateButtonClick(v); onInputWithSound(LEFT); });
|
||||||
if (btnRight != null) btnRight.setOnClickListener(v -> onInputWithSound(RIGHT));
|
if (btnRight != null) btnRight.setOnClickListener(v -> { animateButtonClick(v); onInputWithSound(RIGHT); });
|
||||||
|
|
||||||
nuevaRonda();
|
nuevaRonda();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void animateButtonClick(View v) {
|
||||||
|
// Feedback háptico (vibración corta)
|
||||||
|
v.performHapticFeedback(android.view.HapticFeedbackConstants.VIRTUAL_KEY);
|
||||||
|
|
||||||
|
// Animación de escala más agresiva y rápida
|
||||||
|
v.animate()
|
||||||
|
.scaleX(0.7f)
|
||||||
|
.scaleY(0.7f)
|
||||||
|
.setDuration(40)
|
||||||
|
.withEndAction(() -> v.animate()
|
||||||
|
.scaleX(1.0f)
|
||||||
|
.scaleY(1.0f)
|
||||||
|
.setDuration(150)
|
||||||
|
.setInterpolator(new android.view.animation.OvershootInterpolator(4.0f)) // Rebote más fuerte
|
||||||
|
.start())
|
||||||
|
.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
private int getArrowRotation(int dir) {
|
||||||
|
switch(dir) {
|
||||||
|
case UP: return 0;
|
||||||
|
case DOWN: return 180;
|
||||||
|
case LEFT: return -90;
|
||||||
|
case RIGHT: return 90;
|
||||||
|
default: return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void nuevaRonda() {
|
private void nuevaRonda() {
|
||||||
int idx = (int)(Math.random() * STRATAGEMS.length);
|
int idx = (int)(Math.random() * STRATAGEMS.length);
|
||||||
sequence = STRATAGEMS[idx];
|
sequence = STRATAGEMS[idx];
|
||||||
|
currentStratagemIndex = idx;
|
||||||
playerIndex = 0;
|
playerIndex = 0;
|
||||||
juegoActivo = true;
|
juegoActivo = true;
|
||||||
ultimosArrows = new String[sequence.length];
|
bloqueado = false;
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
if (progressBar != null) progressBar.setVisibility(View.GONE);
|
||||||
for (int i = 0; i < sequence.length; i++) {
|
if (ivFailure != null) ivFailure.setVisibility(View.GONE);
|
||||||
int dir = sequence[i];
|
|
||||||
ultimosArrows[i] = ARROWS[dir];
|
if (ivStratagemIcon != null) {
|
||||||
sb.append(ultimosArrows[i]).append(" ");
|
try {
|
||||||
}
|
int iconIndex = idx % ICONS.length;
|
||||||
if (tvSequence != null) {
|
ivStratagemIcon.setImageResource(ICONS[iconIndex]);
|
||||||
tvSequence.setText(sb.toString().trim());
|
} catch (Exception e) {
|
||||||
tvSequence.setTextColor(Color.parseColor("#FFD700"));
|
ivStratagemIcon.setImageResource(R.drawable.stratagemas_icon);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
secuenciaMostrar();
|
||||||
|
|
||||||
handler.removeCallbacksAndMessages(null);
|
handler.removeCallbacksAndMessages(null);
|
||||||
handler.postDelayed(() -> { esperando = true; }, 1200);
|
esperando = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final String ARROW_CHARS = "\u2191\u2193\u2190\u2192";
|
||||||
|
|
||||||
|
private void secuenciaMostrar() {
|
||||||
|
if (sequenceContainer == null) return;
|
||||||
|
sequenceContainer.removeAllViews();
|
||||||
|
|
||||||
|
for (int i = 0; i < sequence.length; i++) {
|
||||||
|
ImageView arrowView = new ImageView(this);
|
||||||
|
int size = (int) (45 * getResources().getDisplayMetrics().density);
|
||||||
|
int margin = (int) (2 * getResources().getDisplayMetrics().density);
|
||||||
|
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(size, size);
|
||||||
|
params.setMargins(margin, margin, margin, margin);
|
||||||
|
arrowView.setLayoutParams(params);
|
||||||
|
|
||||||
|
arrowView.setImageResource(R.drawable.ic_dpad_button);
|
||||||
|
arrowView.setBackgroundResource(R.drawable.btn_direction);
|
||||||
|
arrowView.setRotation(getArrowRotation(sequence[i]));
|
||||||
|
arrowView.setColorFilter(Color.WHITE);
|
||||||
|
int padding = (int) (8 * getResources().getDisplayMetrics().density);
|
||||||
|
arrowView.setPadding(padding, padding, padding, padding);
|
||||||
|
|
||||||
|
sequenceContainer.addView(arrowView);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onInputWithSound(int dir) {
|
private void onInputWithSound(int dir) {
|
||||||
if (soundManager != null) {
|
|
||||||
try { soundManager.playTone(dir); } catch (Exception e) {}
|
|
||||||
}
|
|
||||||
onInput(dir);
|
onInput(dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onInput(int dir) {
|
private void onInput(int dir) {
|
||||||
if (!juegoActivo || !esperando) return;
|
if (!juegoActivo || !esperando || bloqueado) return;
|
||||||
|
bloqueado = true;
|
||||||
|
|
||||||
if (dir == sequence[playerIndex]) {
|
if (dir == sequence[playerIndex]) {
|
||||||
|
if (soundManager != null) {
|
||||||
|
try { soundManager.playTone(dir); } catch (Exception e) {}
|
||||||
|
}
|
||||||
playerIndex++;
|
playerIndex++;
|
||||||
|
|
||||||
if (tvSequence != null) {
|
if (sequenceContainer != null && playerIndex <= sequence.length) {
|
||||||
StringBuilder sb = new StringBuilder();
|
View child = sequenceContainer.getChildAt(playerIndex - 1);
|
||||||
for (int i = 0; i < sequence.length; i++) {
|
if (child instanceof ImageView) {
|
||||||
if (i < playerIndex) {
|
ImageView arrowView = (ImageView) child;
|
||||||
sb.append("<font color='#00FF00'>").append(ultimosArrows[i]).append("</font> ");
|
arrowView.setColorFilter(Color.parseColor("#fde902"));
|
||||||
} else {
|
|
||||||
sb.append(ultimosArrows[i]).append(" ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
tvSequence.setText(android.text.Html.fromHtml(sb.toString()));
|
|
||||||
} catch (Exception e) {
|
|
||||||
tvSequence.setText(sb.toString().replaceAll("<[^>]*>", ""));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,26 +343,42 @@ public class ActivityGame extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
completadas++;
|
completadas++;
|
||||||
if (tvCounter != null) tvCounter.setText(String.valueOf(completadas));
|
if (tvCounter != null) tvCounter.setText(String.valueOf(completadas));
|
||||||
if (tvSequence != null) {
|
|
||||||
tvSequence.setText("OK!");
|
|
||||||
tvSequence.setTextColor(Color.parseColor("#00FF00"));
|
|
||||||
}
|
|
||||||
esperando = false;
|
esperando = false;
|
||||||
handler.postDelayed(this::nuevaRonda, 1200);
|
if (progressBar != null) {
|
||||||
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
handler.postDelayed(() -> {
|
||||||
|
if (progressBar != null) progressBar.setVisibility(View.GONE);
|
||||||
|
}, 300);
|
||||||
|
}
|
||||||
|
handler.postDelayed(this::nuevaRonda, 300);
|
||||||
|
} else {
|
||||||
|
bloqueado = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (soundManager != null) {
|
if (soundManager != null) {
|
||||||
try { soundManager.playFailure(); } catch (Exception e) {}
|
try { soundManager.playFailure(); } catch (Exception e) {}
|
||||||
}
|
}
|
||||||
if (tvSequence != null) {
|
|
||||||
tvSequence.setText("X");
|
|
||||||
tvSequence.setTextColor(Color.parseColor("#FF0000"));
|
|
||||||
}
|
|
||||||
juegoActivo = false;
|
juegoActivo = false;
|
||||||
handler.postDelayed(this::nuevaRonda, 1500);
|
fallos++;
|
||||||
|
if (tvFailuresCounter != null) tvFailuresCounter.setText(String.valueOf(fallos));
|
||||||
|
|
||||||
|
// Delay de medio segundo antes de reiniciar
|
||||||
|
handler.postDelayed(this::nuevaRonda, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPause() {
|
||||||
|
super.onPause();
|
||||||
|
if (soundManager != null) soundManager.pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
super.onResume();
|
||||||
|
if (soundManager != null) soundManager.resume();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.helldivers.app;
|
|||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.google.zxing.BarcodeFormat;
|
import com.google.zxing.BarcodeFormat;
|
||||||
@@ -20,7 +20,7 @@ public class ActivityQR extends AppCompatActivity {
|
|||||||
|
|
||||||
private SoundManager soundManager;
|
private SoundManager soundManager;
|
||||||
private ImageView qrImageView;
|
private ImageView qrImageView;
|
||||||
private Button btnVolver;
|
private ImageButton btnVolver;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -38,7 +38,6 @@ public class ActivityQR extends AppCompatActivity {
|
|||||||
btnVolver.setOnClickListener(new View.OnClickListener() {
|
btnVolver.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
soundManager.playButtonClick();
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -55,14 +54,14 @@ public class ActivityQR extends AppCompatActivity {
|
|||||||
|
|
||||||
int width = bitMatrix.getWidth();
|
int width = bitMatrix.getWidth();
|
||||||
int height = bitMatrix.getHeight();
|
int height = bitMatrix.getHeight();
|
||||||
Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
|
Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
|
||||||
|
|
||||||
int black = 0xFF000000;
|
int qrColor = 0xFFFFFFFF; // Blanco para los módulos del QR
|
||||||
int white = 0xFFFFFFFF;
|
int transparent = 0x00000000; // Transparente para el fondo
|
||||||
|
|
||||||
for (int x = 0; x < width; x++) {
|
for (int x = 0; x < width; x++) {
|
||||||
for (int y = 0; y < height; y++) {
|
for (int y = 0; y < height; y++) {
|
||||||
bmp.setPixel(x, y, bitMatrix.get(x, y) ? black : white);
|
bmp.setPixel(x, y, bitMatrix.get(x, y) ? qrColor : transparent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,78 +1,111 @@
|
|||||||
package com.helldivers.app;
|
package com.helldivers.app;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.media.MediaPlayer;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.ImageView;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
/**
|
|
||||||
* Main Activity - Menu principal con tematica Helldivers 2
|
|
||||||
* Optimizado para Samsung Galaxy S3 (720x1280 xhdpi, landscape)
|
|
||||||
*/
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private SoundManager soundManager;
|
private SoundManager soundManager;
|
||||||
private Button btnQrInstagram;
|
private Button btnQrInstagram;
|
||||||
private Button btnMinijuego;
|
private Button btnMinijuego;
|
||||||
|
private Button btnMusic;
|
||||||
|
private ImageButton btnUp, btnDown, btnLeft, btnRight;
|
||||||
|
private MediaPlayer mediaPlayer;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
// Inicializar SoundManager
|
try {
|
||||||
soundManager = new SoundManager(this);
|
soundManager = new SoundManager(this);
|
||||||
|
} catch (Exception e) {
|
||||||
// Referencias UI
|
soundManager = null;
|
||||||
btnQrInstagram = findViewById(R.id.btn_qr_instagram);
|
|
||||||
btnMinijuego = findViewById(R.id.btn_minijuego);
|
|
||||||
|
|
||||||
if (btnQrInstagram == null || btnMinijuego == null) {
|
|
||||||
throw new RuntimeException("Button not found in layout");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configurar listeners
|
btnQrInstagram = findViewById(R.id.btn_qr_instagram);
|
||||||
btnQrInstagram.setOnClickListener(new View.OnClickListener() {
|
btnMinijuego = findViewById(R.id.btn_minijuego);
|
||||||
@Override
|
btnUp = findViewById(R.id.btn_up);
|
||||||
public void onClick(View v) {
|
btnDown = findViewById(R.id.btn_down);
|
||||||
soundManager.playButtonClick();
|
btnLeft = findViewById(R.id.btn_left);
|
||||||
Intent intent = new Intent(MainActivity.this, ActivityQR.class);
|
btnRight = findViewById(R.id.btn_right);
|
||||||
startActivity(intent);
|
btnMusic = findViewById(R.id.btn_music);
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
btnMinijuego.setOnClickListener(new View.OnClickListener() {
|
if (btnQrInstagram != null) {
|
||||||
@Override
|
btnQrInstagram.setOnClickListener(v -> {
|
||||||
public void onClick(View v) {
|
startActivity(new Intent(this, ActivityQR.class));
|
||||||
soundManager.playButtonClick();
|
});
|
||||||
Intent intent = new Intent(MainActivity.this, ActivityGame.class);
|
}
|
||||||
startActivity(intent);
|
|
||||||
|
if (btnMinijuego != null) {
|
||||||
|
btnMinijuego.setOnClickListener(v -> {
|
||||||
|
startActivity(new Intent(this, ActivityGame.class));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (btnMusic != null) {
|
||||||
|
btnMusic.setOnClickListener(v -> toggleMusic());
|
||||||
|
}
|
||||||
|
|
||||||
|
View.OnClickListener arrowSoundListener = v -> {
|
||||||
|
if (soundManager != null) {
|
||||||
|
try { soundManager.playButtonClick(); } catch (Exception e) {}
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
|
if (btnUp != null) btnUp.setOnClickListener(arrowSoundListener);
|
||||||
|
if (btnDown != null) btnDown.setOnClickListener(arrowSoundListener);
|
||||||
|
if (btnLeft != null) btnLeft.setOnClickListener(arrowSoundListener);
|
||||||
|
if (btnRight != null) btnRight.setOnClickListener(arrowSoundListener);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toggleMusic() {
|
||||||
|
if (mediaPlayer == null) {
|
||||||
|
mediaPlayer = MediaPlayer.create(this, R.raw.ost);
|
||||||
|
mediaPlayer.setOnCompletionListener(mp -> {
|
||||||
|
stopMusic();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mediaPlayer.isPlaying()) {
|
||||||
|
stopMusic();
|
||||||
|
} else {
|
||||||
|
mediaPlayer.start();
|
||||||
|
btnMusic.setAlpha(0.5f); // Efecto visual de activado
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopMusic() {
|
||||||
|
if (mediaPlayer != null) {
|
||||||
|
mediaPlayer.stop();
|
||||||
|
mediaPlayer.release();
|
||||||
|
mediaPlayer = null;
|
||||||
|
btnMusic.setAlpha(1.0f); // Restaurar opacidad
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResume() {
|
protected void onResume() {
|
||||||
super.onResume();
|
super.onResume();
|
||||||
if (soundManager != null) {
|
if (soundManager != null) soundManager.resume();
|
||||||
soundManager.resume();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
if (soundManager != null) {
|
if (soundManager != null) soundManager.pause();
|
||||||
soundManager.pause();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
if (soundManager != null) {
|
stopMusic();
|
||||||
soundManager.release();
|
if (soundManager != null) soundManager.release();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,97 +1,68 @@
|
|||||||
package com.helldivers.app;
|
package com.helldivers.app;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.media.AudioManager;
|
import android.media.AudioAttributes;
|
||||||
import android.media.ToneGenerator;
|
import android.media.SoundPool;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Looper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SoundManager - Gestor de sonidos usando ToneGenerator
|
* SoundManager - Gestor de sonidos usando SoundPool para reproducir archivos de recursos
|
||||||
* Compatible con API 18+, mas ligero que SoundPool para dispositivos de baja potencia
|
|
||||||
*/
|
*/
|
||||||
public class SoundManager {
|
public class SoundManager {
|
||||||
|
|
||||||
private static final int VOLUME = 80; // 0-100
|
private SoundPool soundPool;
|
||||||
|
private int soundPop;
|
||||||
private ToneGenerator toneGenerator;
|
private int soundError;
|
||||||
private Handler handler;
|
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
|
|
||||||
public SoundManager(Context context) {
|
public SoundManager(Context context) {
|
||||||
// ToneGenerator.STREAM_MUSIC para compatibilidad API 18+
|
AudioAttributes audioAttributes = new AudioAttributes.Builder()
|
||||||
toneGenerator = new ToneGenerator(AudioManager.STREAM_MUSIC, VOLUME);
|
.setUsage(AudioAttributes.USAGE_GAME)
|
||||||
handler = new Handler(Looper.getMainLooper());
|
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
soundPool = new SoundPool.Builder()
|
||||||
|
.setMaxStreams(5)
|
||||||
|
.setAudioAttributes(audioAttributes)
|
||||||
|
.build();
|
||||||
|
|
||||||
|
// Cargar los sonidos desde res/raw
|
||||||
|
soundPop = soundPool.load(context, R.raw.pop, 1);
|
||||||
|
soundError = soundPool.load(context, R.raw.error, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sonido de click de boton - tono corto y agudo
|
* Sonido de click de boton - reproduce pop.mp3
|
||||||
*/
|
*/
|
||||||
public void playButtonClick() {
|
public void playButtonClick() {
|
||||||
if (!enabled || toneGenerator == null) return;
|
playPop();
|
||||||
// Tono DTMF 6 - sonido tipo boton tactil
|
|
||||||
toneGenerator.startTone(ToneGenerator.TONE_DTMF_6, 80);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sonido de exito - secuencia ascendente
|
* Sonido de exito
|
||||||
*/
|
*/
|
||||||
public void playSuccess() {
|
public void playSuccess() {
|
||||||
if (!enabled || toneGenerator == null) return;
|
// Por ahora no tenemos un sonido de éxito específico en raw,
|
||||||
// Tono de confirmacion propositivo
|
// podríamos usar pop o dejarlo vacío si no se solicita.
|
||||||
toneGenerator.startTone(ToneGenerator.TONE_PROP_ACK, 150);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sonido de fallo - tono bajo grave
|
* Sonido de fallo - reproduce error.mp3
|
||||||
*/
|
*/
|
||||||
public void playFailure() {
|
public void playFailure() {
|
||||||
if (!enabled || toneGenerator == null) return;
|
if (!enabled || soundPool == null) return;
|
||||||
// Tono de error
|
soundPool.play(soundError, 1.0f, 1.0f, 1, 0, 1.0f);
|
||||||
toneGenerator.startTone(ToneGenerator.TONE_PROP_NACK, 200);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tono para direcciones del juego
|
* Tono para direcciones del juego - reproduce pop.mp3 para cualquier dirección
|
||||||
* Usa diferentes tonos DTMF para cada direccion
|
|
||||||
*/
|
*/
|
||||||
public void playTone(int direction) {
|
public void playTone(int direction) {
|
||||||
if (!enabled || toneGenerator == null) return;
|
playPop();
|
||||||
|
|
||||||
int tone;
|
|
||||||
switch (direction) {
|
|
||||||
case 0: // UP
|
|
||||||
tone = ToneGenerator.TONE_DTMF_2;
|
|
||||||
break;
|
|
||||||
case 1: // DOWN
|
|
||||||
tone = ToneGenerator.TONE_DTMF_8;
|
|
||||||
break;
|
|
||||||
case 2: // LEFT
|
|
||||||
tone = ToneGenerator.TONE_DTMF_4;
|
|
||||||
break;
|
|
||||||
case 3: // RIGHT
|
|
||||||
tone = ToneGenerator.TONE_DTMF_6;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
tone = ToneGenerator.TONE_DTMF_0;
|
|
||||||
}
|
|
||||||
toneGenerator.startTone(tone, 100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private void playPop() {
|
||||||
* Tono de inicio de secuencia
|
if (!enabled || soundPool == null) return;
|
||||||
*/
|
soundPool.play(soundPop, 1.0f, 1.0f, 1, 0, 1.0f);
|
||||||
public void playSequenceStart() {
|
|
||||||
if (!enabled || toneGenerator == null) return;
|
|
||||||
toneGenerator.startTone(ToneGenerator.TONE_SUP_DIAL, 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tono de alerta/peligro
|
|
||||||
*/
|
|
||||||
public void playAlert() {
|
|
||||||
if (!enabled || toneGenerator == null) return;
|
|
||||||
toneGenerator.startTone(ToneGenerator.TONE_CDMA_ALERT_CALL_GUARD, 150);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnabled(boolean enabled) {
|
public void setEnabled(boolean enabled) {
|
||||||
@@ -102,26 +73,18 @@ public class SoundManager {
|
|||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Stub para compatibilidad con ciclo de vida Activity
|
|
||||||
* ToneGenerator no necesita pause/resume explicito
|
|
||||||
*/
|
|
||||||
public void pause() {
|
public void pause() {
|
||||||
// No-op: ToneGenerator se maneja automaticamente
|
if (soundPool != null) soundPool.autoPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Stub para compatibilidad con ciclo de vida Activity
|
|
||||||
* ToneGenerator no necesita pause/resume explicito
|
|
||||||
*/
|
|
||||||
public void resume() {
|
public void resume() {
|
||||||
// No-op: ToneGenerator se maneja automaticamente
|
if (soundPool != null) soundPool.autoResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void release() {
|
public void release() {
|
||||||
if (toneGenerator != null) {
|
if (soundPool != null) {
|
||||||
toneGenerator.release();
|
soundPool.release();
|
||||||
toneGenerator = null;
|
soundPool = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BIN
app/src/main/res/drawable/aac_8_autocannon_sentry.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/aarc_3_tesla_tower.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/ac_8_autocannon.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/ag_16_gatling_sentry.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/am_12_mortar_sentry.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/am_23_ems_mortar_sentry.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/amg_43_machine_gun_sentry.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/amls_4x_rocket_sentry.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/apw_1_anti_materiel_rifle.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/arc_3_arc_thrower.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
16
app/src/main/res/drawable/arrow_white.xml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#232830" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
<stroke android:width="2dp" android:color="#FFFFFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:top="4dp" android:bottom="4dp" android:left="4dp" android:right="4dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#1B1F25" />
|
||||||
|
<corners android:radius="4dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
BIN
app/src/main/res/drawable/axar_23_guard_dog.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/axlas_5_guard_dog_rover.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/b_1_supply_pack.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
@@ -1,7 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Centro del D-Pad decorativo -->
|
<!-- Centro del D-Pad decorativo con efecto de luz -->
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
android:shape="oval">
|
<item>
|
||||||
<solid android:color="#2C3138" />
|
<shape android:shape="oval">
|
||||||
<stroke android:width="2dp" android:color="#FFD700" />
|
<solid android:color="#1A1D24" />
|
||||||
</shape>
|
<size android:width="420dp" android:height="420dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:top="2dp" android:bottom="2dp" android:left="2dp" android:right="2dp">
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="#232830" />
|
||||||
|
<stroke android:width="1dp" android:color="#3D4350" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:top="4dp" android:bottom="4dp" android:left="4dp" android:right="4dp">
|
||||||
|
<shape android:shape="oval">
|
||||||
|
<solid android:color="#2C3138" />
|
||||||
|
<stroke android:width="1dp" android:color="#FFD700" android:alpha="0.3" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
@@ -1,13 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Fondo con gradiente vertical estilo Helldivers 2 -->
|
<!-- Fondo con gradiente vertical azul -->
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<gradient
|
<gradient
|
||||||
android:angle="270"
|
android:angle="270"
|
||||||
android:startColor="#0D0D0D"
|
android:startColor="@color/helldivers_dark_bg"
|
||||||
android:centerColor="#121417"
|
android:centerColor="@color/helldivers_dark_secondary"
|
||||||
android:endColor="#1B1F25"
|
android:endColor="@color/helldivers_dark_tertiary"
|
||||||
android:type="linear" />
|
android:type="linear" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="#FFFFFF" />
|
<solid android:color="#FFFFFF" />
|
||||||
<corners android:radius="12dp" />
|
<corners android:radius="12dp" />
|
||||||
<stroke android:width="3dp" android:color="#FFD700" />
|
<stroke android:width="3dp" android:color="#FFFFFF" />
|
||||||
<padding android:left="16dp" android:top="16dp" android:right="16dp" android:bottom="16dp" />
|
<padding android:left="16dp" android:top="16dp" android:right="16dp" android:bottom="16dp" />
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,27 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Boton de direccion para D-Pad del juego -->
|
<!-- Boton de direccion para D-Pad del juego con efecto neon -->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_pressed="true">
|
<item android:state_pressed="true">
|
||||||
<shape android:shape="rectangle">
|
<layer-list>
|
||||||
<solid android:color="#FFD700" />
|
<item>
|
||||||
<corners android:radius="4dp" />
|
<shape android:shape="rectangle">
|
||||||
<stroke android:width="2dp" android:color="#FFFFFF" />
|
<solid android:color="#FFFFFF" />
|
||||||
</shape>
|
<corners android:radius="8dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#1B1F25" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item android:state_focused="true">
|
<item android:state_focused="true">
|
||||||
<shape android:shape="rectangle">
|
<layer-list>
|
||||||
<solid android:color="#00BFFF" />
|
<item>
|
||||||
<corners android:radius="4dp" />
|
<shape android:shape="rectangle">
|
||||||
<stroke android:width="2dp" android:color="#1E90FF" />
|
<solid android:color="#1B1F25" />
|
||||||
</shape>
|
<corners android:radius="8dp" />
|
||||||
|
<stroke android:width="3dp" android:color="#00BFFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:top="3dp" android:left="3dp" android:right="3dp" android:bottom="3dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#232830" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<layer-list>
|
||||||
<solid android:color="#1B1F25" />
|
<item>
|
||||||
<corners android:radius="4dp" />
|
<shape android:shape="rectangle">
|
||||||
<stroke android:width="2dp" android:color="#FFD700" />
|
<solid android:color="#1B1F25" />
|
||||||
</shape>
|
<corners android:radius="8dp" />
|
||||||
|
<stroke android:width="2dp" android:color="#FFFFFF" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="#232830" />
|
||||||
|
<corners android:radius="6dp" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</layer-list>
|
||||||
</item>
|
</item>
|
||||||
</selector>
|
</selector>
|
||||||
@@ -1,18 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Boton primario estilo Helldivers - Amarillo neon -->
|
<!-- Boton primario estilo Helldivers - Blanco -->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_pressed="true">
|
<item android:state_pressed="true">
|
||||||
<layer-list>
|
<layer-list>
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#2C3138" />
|
<solid android:color="@color/btn_bg_pressed" />
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dp" />
|
||||||
<stroke android:width="3dp" android:color="#FFE135" />
|
<stroke android:width="3dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
@@ -23,14 +23,14 @@
|
|||||||
<layer-list>
|
<layer-list>
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dp" />
|
||||||
<stroke android:width="2dp" android:color="#FFE135" />
|
<stroke android:width="2dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
@@ -41,14 +41,14 @@
|
|||||||
<layer-list>
|
<layer-list>
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dp" />
|
||||||
<stroke android:width="2dp" android:color="#FFD700" />
|
<stroke android:width="2dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
<item android:top="2dp" android:left="2dp" android:right="2dp" android:bottom="2dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!-- Boton secundario estilo Helldivers - Azul neon -->
|
<!-- Boton secundario estilo Helldivers - Azul con bordes blancos -->
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_pressed="true">
|
<item android:state_pressed="true">
|
||||||
<layer-list>
|
<layer-list>
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#2C3138" />
|
<solid android:color="@color/btn_bg_pressed" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke android:width="2dp" android:color="#1E90FF" />
|
<stroke android:width="2dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp">
|
<item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="5dp" />
|
<corners android:radius="5dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
@@ -23,14 +23,14 @@
|
|||||||
<layer-list>
|
<layer-list>
|
||||||
<item>
|
<item>
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="6dp" />
|
<corners android:radius="6dp" />
|
||||||
<stroke android:width="1dp" android:color="#00BFFF" />
|
<stroke android:width="1dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
<item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp">
|
<item android:top="1dp" android:left="1dp" android:right="1dp" android:bottom="1dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#1B1F25" />
|
<solid android:color="@color/btn_bg_dark" />
|
||||||
<corners android:radius="5dp" />
|
<corners android:radius="5dp" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
BIN
app/src/main/res/drawable/eagle_110mm_rocket_pods.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/eagle_500kg_bomb.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/eagle_airstrike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/eagle_cluster_bomb.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/eagle_napalm_airstrike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/eagle_rearm.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable/eagle_smoke_strike.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/eagle_strafing_run.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
app/src/main/res/drawable/eat_17_expendable_anti_tank.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/emg_101_hmg_emplacem_nt.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/faf_14_spear_launcher.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/flam_40_flamethrower.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/fx_12_shield_generator_relay.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/gl_21_grenade_launcher.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/gr_8_recoilless_rifle.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/hd_logo.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
app/src/main/res/drawable/hive_breaker_drill.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
9
app/src/main/res/drawable/ic_back_arrow.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z" />
|
||||||
|
</vector>
|
||||||
14
app/src/main/res/drawable/ic_dpad_button.xml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="256dp"
|
||||||
|
android:height="256dp"
|
||||||
|
android:viewportWidth="256"
|
||||||
|
android:viewportHeight="256">
|
||||||
|
<group
|
||||||
|
android:scaleX="0.1"
|
||||||
|
android:scaleY="-0.1"
|
||||||
|
android:translateY="256">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFFFFF"
|
||||||
|
android:pathData="M983 1634 c-164 -185 -299 -340 -301 -345 -2 -5 72 -9 172 -9 l176 0 0 -345 0 -345 250 0 250 0 0 345 0 345 186 0 c107 0 184 4 182 9 -6 17 -599 681 -608 681 -5 0 -143 -151 -307 -336z" />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
20
app/src/main/res/drawable/ic_failure.xml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="150dp"
|
||||||
|
android:height="150dp"
|
||||||
|
android:viewportWidth="150"
|
||||||
|
android:viewportHeight="150">
|
||||||
|
<!-- Red circle background -->
|
||||||
|
<path
|
||||||
|
android:fillColor="#CC0000"
|
||||||
|
android:pathData="M75,75m-60,0a60,60 0,1 1,120 0a60,60 0,1 1,-120 0"/>
|
||||||
|
<!-- X mark -->
|
||||||
|
<path
|
||||||
|
android:strokeWidth="10"
|
||||||
|
android:strokeColor="#FFFFFF"
|
||||||
|
android:pathData="M45,45L105,105"/>
|
||||||
|
<path
|
||||||
|
android:strokeWidth="10"
|
||||||
|
android:strokeColor="#FFFFFF"
|
||||||
|
android:pathData="M105,45L45,105"/>
|
||||||
|
</vector>
|
||||||
@@ -5,35 +5,35 @@
|
|||||||
android:height="32dp"
|
android:height="32dp"
|
||||||
android:viewportWidth="24"
|
android:viewportWidth="24"
|
||||||
android:viewportHeight="24"
|
android:viewportHeight="24"
|
||||||
android:tint="#FFD700">
|
android:tint="#FFFFFF">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M3,11h8V3H3V11zM5,5h4v4H5V5z" />
|
android:pathData="M3,11h8V3H3V11zM5,5h4v4H5V5z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M13,3v8h8V3H13zM19,9h-4V5h4V9z" />
|
android:pathData="M13,3v8h8V3H13zM19,9h-4V5h4V9z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M3,21h8v-8H3V21zM5,15h4v4H5V15z" />
|
android:pathData="M3,21h8v-8H3V21zM5,15h4v4H5V15z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M13,13h2v2h-2z" />
|
android:pathData="M13,13h2v2h-2z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M13,17h2v2h-2z" />
|
android:pathData="M13,17h2v2h-2z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M17,13h2v4h-2z" />
|
android:pathData="M17,13h2v4h-2z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M19,17h2v2h-2z" />
|
android:pathData="M19,17h2v2h-2z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M19,13h2v2h-2z" />
|
android:pathData="M19,13h2v2h-2z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M17,19h4v2h-4z" />
|
android:pathData="M17,19h4v2h-4z" />
|
||||||
<path
|
<path
|
||||||
android:fillColor="#FFD700"
|
android:fillColor="#FFFFFF"
|
||||||
android:pathData="M13,19h2v2h-2z" />
|
android:pathData="M13,19h2v2h-2z" />
|
||||||
</vector>
|
</vector>
|
||||||
BIN
app/src/main/res/drawable/las_98_laser_cannon.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/lift_850_jump_pack.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
@@ -14,7 +14,7 @@
|
|||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#00000000" />
|
<solid android:color="#00000000" />
|
||||||
<corners android:radius="8dp" />
|
<corners android:radius="8dp" />
|
||||||
<stroke android:width="3dp" android:color="#FFD700" />
|
<stroke android:width="3dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
<item android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp">
|
<item android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp">
|
||||||
<shape android:shape="rectangle">
|
<shape android:shape="rectangle">
|
||||||
<solid android:color="#00000000" />
|
<solid android:color="#00000000" />
|
||||||
<stroke android:width="2dp" android:color="#FFD700" />
|
<stroke android:width="2dp" android:color="#FFFFFF" />
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
BIN
app/src/main/res/drawable/m_105_stalwart.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/md_6_anti_personnel.png
Normal file
|
After Width: | Height: | Size: 9.6 KiB |
BIN
app/src/main/res/drawable/md_i4_incendiary_mines.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/mg_43_machine_gun.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/nux_223_hellbomb.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
app/src/main/res/drawable/orbital_120mm_he_barrage.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/orbital_380mm_he_barrage.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/orbital_airburst_strike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_ems_strike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_gas_strike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_gatling_barrage.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_laser.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_precision_strike.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/orbital_railcannon_strike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_smoke_strike.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/orbital_walking_barrage.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/reinforce.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/resupply.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/rs_422_railgun.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/seismic_probe.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable/sh_20_ballistic_shield_backpack.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable/sh_32_shield_generator_pack.png
Normal file
|
After Width: | Height: | Size: 9.9 KiB |
BIN
app/src/main/res/drawable/sos_beacon.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
app/src/main/res/drawable/sssd_delivery.png
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
app/src/main/res/drawable/stepbakcward.png
Normal file
|
After Width: | Height: | Size: 69 KiB |
BIN
app/src/main/res/drawable/stepforward.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
app/src/main/res/drawable/stratagemas_icon.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
BIN
app/src/main/res/drawable/super_earth_flag.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
@@ -1,153 +1,236 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_helldivers_gradient">
|
android:background="@drawable/bg_helldivers_gradient">
|
||||||
|
|
||||||
<!-- Contador -->
|
<!-- Contador -->
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_counter"
|
<!-- Nombre de la estratagema -->
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_margin="8dp"
|
|
||||||
android:text="0"
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#00FF00" />
|
|
||||||
|
|
||||||
<!-- Secuencia - arriba -->
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_counter_label"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignTop="@id/tv_counter"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="26dp"
|
|
||||||
android:layout_toStartOf="@id/tv_counter"
|
|
||||||
android:text="ESTRATAGEMAS: "
|
|
||||||
android:textColor="#00FF00"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_sequence"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_above="@id/buttons_grid"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:text=""
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:textColor="#FFD700" />
|
|
||||||
|
|
||||||
<!-- Botones - mas separadas -->
|
|
||||||
<GridLayout
|
|
||||||
android:id="@+id/buttons_grid"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
|
android:layout_marginEnd="15dp"
|
||||||
|
android:layout_marginBottom="180dp"
|
||||||
|
android:gravity="center_horizontal"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_counter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="#fde902"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_failures_counter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="4dp"
|
||||||
|
android:text="0"
|
||||||
|
android:textColor="#bd0000"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_stratagem_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginBottom="48dp"
|
android:layout_alignParentTop="true"
|
||||||
android:rowCount="3"
|
android:layout_marginTop="8dp"
|
||||||
android:columnCount="3"
|
android:text=""
|
||||||
android:padding="16dp">
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="#FFFFFF" />
|
||||||
|
|
||||||
<Space
|
<!-- Contenedor principal: Icono + Secuencia + Grid flechas -->
|
||||||
android:layout_width="80dp"
|
<LinearLayout
|
||||||
android:layout_height="80dp"
|
android:id="@+id/linearLayout"
|
||||||
android:layout_row="0"
|
android:layout_width="wrap_content"
|
||||||
android:layout_column="0" />
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:translationY="30dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<Button
|
<!-- Icono de la estratagema - Izquierda -->
|
||||||
android:id="@+id/btn_up"
|
<LinearLayout
|
||||||
android:layout_width="80dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="80dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_row="0"
|
android:layout_marginEnd="24dp"
|
||||||
android:layout_column="1"
|
android:gravity="center"
|
||||||
android:background="@drawable/btn_direction"
|
android:orientation="vertical">
|
||||||
android:text="↑"
|
|
||||||
android:textColor="#FFD700"
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:layout_margin="6dp" />
|
|
||||||
|
|
||||||
<Space
|
</LinearLayout>
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_row="0"
|
|
||||||
android:layout_column="2" />
|
|
||||||
|
|
||||||
<Button
|
<!-- Centro: Secuencia de flechas -->
|
||||||
android:id="@+id/btn_left"
|
<LinearLayout
|
||||||
android:layout_width="80dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="80dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_row="1"
|
android:gravity="center"
|
||||||
android:layout_column="0"
|
android:orientation="vertical">
|
||||||
android:background="@drawable/btn_direction"
|
|
||||||
android:text="←"
|
|
||||||
android:textColor="#FFD700"
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:layout_margin="6dp" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_down"
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:layout_row="1"
|
|
||||||
android:layout_column="1"
|
|
||||||
android:background="@drawable/btn_direction"
|
|
||||||
android:text="↓"
|
|
||||||
android:textColor="#FFD700"
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:layout_margin="6dp" />
|
|
||||||
|
|
||||||
<Button
|
<LinearLayout
|
||||||
android:id="@+id/btn_right"
|
android:id="@+id/sequence_container"
|
||||||
android:layout_width="80dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="80dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_row="1"
|
android:layout_marginBottom="12dp"
|
||||||
android:layout_column="2"
|
android:gravity="center"
|
||||||
android:background="@drawable/btn_direction"
|
android:orientation="horizontal" />
|
||||||
android:text="→"
|
|
||||||
android:textColor="#FFD700"
|
|
||||||
android:textSize="36sp"
|
|
||||||
android:layout_margin="6dp" />
|
|
||||||
|
|
||||||
<Space
|
<!-- Grid de Flechas - Input -->
|
||||||
android:layout_width="80dp"
|
<GridLayout
|
||||||
android:layout_height="10dp"
|
android:id="@+id/buttons_grid"
|
||||||
android:layout_row="2"
|
android:layout_width="wrap_content"
|
||||||
android:layout_column="0" />
|
android:layout_height="wrap_content"
|
||||||
|
android:columnCount="3"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:rowCount="3">
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="10dp"
|
android:layout_height="80dp"
|
||||||
android:layout_row="2"
|
android:layout_row="0"
|
||||||
android:layout_column="1" />
|
android:layout_column="0" />
|
||||||
|
|
||||||
<Space
|
<ImageButton
|
||||||
android:layout_width="80dp"
|
android:id="@+id/btn_up"
|
||||||
android:layout_height="10dp"
|
android:layout_width="80dp"
|
||||||
android:layout_row="2"
|
android:layout_height="80dp"
|
||||||
android:layout_column="2" />
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Up"
|
||||||
|
android:rotation="0"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
</GridLayout>
|
<Space
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="2" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_left"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Left"
|
||||||
|
android:rotation="-90"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_down"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Down"
|
||||||
|
android:rotation="180"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_right"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:layout_margin="4dp"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Right"
|
||||||
|
android:rotation="90"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="2"
|
||||||
|
android:layout_column="0" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="2"
|
||||||
|
android:layout_column="1" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_row="2"
|
||||||
|
android:layout_column="2" />
|
||||||
|
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<!-- Volver -->
|
<!-- Volver -->
|
||||||
<Button
|
<ImageButton
|
||||||
android:id="@+id/btn_volver"
|
android:id="@+id/btn_volver"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="48dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="48dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginStart="16dp"
|
||||||
android:text="VOLVER"
|
android:layout_marginTop="16dp"
|
||||||
android:textSize="14sp"
|
|
||||||
android:textColor="#FFD700"
|
|
||||||
android:background="@drawable/btn_helldivers_secondary"
|
android:background="@drawable/btn_helldivers_secondary"
|
||||||
android:paddingHorizontal="24dp"
|
android:contentDescription="Volver"
|
||||||
android:paddingVertical="8dp" />
|
android:padding="10dp"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/ic_back_arrow"
|
||||||
|
app:tint="#FFFFFF" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_stratagem_icon"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="53dp"
|
||||||
|
android:layout_marginTop="93dp"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/stratagemas_icon" />
|
||||||
|
|
||||||
|
<!-- Loading Spinner -->
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progress_bar"
|
||||||
|
android:layout_width="80dp"
|
||||||
|
android:layout_height="80dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:indeterminateTint="#FFFFFF"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<!-- Failure Indicator (X) -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_failure"
|
||||||
|
android:layout_width="150dp"
|
||||||
|
android:layout_height="150dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/ic_failure"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -1,87 +1,147 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:background="@drawable/bg_helldivers_gradient">
|
||||||
android:background="@drawable/bg_helldivers_gradient"
|
|
||||||
android:gravity="center_horizontal"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<!-- Logo Helldivers 2 - Area superior -->
|
<!-- Logo Super Tierra - Arriba centro -->
|
||||||
<TextView
|
<ImageView
|
||||||
android:id="@+id/logo_helldivers"
|
android:id="@+id/logo_super_tierra"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:src="@drawable/hd_logo"
|
||||||
|
android:contentDescription="Super Tierra"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:maxWidth="280dp"
|
||||||
|
android:tint="#FFFFFF" />
|
||||||
|
|
||||||
|
<!-- Botón Estratagemas - Esquina izquierda -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_minijuego"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@id/logo_super_tierra"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginBottom="24dp"
|
android:background="@drawable/btn_helldivers_primary"
|
||||||
android:text="HELLDIVERS"
|
android:paddingHorizontal="20dp"
|
||||||
android:textSize="36sp"
|
android:paddingVertical="10dp"
|
||||||
android:textStyle="bold"
|
android:text="ESTRATAGEMAS"
|
||||||
android:textColor="#FFD700"
|
android:textAllCaps="true"
|
||||||
android:fontFamily="monospace"
|
android:textColor="#FFFFFF"
|
||||||
android:shadowColor="#FF6B00"
|
android:textSize="14sp" />
|
||||||
android:shadowDx="2"
|
|
||||||
android:shadowDy="2"
|
|
||||||
android:shadowRadius="4" />
|
|
||||||
|
|
||||||
<!-- Contenedor principal de botones -->
|
<!-- Botón QR Instagram - Esquina derecha -->
|
||||||
<LinearLayout
|
<Button
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/btn_qr_instagram"
|
||||||
android:layout_height="0dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:gravity="center"
|
|
||||||
android:paddingHorizontal="48dp">
|
|
||||||
|
|
||||||
<!-- Boton QR Instagram -->
|
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
|
||||||
android:id="@+id/btn_qr_instagram"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
android:minHeight="72dp"
|
|
||||||
android:text="@string/btn_qr_instagram"
|
|
||||||
android:textColor="@color/helldivers_yellow"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:background="@drawable/btn_helldivers_primary"
|
|
||||||
android:drawableTop="@drawable/ic_qr_code"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
<!-- Boton Minijuego -->
|
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
|
||||||
android:id="@+id/btn_minijuego"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:minHeight="72dp"
|
|
||||||
android:text="@string/btn_minijuego"
|
|
||||||
android:textColor="@color/helldivers_yellow"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textAllCaps="true"
|
|
||||||
android:fontFamily="sans-serif-medium"
|
|
||||||
android:background="@drawable/btn_helldivers_primary"
|
|
||||||
android:drawableTop="@drawable/ic_gamepad"
|
|
||||||
android:paddingTop="12dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:gravity="center" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<!-- Footer con version -->
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_below="@id/logo_super_tierra"
|
||||||
android:text="@string/app_version"
|
android:layout_alignParentEnd="true"
|
||||||
android:textColor="@color/helldivers_gray"
|
android:layout_marginEnd="16dp"
|
||||||
android:textSize="12sp"
|
android:layout_marginTop="16dp"
|
||||||
android:fontFamily="sans-serif-condensed" />
|
android:background="@drawable/btn_helldivers_primary"
|
||||||
|
android:paddingHorizontal="20dp"
|
||||||
|
android:paddingVertical="10dp"
|
||||||
|
android:text="@string/btn_qr_instagram"
|
||||||
|
android:textAllCaps="true"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
<!-- Grid de Flechas - Centro -->
|
||||||
|
<GridLayout
|
||||||
|
android:id="@+id/buttons_grid"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:layout_marginTop="40dp"
|
||||||
|
android:translationY="30dp"
|
||||||
|
android:rowCount="3"
|
||||||
|
android:columnCount="3"
|
||||||
|
android:padding="8dp">
|
||||||
|
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="100dp" android:layout_row="0" android:layout_column="0" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_up"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="95dp"
|
||||||
|
android:layout_row="0"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Up"
|
||||||
|
android:rotation="0"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="100dp" android:layout_row="0" android:layout_column="2" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_left"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="95dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="0"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Left"
|
||||||
|
android:rotation="-90"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_down"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="95dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="1"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Down"
|
||||||
|
android:rotation="180"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_right"
|
||||||
|
android:layout_width="95dp"
|
||||||
|
android:layout_height="95dp"
|
||||||
|
android:layout_row="1"
|
||||||
|
android:layout_column="2"
|
||||||
|
android:background="@drawable/btn_direction"
|
||||||
|
android:contentDescription="Right"
|
||||||
|
android:rotation="90"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
app:tint="#FFFFFF"
|
||||||
|
android:src="@drawable/ic_dpad_button" />
|
||||||
|
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="20dp" android:layout_row="2" android:layout_column="0" />
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="20dp" android:layout_row="2" android:layout_column="1" />
|
||||||
|
<Space android:layout_width="100dp" android:layout_height="20dp" android:layout_row="2" android:layout_column="2" />
|
||||||
|
|
||||||
|
</GridLayout>
|
||||||
|
|
||||||
|
<!-- Footer - Versión abajo centro -->
|
||||||
|
|
||||||
|
<!-- Botón Música - Derecha, nivelado con el botón de la derecha -->
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_music"
|
||||||
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignBottom="@id/buttons_grid"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:background="@drawable/btn_helldivers_primary"
|
||||||
|
android:text="♪"
|
||||||
|
android:textColor="#FFFFFF"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
@@ -1,33 +1,31 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/bg_helldivers_gradient">
|
android:background="@drawable/bg_helldivers_gradient">
|
||||||
|
|
||||||
|
<ImageButton
|
||||||
|
android:id="@+id/btn_volver"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginTop="16dp"
|
||||||
|
android:background="@drawable/btn_helldivers_secondary"
|
||||||
|
android:contentDescription="Volver"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:scaleType="centerInside"
|
||||||
|
android:src="@drawable/ic_back_arrow"
|
||||||
|
app:tint="#FFFFFF" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/qr_image"
|
android:id="@+id/qr_image"
|
||||||
android:layout_width="440dp"
|
android:layout_width="404dp"
|
||||||
android:layout_height="379dp"
|
android:layout_height="344dp"
|
||||||
android:layout_above="@id/btn_volver"
|
android:layout_centerInParent="true"
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginBottom="-48dp"
|
|
||||||
android:background="#FFFFFF"
|
|
||||||
android:contentDescription="@string/qr_description"
|
android:contentDescription="@string/qr_description"
|
||||||
android:padding="8dp"
|
|
||||||
android:scaleType="fitCenter" />
|
android:scaleType="fitCenter" />
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_volver"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:background="@drawable/btn_helldivers_secondary"
|
|
||||||
android:paddingHorizontal="36dp"
|
|
||||||
android:paddingVertical="12dp"
|
|
||||||
android:text="VOLVER"
|
|
||||||
android:textColor="#FFD700"
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
BIN
app/src/main/res/raw/error.mp3
Normal file
BIN
app/src/main/res/raw/ost.mp3
Normal file
BIN
app/src/main/res/raw/pop.mp3
Normal file
@@ -1,16 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<!-- Colores Helldivers 2 Theme -->
|
<!-- Colores Helldivers 2 Theme Modificado -->
|
||||||
|
|
||||||
<!-- Colores principales -->
|
<!-- Colores principales -->
|
||||||
<color name="helldivers_black">#000000</color>
|
<color name="helldivers_black">#000000</color>
|
||||||
<color name="helldivers_dark_bg">#0D0D0D</color>
|
<color name="helldivers_dark_bg">#006ab2</color>
|
||||||
<color name="helldivers_dark_secondary">#1B1F25</color>
|
<color name="helldivers_dark_secondary">#005a96</color>
|
||||||
<color name="helldivers_dark_tertiary">#121417</color>
|
<color name="helldivers_dark_tertiary">#004b7d</color>
|
||||||
|
|
||||||
<!-- Colores neon/accent -->
|
<!-- Colores neon/accent -->
|
||||||
<color name="helldivers_yellow">#FFD700</color>
|
<color name="helldivers_yellow">#FFFFFF</color>
|
||||||
<color name="helldivers_yellow_bright">#FFE135</color>
|
<color name="helldivers_yellow_bright">#FFFFFF</color>
|
||||||
<color name="helldivers_blue">#00BFFF</color>
|
<color name="helldivers_blue">#00BFFF</color>
|
||||||
<color name="helldivers_blue_bright">#1E90FF</color>
|
<color name="helldivers_blue_bright">#1E90FF</color>
|
||||||
<color name="helldivers_red">#FF3B30</color>
|
<color name="helldivers_red">#FF3B30</color>
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
<color name="helldivers_gray_light">#C7C7CC</color>
|
<color name="helldivers_gray_light">#C7C7CC</color>
|
||||||
|
|
||||||
<!-- Colores botones -->
|
<!-- Colores botones -->
|
||||||
<color name="btn_bg_dark">#1B1F25</color>
|
<color name="btn_bg_dark">#004b7d</color>
|
||||||
<color name="btn_bg_pressed">#2C3138</color>
|
<color name="btn_bg_pressed">#003c64</color>
|
||||||
<color name="btn_border_yellow">#FFD700</color>
|
<color name="btn_border_yellow">#FFFFFF</color>
|
||||||
<color name="btn_border_blue">#00BFFF</color>
|
<color name="btn_border_blue">#00BFFF</color>
|
||||||
|
|
||||||
<!-- Colores genericos de sistema -->
|
<!-- Colores genericos de sistema -->
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<string name="logo_description">Logo Helldivers 2</string>
|
<string name="logo_description">Logo Helldivers 2</string>
|
||||||
|
|
||||||
<!-- Botones Main -->
|
<!-- Botones Main -->
|
||||||
<string name="btn_qr_instagram">Seguir en\nInstagram</string>
|
<string name="btn_qr_instagram">INSTAGRAM</string>
|
||||||
<string name="btn_minijuego">Estratagemas\nTraining</string>
|
<string name="btn_minijuego">Estratagemas\nTraining</string>
|
||||||
<string name="btn_volver">VOLVER</string>
|
<string name="btn_volver">VOLVER</string>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<!-- Colores principales -->
|
<!-- Colores principales -->
|
||||||
<item name="colorPrimary">@color/helldivers_dark_secondary</item>
|
<item name="colorPrimary">@color/helldivers_dark_secondary</item>
|
||||||
<item name="colorPrimaryDark">@color/helldivers_black</item>
|
<item name="colorPrimaryDark">@color/helldivers_black</item>
|
||||||
<item name="colorAccent">@color/helldivers_yellow</item>
|
<item name="colorAccent">@color/helldivers_white</item>
|
||||||
|
|
||||||
<!-- Fondo -->
|
<!-- Fondo -->
|
||||||
<item name="android:windowBackground">@color/helldivers_black</item>
|
<item name="android:windowBackground">@color/helldivers_black</item>
|
||||||
@@ -23,19 +23,19 @@
|
|||||||
|
|
||||||
<!-- Botones -->
|
<!-- Botones -->
|
||||||
<item name="colorButtonNormal">@color/btn_bg_dark</item>
|
<item name="colorButtonNormal">@color/btn_bg_dark</item>
|
||||||
<item name="colorControlHighlight">@color/helldivers_yellow</item>
|
<item name="colorControlHighlight">@color/helldivers_white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Estilo base para botones Helldivers -->
|
<!-- Estilo base para botones Helldivers -->
|
||||||
<style name="HelldiversButton" parent="Widget.AppCompat.Button">
|
<style name="HelldiversButton" parent="Widget.AppCompat.Button">
|
||||||
<item name="android:minHeight">48dp</item>
|
<item name="android:minHeight">48dp</item>
|
||||||
<item name="android:textColor">@color/helldivers_yellow</item>
|
<item name="android:textColor">@color/helldivers_white</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Estilo para botones primarios Helldivers -->
|
<!-- Estilo para botones primarios Helldivers -->
|
||||||
<style name="HelldiversButton.Primary" parent="HelldiversButton">
|
<style name="HelldiversButton.Primary" parent="HelldiversButton">
|
||||||
<item name="android:background">@drawable/btn_helldivers_primary</item>
|
<item name="android:background">@drawable/btn_helldivers_primary</item>
|
||||||
<item name="android:textColor">@color/helldivers_yellow</item>
|
<item name="android:textColor">@color/helldivers_white</item>
|
||||||
<item name="android:textSize">16sp</item>
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:fontFamily">sans-serif-medium</item>
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
<item name="android:textAllCaps">true</item>
|
<item name="android:textAllCaps">true</item>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<!-- Estilo para botones secundarios -->
|
<!-- Estilo para botones secundarios -->
|
||||||
<style name="HelldiversButton.Secondary" parent="HelldiversButton">
|
<style name="HelldiversButton.Secondary" parent="HelldiversButton">
|
||||||
<item name="android:background">@drawable/btn_helldivers_secondary</item>
|
<item name="android:background">@drawable/btn_helldivers_secondary</item>
|
||||||
<item name="android:textColor">@color/helldivers_yellow</item>
|
<item name="android:textColor">@color/helldivers_white</item>
|
||||||
<item name="android:textSize">14sp</item>
|
<item name="android:textSize">14sp</item>
|
||||||
<item name="android:fontFamily">sans-serif-medium</item>
|
<item name="android:fontFamily">sans-serif-medium</item>
|
||||||
<item name="android:textAllCaps">true</item>
|
<item name="android:textAllCaps">true</item>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
<!-- Estilo para texto de titulo -->
|
<!-- Estilo para texto de titulo -->
|
||||||
<style name="HelldiversText.Title" parent="HelldiversText">
|
<style name="HelldiversText.Title" parent="HelldiversText">
|
||||||
<item name="android:textColor">@color/helldivers_yellow</item>
|
<item name="android:textColor">@color/helldivers_white</item>
|
||||||
<item name="android:textSize">20sp</item>
|
<item name="android:textSize">20sp</item>
|
||||||
<item name="android:fontFamily">sans-serif-condensed</item>
|
<item name="android:fontFamily">sans-serif-condensed</item>
|
||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
|
|||||||
47
docker-compose.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
gitea:
|
||||||
|
image: gitea/gitea:latest
|
||||||
|
container_name: gitea
|
||||||
|
restart: always
|
||||||
|
environment:
|
||||||
|
- USER_UID=1000
|
||||||
|
- USER_GID=1000
|
||||||
|
volumes:
|
||||||
|
- /srv/data/gitea:/data
|
||||||
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
- /etc/localtime:/etc/localtime:ro
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.gitea.rule=Host(`git-dangilcal.duckdns.org`)"
|
||||||
|
- "traefik.http.routers.gitea.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.gitea.tls.certresolver=le"
|
||||||
|
- "traefik.http.services.gitea.loadbalancer.server.port=3000"
|
||||||
|
- "traefik.http.routers.gitea-http.rule=Host(`git-dangilcal.duckdns.org`)"
|
||||||
|
- "traefik.http.routers.gitea-http.entrypoints=web"
|
||||||
|
- "traefik.http.routers.gitea-http.middlewares=redirect-to-https"
|
||||||
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
||||||
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.permanent=true"
|
||||||
|
|
||||||
|
gitea-runner:
|
||||||
|
image: gitea/act_runner:latest
|
||||||
|
container_name: gitea-runner
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- gitea
|
||||||
|
environment:
|
||||||
|
- GITEA_INSTANCE_URL=https://git-dangilcal.duckdns.org
|
||||||
|
- GITEA_RUNNER_REGISTRATION_TOKEN=TU_TOKEN_AQUI
|
||||||
|
- GITEA_RUNNER_NAME=runner-docker
|
||||||
|
volumes:
|
||||||
|
- /srv/data/gitea-runner:/data
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||