Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
c8584c3
Update sync-thesuperhackers-upstream prompt formatting
RedaF12 Jul 11, 2026
0b80762
Merge branch 'MYSOREZ:main' into main
RedaF12 Jul 13, 2026
df99634
Merge branch 'MYSOREZ:main' into main
RedaF12 Jul 13, 2026
25ff36e
Merge branch 'MYSOREZ:main' into main
RedaF12 Jul 13, 2026
75b237d
Merge branch 'MYSOREZ:main' into main
RedaF12 Jul 13, 2026
8b04338
Merge branch 'MYSOREZ:main' into main
RedaF12 Jul 13, 2026
304d390
Merge branch 'MYSOREZ:main' into main
RedaF12 Jul 13, 2026
868ca7f
Create colors.xml for night mode color resources
RedaF12 Jul 14, 2026
fa2ff57
Update color palette for Android app
RedaF12 Jul 14, 2026
f3984c2
Refactor Theme.GeneralsZHSettings style definition
RedaF12 Jul 14, 2026
e08acb4
Update: Add Material 3 dependencies and modern Android libs
RedaF12 Jul 14, 2026
4a05ab3
feat: Add modern Material 3 settings activity layout
RedaF12 Jul 14, 2026
7ebe354
feat: Update project build.gradle
RedaF12 Jul 14, 2026
dfd4c02
feat: Add strings resource file
RedaF12 Jul 14, 2026
871c030
feat: Add modern Material 3 game activity layout with HUD
RedaF12 Jul 14, 2026
01c4dab
feat: Add modern Material 3 main activity layout
RedaF12 Jul 14, 2026
b6783d8
feat: Add modern SettingsActivity
RedaF12 Jul 14, 2026
d70d836
feat: Add Material 3 color palette with modern gaming aesthetic
RedaF12 Jul 14, 2026
d519c58
feat: Update settings.gradle
RedaF12 Jul 14, 2026
c3cc443
feat: Add gradient background drawable
RedaF12 Jul 14, 2026
11f389d
feat: Update AndroidManifest with Material 3 theme and modern activities
RedaF12 Jul 14, 2026
3021ac6
feat: Add Material 3 theme styles with modern colors and components
RedaF12 Jul 14, 2026
94982d0
feat: Add button background drawable
RedaF12 Jul 14, 2026
03453de
feat: Add card background drawable
RedaF12 Jul 14, 2026
92c4df6
feat: Add button ripple effect drawable
RedaF12 Jul 14, 2026
939d57b
feat: Add modern Material 3 MainActivity
RedaF12 Jul 14, 2026
add5d5f
feat: Add modern GameActivity
RedaF12 Jul 14, 2026
bbcebc3
feat: Complete Material 3 UI Redesign - Modern Design System Implemen…
RedaF12 Jul 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions Android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
plugins {
id 'com.android.application'
id 'kotlin-android'
}

android {
namespace 'com.generals.zh'
compileSdk 34

defaultConfig {
applicationId "com.generals.zh"
minSdk 28
targetSdk 34
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}

buildFeatures {
viewBinding true
}
}

dependencies {
// Material 3
implementation 'com.google.android.material:material:1.12.0'

// Jetpack
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'androidx.core:core:1.13.1'
implementation 'androidx.activity:activity-ktx:1.9.0'
implementation 'androidx.fragment:fragment-ktx:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.recyclerview:recyclerview:1.3.2'

// Lifecycle
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.8.1'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.8.1'

// Compose (optional for modern UI)
implementation 'androidx.compose.ui:ui:1.6.7'
implementation 'androidx.compose.material3:material3:1.2.1'

// Testing
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
43 changes: 43 additions & 0 deletions Android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.generals.zh">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.GeneralsZH">

<activity
android:name=".ui.MainActivity"
android:exported="true"
android:theme="@style/Theme.GeneralsZH"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<activity
android:name=".ui.GameActivity"
android:exported="false"
android:screenOrientation="landscape"
android:configChanges="orientation|screenSize" />

<activity
android:name=".ui.SettingsActivity"
android:exported="false"
android:theme="@style/Theme.GeneralsZH" />

</application>

</manifest>
26 changes: 26 additions & 0 deletions Android/app/src/main/java/com/generals/zh/ui/GameActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.generals.zh.ui

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.generals.zh.R

class GameActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_game)

// Initialize game engine
// Add your game initialization code here
}

override fun onPause() {
super.onPause()
// Pause game
}

override fun onResume() {
super.onResume()
// Resume game
}
}
51 changes: 51 additions & 0 deletions Android/app/src/main/java/com/generals/zh/ui/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package com.generals.zh.ui

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.constraintlayout.widget.ConstraintLayout
import android.widget.Button
import android.widget.TextView
import android.content.Intent
import com.generals.zh.R

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)

// Setup UI Components
val titleText = findViewById<TextView>(R.id.title_text)
titleText.text = "Command & Conquer\nGenerals: Zero Hour"

val playButton = findViewById<Button>(R.id.btn_play)
val settingsButton = findViewById<Button>(R.id.btn_settings)
val aboutButton = findViewById<Button>(R.id.btn_about)

playButton.setOnClickListener {
startActivity(Intent(this, GameActivity::class.java))
}

settingsButton.setOnClickListener {
startActivity(Intent(this, SettingsActivity::class.java))
}

aboutButton.setOnClickListener {
showAboutDialog()
}
}

private fun showAboutDialog() {
val aboutText = "Command & Conquer: Generals Zero Hour\n\n" +
"Version 1.0\n\n" +
"Experience the ultimate real-time strategy game\n" +
"with modern Material 3 design!\n\n" +
"© 2024 All Rights Reserved"

android.app.AlertDialog.Builder(this, R.style.Theme_GeneralsZH)
.setTitle("About")
.setMessage(aboutText)
.setPositiveButton("OK") { dialog, _ -> dialog.dismiss() }
.show()
}
}
29 changes: 29 additions & 0 deletions Android/app/src/main/java/com/generals/zh/ui/SettingsActivity.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.generals.zh.ui

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.generals.zh.R
import android.widget.Button

class SettingsActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_settings)

val backButton = findViewById<Button>(R.id.btn_back)
backButton.setOnClickListener {
finish()
}

setupSettingsList()
}

private fun setupSettingsList() {
val settingsList = findViewById<RecyclerView>(R.id.settings_list)
settingsList.layoutManager = LinearLayoutManager(this)
// Add your settings adapter here
}
}
9 changes: 9 additions & 0 deletions Android/app/src/main/res/drawable/button_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/md_theme_dark_primary_container" />
<corners android:radius="12dp" />
<stroke
android:width="1dp"
android:color="@color/md_theme_dark_primary" />
</shape>
5 changes: 5 additions & 0 deletions Android/app/src/main/res/drawable/button_ripple.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/accent_cyan">
<item android:drawable="@drawable/button_background" />
</ripple>
9 changes: 9 additions & 0 deletions Android/app/src/main/res/drawable/card_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/dark_bg_secondary" />
<stroke
android:width="2dp"
android:color="@color/accent_cyan" />
<corners android:radius="12dp" />
</shape>
10 changes: 10 additions & 0 deletions Android/app/src/main/res/drawable/window_background.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="45"
android:startColor="#0A0E27"
android:centerColor="#1E1E1E"
android:endColor="#121212"
android:type="linear" />
<corners android:radius="0dp" />
</shape>
102 changes: 102 additions & 0 deletions Android/app/src/main/res/layout/activity_game.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/window_background">

<!-- Game Surface will be rendered here -->
<SurfaceView
android:id="@+id/game_surface"
android:layout_width="match_parent"
android:layout_height="match_parent" />

<!-- HUD Controls (Top) -->
<LinearLayout
android:id="@+id/hud_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:padding="16dp"
android:background="@color/overlay_dark_50">

<TextView
android:id="@+id/game_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Generals: Zero Hour"
android:textSize="18sp"
android:textColor="@color/accent_cyan"
android:textStyle="bold" />

<Button
android:id="@+id/btn_pause"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="PAUSE"
android:textColor="@color/accent_cyan"
android:background="@drawable/button_ripple"
android:paddingHorizontal="16dp"
android:paddingVertical="8dp" />

</LinearLayout>

<!-- Mini Map (Bottom Right) -->
<FrameLayout
android:id="@+id/minimap_container"
android:layout_width="256dp"
android:layout_height="180dp"
android:layout_gravity="bottom|end"
android:layout_margin="16dp"
android:background="@drawable/card_background">

<SurfaceView
android:id="@+id/minimap"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</FrameLayout>

<!-- Game Controls (Bottom Left) -->
<LinearLayout
android:id="@+id/game_controls"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start"
android:orientation="horizontal"
android:padding="16dp"
android:spacing="8dp">

<Button
android:id="@+id/btn_build"
android:layout_width="80dp"
android:layout_height="80dp"
android:text="BUILD"
android:textSize="12sp"
android:textColor="@color/md_theme_dark_on_primary"
android:background="@drawable/button_ripple"
android:layout_marginEnd="8dp" />

<Button
android:id="@+id/btn_units"
android:layout_width="80dp"
android:layout_height="80dp"
android:text="UNITS"
android:textSize="12sp"
android:textColor="@color/md_theme_dark_on_primary"
android:background="@drawable/button_ripple"
android:layout_marginEnd="8dp" />

<Button
android:id="@+id/btn_defense"
android:layout_width="80dp"
android:layout_height="80dp"
android:text="DEFENSE"
android:textSize="12sp"
android:textColor="@color/md_theme_dark_on_primary"
android:background="@drawable/button_ripple" />

</LinearLayout>

</FrameLayout>
Loading
Loading