Skip to content

Commit 4b51931

Browse files
Android Editor: Update suspend button icon in GameMenuBar
1 parent 7fbc3a5 commit 4b51931

File tree

3 files changed

+24
-6
lines changed

3 files changed

+24
-6
lines changed

platform/android/java/editor/src/main/java/org/godotengine/editor/embed/GameMenuFragment.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class GameMenuFragment : Fragment(), PopupMenu.OnMenuItemClickListener {
125125
private val collapseMenuButton: View? by lazy {
126126
view?.findViewById(R.id.game_menu_collapse_button)
127127
}
128-
private val pauseButton: View? by lazy {
129-
view?.findViewById(R.id.game_menu_pause_button)
128+
private val suspendButton: View? by lazy {
129+
view?.findViewById(R.id.game_menu_suspend_button)
130130
}
131131
private val nextFrameButton: View? by lazy {
132132
view?.findViewById(R.id.game_menu_next_frame_button)
@@ -267,7 +267,7 @@ class GameMenuFragment : Fragment(), PopupMenu.OnMenuItemClickListener {
267267
menuListener?.closeGameWindow()
268268
}
269269
}
270-
pauseButton?.apply {
270+
suspendButton?.apply {
271271
setOnClickListener {
272272
val isActivated = !it.isActivated
273273
menuListener?.suspendGame(isActivated)
@@ -348,7 +348,7 @@ class GameMenuFragment : Fragment(), PopupMenu.OnMenuItemClickListener {
348348
isGameEmbedded = gameMenuState.getBoolean(BaseGodotEditor.EXTRA_IS_GAME_EMBEDDED, false)
349349
isGameRunning = gameMenuState.getBoolean(BaseGodotEditor.EXTRA_IS_GAME_RUNNING, false)
350350

351-
pauseButton?.isEnabled = isGameRunning
351+
suspendButton?.isEnabled = isGameRunning
352352
nextFrameButton?.isEnabled = isGameRunning
353353

354354
val nodeType = gameMenuState.getSerializable(BaseGodotEditor.GAME_MENU_ACTION_SET_NODE_TYPE) as GameMenuListener.NodeType? ?: GameMenuListener.NodeType.NONE
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="16dp"
3+
android:height="16dp"
4+
android:viewportWidth="16"
5+
android:viewportHeight="16">
6+
<path
7+
android:pathData="m8,4h2v2h2V8H8Z"
8+
android:fillColor="@color/game_menu_icons_color_state"/>
9+
<path
10+
android:pathData="M2.289,9L4.703,9A0.289,0.289 0,0 1,4.992 9.289L4.992,14.711A0.289,0.289 0,0 1,4.703 15L2.289,15A0.289,0.289 0,0 1,2 14.711L2,9.289A0.289,0.289 0,0 1,2.289 9z"
11+
android:fillColor="@color/game_menu_icons_color_state"/>
12+
<path
13+
android:pathData="M6.289,9L8.711,9A0.289,0.289 0,0 1,9 9.289L9,14.711A0.289,0.289 0,0 1,8.711 15L6.289,15A0.289,0.289 0,0 1,6 14.711L6,9.289A0.289,0.289 0,0 1,6.289 9z"
14+
android:fillColor="@color/game_menu_icons_color_state"/>
15+
<path
16+
android:pathData="M9,1A6,6 0,0 0,3 7A6,6 0,0 0,3.084 8L5.127,8A4,4 0,0 1,5 7A4,4 0,0 1,9 3A4,4 0,0 1,13 7A4,4 0,0 1,10 10.873L10,12.916A6,6 0,0 0,15 7A6,6 0,0 0,9 1z"
17+
android:fillColor="@color/game_menu_icons_color_state"/>
18+
</vector>

platform/android/java/editor/src/main/res/layout/game_menu_fragment_layout.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
android:orientation="horizontal">
1919

2020
<ImageButton
21-
android:id="@+id/game_menu_pause_button"
21+
android:id="@+id/game_menu_suspend_button"
2222
style="?android:attr/borderlessButtonStyle"
2323
android:layout_width="48dp"
2424
android:layout_height="48dp"
2525
android:background="@drawable/game_menu_button_bg"
26-
android:src="@drawable/pause_play_selector" />
26+
android:src="@drawable/suspend" />
2727

2828
<ImageButton
2929
android:id="@+id/game_menu_next_frame_button"

0 commit comments

Comments
 (0)