Skip to content

Commit

Permalink
feat(workbench): add icons to workbench functions panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Hoefer committed Dec 17, 2020
1 parent c2885a4 commit 91abe11
Show file tree
Hide file tree
Showing 62 changed files with 38 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.github.xetra11.ck3workbench.module.character.ui

import androidx.compose.foundation.Image
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand All @@ -9,18 +11,45 @@ import androidx.compose.foundation.layout.preferredSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.ImageBitmap
import androidx.compose.ui.graphics.imageFromResource
import androidx.compose.ui.res.imageResource
import androidx.compose.ui.unit.dp
import com.github.xetra11.ck3workbench.app.NotificationsService

@Composable
fun WorkbenchFunctions() {
Column(Modifier.fillMaxHeight(0.8F), verticalArrangement = Arrangement.SpaceBetween) {
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
Box(Modifier.border(3.dp, Color.Blue).preferredSize(50.dp))
val squareImage = imageResource("icons/thepinkpanzer/BG_Square_Brown.png")
Box(Modifier.preferredSize(50.dp)
.clickable(
onClick = { NotificationsService.notify("CLICK") }
)) {
Image(squareImage)
}
Box(Modifier.preferredSize(50.dp)
.clickable(
onClick = { NotificationsService.notify("CLICK 2") }
)) {
Image(squareImage)
}
Box(Modifier.preferredSize(50.dp)
.clickable(
onClick = { NotificationsService.notify("CLICK 3") }
)) {
Image(squareImage)
}
Box(Modifier.preferredSize(50.dp)
.clickable(
onClick = { NotificationsService.notify("CLICK") }
)) {
Image(squareImage)
}
Box(Modifier.preferredSize(50.dp)
.clickable(
onClick = { NotificationsService.notify("CLICK") }
)) {
Image(squareImage)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class CharacterScriptImporter {
if (characterState.contains(it)) {
NotificationsService.error("""Character with name "${it.name}" already exists""")
} else {
NotificationsService.notify("""New Character "${it.name}" added!""")
characterState.add(it)
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes

0 comments on commit 91abe11

Please sign in to comment.