Introduce minimal Android support (#8)
This commit is contained in:
1 parent
2b556a4a58
commit
8913022044
43 files changed
+917
-130
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package org.opengamestudio
|
||||
|
||||
object BlueComponent {
|
||||
val ctrl = DialectController(BlueContext())
|
||||
|
||||
init {
|
||||
blueRegisterEffects(ctrl)
|
||||
blueRegisterShoulds(ctrl)
|
||||
}
|
||||
|
||||
fun setup() {
|
||||
blueSet(F.didSetup, true)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package org.opengamestudio
|
||||
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.*
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@Composable
|
||||
fun BlueView() {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.spacedBy(16.dp),
|
||||
modifier = Modifier.padding(40.dp)
|
||||
) {
|
||||
Box(contentAlignment = Alignment.Center) {
|
||||
Text(
|
||||
text = "Blue",
|
||||
style = MaterialTheme.typography.headlineLarge,
|
||||
color = Color.White,
|
||||
modifier = Modifier.offset(x = 1.dp, y = 1.dp)
|
||||
)
|
||||
Text(
|
||||
text = "Blue",
|
||||
style = MaterialTheme.typography.headlineLarge,
|
||||
color = Color.Black
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.opengamestudio
|
||||
|
||||
fun otherPrintStderr(txt: String) {
|
||||
System.err.println(txt)
|
||||
}
|
||||
|
||||
fun otherSetupConsoleLogging(
|
||||
ctrl: DialectController,
|
||||
prefix: String
|
||||
) {
|
||||
ctrl.registerCallback { c ->
|
||||
val value = c.fieldAny(c.recentField)
|
||||
val line = "ИГР $prefix k/v: '${c.recentField}'/'$value'"
|
||||
otherPrintStderr(line)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user