Mercurial > dwindows
comparison android/DWindows.kt @ 2714:26bb1e4a97d0
Android: Add glue to bring up the color wheel when calling dw_color_choose().
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 03 Dec 2021 20:21:13 +0000 |
parents | 6594bb323ab5 |
children | e9ad53d2271b |
comparison
equal
deleted
inserted
replaced
2713:6594bb323ab5 | 2714:26bb1e4a97d0 |
---|---|
5069 } | 5069 } |
5070 | 5070 |
5071 return retval | 5071 return retval |
5072 } | 5072 } |
5073 | 5073 |
5074 fun colorChoose(color: Int, alpha: Int, red: Int, green: Int, blue: Int): Int | |
5075 { | |
5076 var retval: Int = 0 | |
5077 | |
5078 waitOnUiThread { | |
5079 val dialog = Dialog(this) | |
5080 val colorWheel = ColorWheel(this, null, 0) | |
5081 | |
5082 dialog.setContentView(colorWheel) | |
5083 colorWheel.rgb = Color.rgb(red, green, blue) | |
5084 dialog.window?.setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT) | |
5085 dialog.show() | |
5086 retval = colorWheel.rgb | |
5087 } | |
5088 return retval | |
5089 } | |
5090 | |
5074 fun messageBox(title: String, body: String, flags: Int): Int | 5091 fun messageBox(title: String, body: String, flags: Int): Int |
5075 { | 5092 { |
5076 var retval = 0 | 5093 var retval = 0 |
5077 | 5094 |
5078 waitOnUiThread { | 5095 waitOnUiThread { |