Преглед изворни кода

App: вёрстка главной страницы

Blueris пре 6 дана
родитељ
комит
382c191500

+ 1 - 8
OscellaMobile/.idea/deploymentTargetSelector.xml

@@ -2,15 +2,8 @@
 <project version="4">
   <component name="deploymentTargetSelector">
     <selectionStates>
-      <SelectionState runConfigName="app">
+      <SelectionState runConfigName="Unnamed">
         <option name="selectionMode" value="DROPDOWN" />
-        <DropdownSelection timestamp="2024-11-14T10:55:12.762967700Z">
-          <Target type="DEFAULT_BOOT">
-            <handle>
-              <DeviceId pluginId="LocalEmulator" identifier="path=C:\AndroidSettings\.android\avd\Pixel_7_Pro_API_34_2.avd" />
-            </handle>
-          </Target>
-        </DropdownSelection>
         <DialogSelection />
       </SelectionState>
     </selectionStates>

+ 0 - 1
OscellaMobile/.idea/misc.xml

@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ExternalStorageConfigurationManager" enabled="true" />
   <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">

+ 0 - 329
OscellaMobile/.idea/other.xml

@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="direct_access_persist.xml">
-    <option name="deviceSelectionList">
-      <list>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="27" />
-          <option name="brand" value="DOCOMO" />
-          <option name="codename" value="F01L" />
-          <option name="id" value="F01L" />
-          <option name="manufacturer" value="FUJITSU" />
-          <option name="name" value="F-01L" />
-          <option name="screenDensity" value="360" />
-          <option name="screenX" value="720" />
-          <option name="screenY" value="1280" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="28" />
-          <option name="brand" value="DOCOMO" />
-          <option name="codename" value="SH-01L" />
-          <option name="id" value="SH-01L" />
-          <option name="manufacturer" value="SHARP" />
-          <option name="name" value="AQUOS sense2 SH-01L" />
-          <option name="screenDensity" value="480" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2160" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="Lenovo" />
-          <option name="codename" value="TB370FU" />
-          <option name="id" value="TB370FU" />
-          <option name="manufacturer" value="Lenovo" />
-          <option name="name" value="Tab P12" />
-          <option name="screenDensity" value="340" />
-          <option name="screenX" value="1840" />
-          <option name="screenY" value="2944" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="31" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="a51" />
-          <option name="id" value="a51" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy A51" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="akita" />
-          <option name="id" value="akita" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 8a" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="b0q" />
-          <option name="id" value="b0q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy S22 Ultra" />
-          <option name="screenDensity" value="600" />
-          <option name="screenX" value="1440" />
-          <option name="screenY" value="3088" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="32" />
-          <option name="brand" value="google" />
-          <option name="codename" value="bluejay" />
-          <option name="id" value="bluejay" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 6a" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="caiman" />
-          <option name="id" value="caiman" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9 Pro" />
-          <option name="screenDensity" value="360" />
-          <option name="screenX" value="960" />
-          <option name="screenY" value="2142" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="comet" />
-          <option name="id" value="comet" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9 Pro Fold" />
-          <option name="screenDensity" value="390" />
-          <option name="screenX" value="2076" />
-          <option name="screenY" value="2152" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="29" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="crownqlteue" />
-          <option name="id" value="crownqlteue" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Note9" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2220" />
-          <option name="screenY" value="1080" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="dm3q" />
-          <option name="id" value="dm3q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy S23 Ultra" />
-          <option name="screenDensity" value="600" />
-          <option name="screenX" value="1440" />
-          <option name="screenY" value="3088" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="e1q" />
-          <option name="id" value="e1q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy S24" />
-          <option name="screenDensity" value="480" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2340" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="felix" />
-          <option name="id" value="felix" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Fold" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2208" />
-          <option name="screenY" value="1840" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="felix" />
-          <option name="id" value="felix" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Fold" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2208" />
-          <option name="screenY" value="1840" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="felix_camera" />
-          <option name="id" value="felix_camera" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Fold (Camera-enabled)" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2208" />
-          <option name="screenY" value="1840" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="gts8uwifi" />
-          <option name="id" value="gts8uwifi" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Tab S8 Ultra" />
-          <option name="screenDensity" value="320" />
-          <option name="screenX" value="1848" />
-          <option name="screenY" value="2960" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="husky" />
-          <option name="id" value="husky" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 8 Pro" />
-          <option name="screenDensity" value="390" />
-          <option name="screenX" value="1008" />
-          <option name="screenY" value="2244" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="30" />
-          <option name="brand" value="motorola" />
-          <option name="codename" value="java" />
-          <option name="id" value="java" />
-          <option name="manufacturer" value="Motorola" />
-          <option name="name" value="G20" />
-          <option name="screenDensity" value="280" />
-          <option name="screenX" value="720" />
-          <option name="screenY" value="1600" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="komodo" />
-          <option name="id" value="komodo" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9 Pro XL" />
-          <option name="screenDensity" value="360" />
-          <option name="screenX" value="1008" />
-          <option name="screenY" value="2244" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="lynx" />
-          <option name="id" value="lynx" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 7a" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="31" />
-          <option name="brand" value="google" />
-          <option name="codename" value="oriole" />
-          <option name="id" value="oriole" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 6" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="panther" />
-          <option name="id" value="panther" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 7" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="q5q" />
-          <option name="id" value="q5q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Z Fold5" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1812" />
-          <option name="screenY" value="2176" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="q6q" />
-          <option name="id" value="q6q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Z Fold6" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1856" />
-          <option name="screenY" value="2160" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="30" />
-          <option name="brand" value="google" />
-          <option name="codename" value="r11" />
-          <option name="id" value="r11" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Watch" />
-          <option name="screenDensity" value="320" />
-          <option name="screenX" value="384" />
-          <option name="screenY" value="384" />
-          <option name="type" value="WEAR_OS" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="30" />
-          <option name="brand" value="google" />
-          <option name="codename" value="redfin" />
-          <option name="id" value="redfin" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 5" />
-          <option name="screenDensity" value="440" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2340" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="shiba" />
-          <option name="id" value="shiba" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 8" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="tangorpro" />
-          <option name="id" value="tangorpro" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Tablet" />
-          <option name="screenDensity" value="320" />
-          <option name="screenX" value="1600" />
-          <option name="screenY" value="2560" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="tokay" />
-          <option name="id" value="tokay" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2424" />
-        </PersistentDeviceSelectionData>
-      </list>
-    </option>
-  </component>
-</project>

+ 264 - 2
OscellaMobile/app/src/main/java/com/example/oscellamobile/screens/MainWindow.kt

@@ -1,7 +1,10 @@
 package com.example.oscellamobile.screens
 
+import androidx.compose.foundation.BorderStroke
 import androidx.compose.foundation.Canvas
 import androidx.compose.foundation.Image
+import androidx.compose.foundation.background
+import androidx.compose.foundation.border
 import androidx.compose.foundation.clickable
 import androidx.compose.foundation.layout.Arrangement
 import androidx.compose.foundation.layout.Box
@@ -15,6 +18,10 @@ import androidx.compose.foundation.layout.height
 import androidx.compose.foundation.layout.padding
 import androidx.compose.foundation.layout.size
 import androidx.compose.foundation.layout.width
+import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
+import androidx.compose.material3.Card
 import androidx.compose.material3.Icon
 import androidx.compose.material3.Text
 import androidx.compose.runtime.Composable
@@ -26,19 +33,26 @@ import androidx.compose.runtime.remember
 import androidx.compose.runtime.setValue
 import androidx.compose.ui.Alignment
 import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.shadow
 import androidx.compose.ui.geometry.Offset
 import androidx.compose.ui.graphics.Brush
 import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.graphics.RadialGradientShader
+import androidx.compose.ui.graphics.RectangleShape
+import androidx.compose.ui.graphics.Shadow
 import androidx.compose.ui.graphics.drawscope.DrawScope
 import androidx.compose.ui.res.painterResource
 import androidx.compose.ui.text.font.Font
 import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.style.TextAlign
 import androidx.compose.ui.unit.dp
 import androidx.compose.ui.unit.sp
 import androidx.navigation.NavHostController
 import com.example.oscellamobile.R
 import com.google.accompanist.systemuicontroller.rememberSystemUiController
 import kotlinx.coroutines.delay
+import kotlin.math.cos
+import kotlin.math.sin
 
 
 @Composable
@@ -52,7 +66,18 @@ fun MainWindow(navController: NavHostController) {
         systemUiController.isStatusBarVisible = false // Ensure it stays hidden
     }
 
+    val gradientButton = Brush.linearGradient(
+        colors = listOf(
+            Color(0xFFE71D36),
+            Color(0xFFFF9F1C)
+        ),
+        start = Offset(30f, 30f),
+        end = Offset(200f, 200f)
+    )
+
     val kdamFontFamily = FontFamily(Font(R.font.kdam))
+    val playfairdisplay = FontFamily(Font(R.font.playfair))
+    val caveat = FontFamily(Font(R.font.caveat))
     Canvas(
         modifier = Modifier
             .fillMaxWidth()
@@ -75,15 +100,252 @@ fun MainWindow(navController: NavHostController) {
             .fillMaxWidth()
             .fillMaxHeight()
     ) {
-        Spacer(modifier = Modifier.height(15.dp))
+        Spacer(modifier = Modifier.height(10.dp))
         Row {
+            Spacer(modifier = Modifier.width(13.dp))
             Text(text = "Osccela", fontSize = 40.sp, fontFamily = kdamFontFamily)
-            Spacer(modifier = Modifier.width(150.dp))
+            Spacer(modifier = Modifier.width(145.dp))
             Image(
                 painter = painterResource(id = R.drawable.personall),
                 contentDescription = "Описание изображения",
                 modifier = Modifier.size(90.dp)
             )
         }
+        Row(
+            modifier = Modifier
+                .fillMaxWidth()
+                .height(70.dp)
+                .padding(10.dp, 0.dp, 10.dp, 0.dp)
+                .background(color = Color(0xFFFDFFFC), shape = RoundedCornerShape(5.dp)),
+            horizontalArrangement = Arrangement.SpaceBetween,
+            verticalAlignment = Alignment.CenterVertically
+        ) {
+            Spacer(Modifier.width(10.dp))
+            Button(
+                onClick = {},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(93.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text("Игры", color = Color(0xFFFDFFFC), fontFamily = playfairdisplay, fontSize = 17.sp)
+                }
+            }
+
+            Button(
+                onClick = {},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(135.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text("Компании", color = Color(0xFFFDFFFC), fontFamily = playfairdisplay, fontSize = 17.sp)
+                }
+            }
+
+            Button(
+                onClick = {},
+                modifier = Modifier
+                    .shadow(100.dp)
+                    .width(107.dp)
+                    .height(45.dp)
+                    .background(brush = gradientButton, shape = RoundedCornerShape(5.dp)),
+                colors = ButtonDefaults.buttonColors(
+                    containerColor = Color.Transparent
+                )
+            ) {
+                Box(
+                    modifier = Modifier.fillMaxSize(),
+                    contentAlignment = Alignment.Center
+                ) {
+                    Text("Облако", color = Color(0xFFFDFFFC), fontFamily = playfairdisplay, fontSize = 17.sp)
+                }
+            }
+            Spacer(Modifier.width(10.dp))
+        }
+        Spacer(Modifier.height(100.dp))
+        Card(
+            modifier = Modifier
+                .width(400.dp)
+                .height(320.dp)
+                .padding(20.dp, 0.dp, 20.dp, 0.dp)
+                .background(color = Color(0xFFFDFFFC), shape = RoundedCornerShape(15.dp))
+        ) {
+            Row {
+                Spacer(Modifier.width(10.dp))
+                Column {
+                    Text(
+                        text = "Hoyoverse",
+                        fontSize = 20.sp,
+                        fontFamily = kdamFontFamily,
+                        color = Color(0xFF2EC4B6)
+                    )
+                    Text(text = "Фэнтези", fontSize = 12.sp, fontFamily = kdamFontFamily, color = Color(0xFFE71D36))
+                    Spacer(Modifier.width(20.dp))
+                    Column {
+                        Text(
+                            text = "Основные метки:",
+                            fontSize = 14.sp,
+                            fontFamily = kdamFontFamily,
+                            color = Color(0xFF7F807E)
+                        )
+                        Column(
+                            Modifier.padding(10.dp)
+                        ) {
+                            Box(
+                                modifier = Modifier
+                                    .width(107.dp)
+                                    .height(22.dp)
+                                    .background(
+                                        color = Color(0xFF2EC4B6),
+                                        shape = RoundedCornerShape(20.dp)
+                                    ),
+                                contentAlignment = Alignment.Center
+                            )
+                            {
+                                Text(
+                                    text = "Пошаговая",
+                                    color = Color(0xFFFDFFFC),
+                                    fontFamily = caveat,
+                                    fontSize = 20.sp
+                                )
+                            }
+                            Spacer(Modifier.height(7.dp))
+                            Box(
+                                modifier = Modifier
+                                    .width(107.dp)
+                                    .height(22.dp)
+                                    .background(
+                                        color = Color(0xFF2EC4B6),
+                                        shape = RoundedCornerShape(20.dp)
+                                    ),
+                                contentAlignment = Alignment.Center
+                            )
+                            {
+                                Text(
+                                    text = "Ролевая",
+                                    color = Color(0xFFFDFFFC),
+                                    fontFamily = caveat,
+                                    fontSize = 20.sp
+                                )
+                            }
+                            Spacer(Modifier.height(7.dp))
+                            Box(
+                                modifier = Modifier
+                                    .width(107.dp)
+                                    .height(22.dp)
+                                    .background(
+                                        color = Color(0xFF2EC4B6),
+                                        shape = RoundedCornerShape(20.dp)
+                                    ),
+                                contentAlignment = Alignment.Center
+                            )
+                            {
+                                Text(
+                                    text = "Стратегия",
+                                    color = Color(0xFFFDFFFC),
+                                    fontFamily = caveat,
+                                    fontSize = 20.sp
+                                )
+                            }
+                        }
+                    }
+                }
+                Column {
+                    Row {
+                        Spacer(Modifier.width(45.dp))
+                        Box(
+                            modifier = Modifier
+                                .width(130.dp)
+                                .height(30.dp)
+                                .border(
+                                    BorderStroke(2.dp, Color(0x80B0B0B0)),
+                                    shape = RoundedCornerShape(15.dp)
+                                )
+                        )
+                        {
+                            Text(
+                                text = "Избранное: 23",
+                                fontSize = 16.sp,
+                                fontFamily = playfairdisplay,
+                                color = Color(0xFFFF9F1C),
+                                modifier = Modifier.align(Alignment.Center)
+                            )
+                        }
+                        val size = 31.dp
+
+                        var isOrange by remember { mutableStateOf(false) }
+
+                        val buttonColor = if (isOrange) Color(0xFFFF9F1C) else Color.Gray
+
+                        Canvas(
+                            modifier = Modifier
+                                .size(30.dp)
+                                .clickable(onClick = { isOrange = !isOrange })
+                        ) {
+                            drawStar(center = center, radius = size.toPx() / 2, color = buttonColor)
+                        }
+                    }
+                    Row {
+                        Spacer(Modifier.width(10.dp))
+                        Text(
+                            text = "Honkai Star Rail",
+                            fontSize = 20.sp,
+                            fontFamily = kdamFontFamily,
+                            color = Color(0xFF7F807E),
+                        )
+                        Spacer(Modifier.width(10.dp))
+                        Text(
+                            text = "16+",
+                            fontSize = 20.sp,
+                            fontFamily = kdamFontFamily,
+                            color = Color(0xFFE71D36),
+                        )
+                    }
+                    Image(
+                        painter = painterResource(id = R.drawable.test),
+                        contentDescription = "Описание изображения",
+                        modifier = Modifier.width(300.dp).height(138.dp)
+                    )
+                }
+            }
+        }
+    }
+}
+
+fun DrawScope.drawStar(center: Offset, radius: Float, color: Color) {
+    val path = androidx.compose.ui.graphics.Path()
+    val points = 5
+    val angle = 2 * Math.PI / points
+    val innerRadius = radius / 2.5f
+
+    for (i in 0 until points * 2) {
+        val r = if (i % 2 == 0) radius else innerRadius
+        val x = center.x + r * cos(i * angle - Math.PI / 2)
+        val y = center.y + r * sin(i * angle - Math.PI / 2)
+
+        if (i == 0) {
+            path.moveTo(x.toFloat(), y.toFloat())
+        } else {
+            path.lineTo(x.toFloat(), y.toFloat())
+        }
     }
+    path.close()
+    drawPath(path, color)
 }

BIN
OscellaMobile/app/src/main/res/drawable/test.png


BIN
OscellaMobile/app/src/main/res/font/caveat.ttf


BIN
OscellaMobile/app/src/main/res/font/playfair.ttf