17 Commits

Author SHA256 Message Date
858971d1db Properly scale up a button depending on stage size! 2026-03-20 12:14:20 +00:00
5aba0fc70a Final commit before we start the MainMenu file from scratch again 2026-03-20 11:30:52 +00:00
afe82dbd2a Start implementing what we learnt from the ui-test branch 2026-03-18 09:28:00 +00:00
1cc46a94fe Look into using override fun resize and override fun create? method 2026-03-11 13:00:17 +00:00
4de5a8f88b Start re-creating main menu 2026-03-06 15:01:31 +00:00
89ff480c2e Start work to match the planned class structure 2026-03-06 12:28:37 +00:00
c009746bc4 Update host/client class structure 2026-03-06 12:27:51 +00:00
99719f5b79 Concept class structure 2026-03-06 01:54:13 +00:00
fe79c271fa Start working on networking 2026-03-04 12:57:57 +00:00
ddab82ec7f Get if casual button is pressed and move play buttons into own horizontal group 2026-03-04 12:18:56 +00:00
7974cbd0af Re-create main menu buttons 2026-03-04 07:49:40 +00:00
bdcbfece3b Play Buttons are the correct aspect ratio. Needs work on positioning and functionality 2026-02-27 13:03:20 +00:00
1960fa51a7 Continue experimenting with buttons to create a main menu 2026-02-25 10:21:37 +00:00
75d7e3e101 Create some assets to help with main menu buttons 2026-02-25 10:20:08 +00:00
f915f7bbba Change default orientation to Portrait 2026-02-25 10:18:55 +00:00
1136fd018d Concept main menu player lobby buttons 2026-02-25 10:17:54 +00:00
01da51665e Experiment with creating buttons for a main menu 2026-02-20 13:07:17 +00:00
27 changed files with 12812 additions and 2092 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 4.6 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -2,6 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"> xmlns:tools="http://schemas.android.com/tools">
<uses-feature android:glEsVersion="0x00020000" android:required="true"/> <uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<uses-permission android:name="android.permission.INTERNET" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:fullBackupContent="true" android:fullBackupContent="true"
@@ -14,7 +15,7 @@
<activity <activity
android:name="com.iofferyoutea.WitchQueen.android.AndroidLauncher" android:name="com.iofferyoutea.WitchQueen.android.AndroidLauncher"
android:label="@string/app_name" android:label="@string/app_name"
android:screenOrientation="landscape" android:screenOrientation="portrait"
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout" android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>

View File

@@ -12,7 +12,7 @@ class AndroidLauncher : AndroidApplication() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
initialize(Main(), AndroidApplicationConfiguration().apply { initialize(Main(), AndroidApplicationConfiguration().apply {
// Configure your application here. // Configure your application here.
useImmersiveMode = true // Recommended, but not required. //useImmersiveMode = true // Recommended, but not required.
}) })
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

BIN
WitchQueen/assets/red-x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 B

View File

@@ -7,7 +7,6 @@ dependencies {
api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion" api "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion" api "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
api "com.badlogicgames.gdx:gdx:$gdxVersion" api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.github.kotcrab.vis-ui:vis-ui:$visUiVersion"
api "io.github.libktx:ktx-actors:$ktxVersion" api "io.github.libktx:ktx-actors:$ktxVersion"
api "io.github.libktx:ktx-ai:$ktxVersion" api "io.github.libktx:ktx-ai:$ktxVersion"
api "io.github.libktx:ktx-app:$ktxVersion" api "io.github.libktx:ktx-app:$ktxVersion"

View File

@@ -0,0 +1,6 @@
package com.iofferyoutea.WitchQueen
class Client(val hostAddress: String, val hostPort: Int, val playerProfile: PlayerProfile) {
val preparedItems: MutableList<Int> = mutableListOf(0, 0, 0, 0) // Item ID. 0 for no item
lateinit var map: Map
}

View File

@@ -0,0 +1,4 @@
package com.iofferyoutea.WitchQueen
class Game(val clients: Array<Client>) {
}

View File

@@ -1,5 +1,6 @@
package com.iofferyoutea.WitchQueen package com.iofferyoutea.WitchQueen
import com.badlogic.gdx.Game
import com.badlogic.gdx.graphics.Texture import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.Texture.TextureFilter.Linear import com.badlogic.gdx.graphics.Texture.TextureFilter.Linear
import com.badlogic.gdx.graphics.g2d.SpriteBatch import com.badlogic.gdx.graphics.g2d.SpriteBatch
@@ -10,13 +11,14 @@ import ktx.assets.disposeSafely
import ktx.assets.toInternalFile import ktx.assets.toInternalFile
import ktx.async.KtxAsync import ktx.async.KtxAsync
import ktx.graphics.use import ktx.graphics.use
import java.lang.ref.WeakReference
class Main : KtxGame<KtxScreen>() { class Main : KtxGame<KtxScreen>() {
override fun create() { override fun create() {
KtxAsync.initiate() KtxAsync.initiate()
addScreen(FirstScreen()) addScreen(MainMenu())
setScreen<FirstScreen>() setScreen<MainMenu>()
} }
} }

View File

@@ -0,0 +1,58 @@
package com.iofferyoutea.WitchQueen
import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.Texture
import com.badlogic.gdx.graphics.g2d.BitmapFont
import com.badlogic.gdx.scenes.scene2d.Stage
import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
import com.badlogic.gdx.scenes.scene2d.ui.Value
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
import ktx.app.KtxScreen
import ktx.app.clearScreen
class MainMenu : KtxScreen {
val stage = Stage()
val table = Table()
var tableWidthPadAmount = 0.8f
var tableHeightPadAmount = 0.8f
//region Buttons
val defaultButtonTrd = TextureRegionDrawable(Texture("default.png"))
val flippedDefaultButtonTrd = TextureRegionDrawable(Texture("default_flipped.png"))
val defaultTextButtonStyle = TextButton.TextButtonStyle (
defaultButtonTrd,
flippedDefaultButtonTrd,
defaultButtonTrd,
BitmapFont()
)
val defaultButton = TextButton("Default Button", defaultTextButtonStyle)
//endregion
override fun show() {
// Stage Setup
Gdx.input.inputProcessor = stage
stage.addActor(table)
// Table Setup
table.debug = true
table.setPosition(
stage.width * ((1 - tableWidthPadAmount) / 2),
stage.height * ((1 - tableHeightPadAmount) / 2)
) // This centres the table
table.setSize(stage.width * tableWidthPadAmount, stage.height * tableHeightPadAmount)
table.add(defaultButton).growX().height(Value.percentWidth(9f / 32f, table)) // We use a FreeTypeFontGenerator to do font sizing maybe?
}
override fun render(delta: Float) {
clearScreen(0f, 0f, 0f)
stage.act(delta)
stage.draw()
}
override fun dispose() {
stage.dispose()
}
}

View File

@@ -0,0 +1,6 @@
package com.iofferyoutea.WitchQueen
class Map(val mapType: MapType) {
val rooms = Array(2) { Array<Room>(2) { Room(mapType) } } // We use an array instead of list i think
}

View File

@@ -0,0 +1,5 @@
package com.iofferyoutea.WitchQueen
enum class MapType {
DUNGEON, STREETS
}

View File

@@ -0,0 +1,10 @@
package com.iofferyoutea.WitchQueen
enum class PlayerState {
IDLE, LOOTING, FIGHTING
}
class Player(val map: Map) {
var currentState = PlayerState.IDLE
val currentRoom = arrayOf(0, 0) // Make this a spawn room or something
}

View File

@@ -0,0 +1,7 @@
package com.iofferyoutea.WitchQueen
class PlayerProfile {
var iconPath = "default.png"
var username = "Default"
val availableItems: MutableList<Int> = mutableListOf() // Use Item IDs?
}

View File

@@ -0,0 +1,12 @@
package com.iofferyoutea.WitchQueen
enum class RoomActivity {
EMPTY, LOOT, FIGHT
}
class Room(val mapType: MapType) {
var availableActivities: MutableList<RoomActivity> = mutableListOf()
init {
// Generate Room in this init block!
}
}