Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Add selection dialog (drop down/combo box) #13814

Merged
merged 1 commit into from Jan 7, 2024

Conversation

srifqi
Copy link
Member

@srifqi srifqi commented Sep 16, 2023

Goal of the PR
This PR adds selection dialog on Android that will be shown when a player taps a drop down (combo box).

Minetest Android selection dialog

Videos
Minetest-Android-selection-dialog.mp4
Minetest-Android-selection-dialog-in-game.mp4

How does the PR work?
In GUIFormSpecMenu::getAndroidUIInput() and GUIModalMenu::preprocessEvent(), combo boxes are also processed.

This PR also refactors and simplifies interaction between the Java (Android) part and the C++ part (see porting_android.cpp/h). See the commit message for more technical information.

Does this relate to a goal in the roadmap?
Yes, this PR tries to improve user experiences.

If not a bug fix, why is this PR needed? What usecases does it solve?
The Irrlicht's combo box (drop down) is small and hard to navigate on Android (touch-screen devices). Hard to scroll worsen this issue.

To do

This PR is a Ready for Review.

How to test

To test the change in the main menu,

  1. Run Minetest on a touch-screen device.
  2. Open any dialog/setting that has selections/drop downs/combo boxes.
  3. Tap it.
  4. A selection dialog should show up.
  5. Tap a different selection.
  6. The formspec should update with new data.
  7. Repeat step 3 to 5, but with the same selection (as given).
  8. The formspec should stay the same.
  9. Repeat step 3 to 4.
  10. Tap outside the dialog.
  11. The formspec should stay the same.

To test the change inside a world,

  1. Run Minetest on a touch-screen device.
  2. Create a world (optional) and use a mod that has selections/drop downs/combo boxes.
  3. Enter the world.
  4. Open the dialog from the mod.
  5. Try the same as testing in the main menu above.

Android: APK builds
Included in these builds is the Mail mod. Type /mail in the chat to open the formspec. These builds use minetest/irrlicht#241 for their IrrlichtMT library.

Old builds (without the PR in the IrrlichtMT)

@grorp
Copy link
Member

grorp commented Sep 16, 2023

I tested your arm64 APK. Most of the time, it worked fine, but a few times, I somehow accidentally broke it. Here's a video:

1000034919.mp4

First, the Android dialog didn't show and I was shown a standard Minetest dropdown instead. Then, I tried to select something in that dropdown and the Android dialog opened. When I closed the Android dialog, the whole settings dialog closed with it.

@srifqi
Copy link
Member Author

srifqi commented Sep 16, 2023

(video)
First, the Android dialog didn't show and I was shown a standard Minetest dropdown instead. Then, I tried to select something in that dropdown and the Android dialog opened. When I closed the Android dialog, the whole settings dialog closed with it.

This is caused by Irrlicht opening the combo box if we clicked/tapped outside the formspec area while the combo box is still focused (also happens on desktop). We can try to remove focus from the combo box by focusing on its parent element after selecting the item to prevent the issue.

diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp
index ea89dcdfa..bcda1f655 100644
--- a/src/gui/guiFormSpecMenu.cpp
+++ b/src/gui/guiFormSpecMenu.cpp
@@ -3503,6 +3503,7 @@ bool GUIFormSpecMenu::getAndroidUIInput()
				change.GUIEvent.Element = 0;
				change.GUIEvent.EventType = EGET_COMBO_BOX_CHANGED;
				dropdown->getParent()->OnEvent(change);
+				Environment->setFocus(dropdown->getParent());
			}
		}

The dialog close is caused by passing an Esc keyboard event to the combo box, but since the combo box is already closed, the event is passed to the dialog and closes it. There is no method to close a combo box list (or at least check its status).

@rubenwardy rubenwardy added the Roadmap The change matches an item on the current roadmap. label Sep 17, 2023
@oong819
Copy link
Contributor

oong819 commented Sep 18, 2023

Minetest formspec on Android are very unTouchscreenFriendly and somewhat small (made for cursor)

Should we consider create a functiom that read formspec and create Android widget accordingly?

@srifqi
Copy link
Member Author

srifqi commented Sep 18, 2023

Should we consider create a functiom that read formspec and create Android widget accordingly?

The problem is that a new element is created by calling the Environment class, so we will also need to edit the Irrlicht either way (which I try to not do it because it is harder).

//now really show list
gui::IGUIComboBox *e = Environment->addComboBox(rect, data->current_parent,
spec.fid);


By the way, is the patch above enough to prevent the issue? If it is not, should we try to edit the Irrlicht's IGUIComboBox and add a new method to open/close a list?

@oong819
Copy link
Contributor

oong819 commented Sep 19, 2023

oh i have no problem with the PR, its work fine. i just got reminded of irrlicht scrollview X_X

@grorp
Copy link
Member

grorp commented Sep 22, 2023

I don't think we can get away without modifying IrrlichtMt here. Instead of unfocusing the combobox to hide the issue, I think we should add a way to reliably detect when the user opens a combobox.

I also think that we should prevent comboboxes from opening their dropdown on Android, otherwise you see the Irrlicht dropdown behind the transparent background of the Android dialog.

Here's my proposal for the Irrlicht changes: minetest/irrlicht#241

And here are the Minetest changes for the Irrlicht changes (quick and dirty, view with whitespace changes hidden): srifqi/minetest@android_selection_dialog...grorp:minetest:sel-dialog-proposal

@srifqi
Copy link
Member Author

srifqi commented Sep 28, 2023

Here's my proposal [...]

Thank you for your work! I did not know much about IrrlichtMT to make those changes. The code works.


EDIT: The build failure is caused by the differences in the IrrlichtMT library. New APKs have been added to the first post.

@srifqi srifqi added the Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) label Sep 28, 2023
@srifqi
Copy link
Member Author

srifqi commented Oct 1, 2023

I rebased and squashed this PR.

The grorp's PR has been merged on IrrlichtMT, too.

@srifqi srifqi removed the Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) label Oct 1, 2023
@grorp
Copy link
Member

grorp commented Oct 1, 2023

This is still waiting for a new IrrrlichtMT revision.

@grorp grorp added the Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) label Oct 1, 2023
@srifqi
Copy link
Member Author

srifqi commented Oct 27, 2023

I rebased this PR to include the newest IrrlichtMT version.

@srifqi srifqi removed the Waiting (on dependency) Waiting on another PR or external circumstances (not for rebases/changes requested) label Oct 27, 2023
Copy link
Member

@grorp grorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR makes dropdowns much more usable on Android. Thank you!

While testing, I noticed one problem: You can no longer cancel the text input completely by pressing the back button.

Before this PR

Record_2023-12-07-19-46-46_2f92d212d72044a7b2c4130128bd465a.mp4
  • If you press the "Done" button without changing the pre-filled text, the pre-filled text is submitted.
  • If you press the back button, no submission happens.

After this PR

Record_2023-12-07-19-53-52_2f92d212d72044a7b2c4130128bd465a.mp4
  • If you press the "Done" button without changing the pre-filled text, the pre-filled text is submitted.
  • If you press the back button, the pre-filled text is submitted. (<- wrong!)

src/porting_android.h Outdated Show resolved Hide resolved
@srifqi
Copy link
Member Author

srifqi commented Dec 8, 2023

While testing, I noticed one problem: You can no longer cancel the text input completely by pressing the back button.

Thank you for noticing it.

I added another enum to represent input dialog states:

  1. is currently shown,
  2. has its input sent, and
  3. is cancelled/dismissed.

I also rebased this PR to current master and added/fixed some comments. I might squash these commits later.

@grorp grorp self-requested a review December 8, 2023 21:17
Copy link
Member

@grorp grorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text input dialog sometimes doesn't properly set the value:

not.working.text.input.dialog.mp4

So far, I've only observed on the first try after starting Minetest.

Shouldn't getAndroidUIInput return void instead of bool? Its return value is never used as far as I can see, and it always returns false.

src/porting_android.cpp Outdated Show resolved Hide resolved
@srifqi srifqi added Rebase needed The PR needs to be rebased by its author. Action / change needed Code still needs changes (PR) / more information requested (Issues) labels Dec 28, 2023
@srifqi
Copy link
Member Author

srifqi commented Dec 29, 2023

I have rebased and squashed this PR.

The text input dialog sometimes doesn't properly set the value:
(video)

So far, I've only observed on the first try after starting Minetest.

Oh, that is true. The event propagation (to C++ side) seems to be late by one/two events. I will try to look into it.

Shouldn't getAndroidUIInput return void instead of bool? Its return value is never used as far as I can see, and it always returns false.

I agree.

@srifqi srifqi removed the Rebase needed The PR needs to be rebased by its author. label Dec 29, 2023
- The handling of IGUIComboBox uses the new setAndSendSelected() method.
- getDialogState() is now getInputDialogState() and returns the state of the input dialog.
- getLastDialogType() is added and returns current/last shown dialog's type.
- getInputDialogState() now returns an enum instead of int.
- getAndroidUIInput() now returns void instead of bool.
- New data types (enum) are added:
  (1) GameActivity.DialogType (Java) and porting::AndroidDialogType (C++)
  (2) GameActivity.DialogState (Java) and porting::AndroidDialogState (C++)
- When showing a text input dialog, there is no custom accept button text any more.
- showDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- showInputDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- getDialogValue()/getInputDialogValue() is now getDialogMessage()/getInputDialogMessage().


Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>
@srifqi
Copy link
Member Author

srifqi commented Jan 2, 2024

The text input dialog sometimes doesn't properly set the value:

I can not find the actual cause, but I found that delaying GameActivity::getDialogMessage() (making it longer to response) somehow fixes the issue (or at least making it rarer for an already not-often case). This does not explain the value being late by one/two events.

diff --git a/android/app/src/main/java/net/minetest/minetest/GameActivity.java b/android/app/src/main/java/net/minetest/minetest/GameActivity.java
index f2ff09f3d..d5b057ffa 100644
--- a/android/app/src/main/java/net/minetest/minetest/GameActivity.java
+++ b/android/app/src/main/java/net/minetest/minetest/GameActivity.java
@@ -180,6 +180,7 @@ public class GameActivity extends NativeActivity {
 
 	public String getDialogMessage() {
 		inputDialogState = DialogState.DIALOG_CANCELED;
+		for (int i = 0; i < 1e5;) i ++;
 		return messageReturnValue;
 	}
 

By the way, that issue also happens in the recent master branch. I still has not been able to reproduce the issue in the 5.8.0 version.

@grorp
Copy link
Member

grorp commented Jan 2, 2024

By the way, that issue also happens in the recent master branch. I still has not been able to reproduce the issue in the 5.8.0 version.

Hmmm, if you say it doesn't happen on 5.8.0 ... could you try whether it's fixed if you revert 00d9d96?

@srifqi
Copy link
Member Author

srifqi commented Jan 3, 2024

could you try whether it's fixed if you revert 00d9d96?

The issue seems to be caused by that commit.

We need a better heuristic for shouldRender():

static bool shouldRender()
{
// On Android, pause rendering while the app is in background (generally not visible).
// Don't do this on desktop because windows can be partially visible.
#ifdef __ANDROID__
return get_raw_device()->isWindowActive();
#else
return true;
#endif
};

... or just always render the GUI:

diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp
index 4bb7b041f..43ea4d2b2 100644
--- a/src/gui/guiEngine.cpp
+++ b/src/gui/guiEngine.cpp
@@ -267,3 +267,2 @@ void GUIEngine::run()
 	while (m_rendering_engine->run() && (!m_startgame) && (!m_kill)) {
-		if (RenderingEngine::shouldRender()) {
 		// check if we need to update the "upper left corner"-text
@@ -295,3 +294,2 @@ void GUIEngine::run()
 		driver->endScene();
-		}
 

@grorp
Copy link
Member

grorp commented Jan 3, 2024

The issue seems to be caused by that commit.

Alright, sorry for reporting it on your PR. Feel free to ignore the issue for this PR.

We need a better heuristic for shouldRender()

I have an idea for that: Perhaps checking for !Paused instead of Focused && !Paused in Irrlicht fixes the issue. I'll try tomorrow.

... or just always render the GUI:

diff --git a/src/gui/guiEngine.cpp b/src/gui/guiEngine.cpp
index 4bb7b041f..43ea4d2b2 100644
--- a/src/gui/guiEngine.cpp
+++ b/src/gui/guiEngine.cpp
@@ -267,3 +267,2 @@ void GUIEngine::run()
 	while (m_rendering_engine->run() && (!m_startgame) && (!m_kill)) {
-		if (RenderingEngine::shouldRender()) {
 		// check if we need to update the "upper left corner"-text
@@ -295,3 +294,2 @@ void GUIEngine::run()
 		driver->endScene();
-		}
 

guiEngine.cpp is only for the mainmenu, so this won't affect in-game GUIs. guiEngine.cpp not the "GUI engine", but the "engine GUI".

Copy link
Member

@grorp grorp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested together with #14211. Works well.

Thank you!

@grorp grorp added One approval ✅ ◻️ and removed Action / change needed Code still needs changes (PR) / more information requested (Issues) labels Jan 6, 2024
Copy link
Member

@SmallJoker SmallJoker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Android 6.0. Works.

@srifqi srifqi merged commit 171f911 into minetest:master Jan 7, 2024
13 checks passed
@srifqi srifqi deleted the android_selection_dialog branch January 7, 2024 12:00
siboehm added a commit to Astera-org/minetest that referenced this pull request Jan 17, 2024
Add ZMQ

Worlds shittiest minetest interface

CI MacOS install zmq

Handshakes, plus send Screenshots back

cleanup

Extract all command names

Move remote handler into own file

hook mouse

.

non-working protobuf commit

switch to capnproto

Send image with capnp

Send reward

Multi keypress in the client

support all possible keys

Add environment.yml

Commit unmodified eluther gym env

Fail to close the inventory

Minetester define action and obs space

Gymnasium basic work

gym env check bounds

switch dummy client to pygame

More work on gym client

more progress

First working gym client

Rm old client

Combine isRemote() and isRandom()

Make client port configurable

fix camera mode and sneak

.

fix remote cli flag

vscode

Add basic reward mod

Parse reward from HUD in C++

.

Cmake changes to get Linux building

README: add linux packages for capnp

minor linux changes

save png HACK

.

Linux CI deps

tri again

tri again

gitmodules

submodules

submodules

.

First draft

env start xvfb

more headless

fix screenshot startup issue

add handshaker for debugging

create a new world when starting a game

Now `minetest --gameid <foo> --go` should work.
Previously it would fail because a world was not specified, and the
default one did not exist.

Change-Id: Ic6001f73713d59930e96c3f2a30395f5b0b8cbb9

Improve Irrlicht instructions (minetest#14055)

Specify the version when cloning.
Move instructions from CMakeLists to docs/compiling/.

Check if liquid can flow into empty node before picking it as source (minetest#14057)

Fix unittest failure for release versions (minetest#14067)

GUIFormspecMenu: Fix race condition between quit event and cleanup in Game (minetest#14010)

To not instantly free GUIFormSpec upon close/quit, Game periodically
cleans up the remaining instance on the next frame.

When a new formspec is received and processed after closing the previous formspec
but before the cleanup in Game, the formspec would be closed regardless.
This now re-creates the formspec when the old one is already pending for removal.

Add sound volume when unfocused setting (minetest#14083)

This adds a new setting to set sound volume multiplier when Minetest window is unfocused/inactive (sound_volume_unfocused, located in Settings > Graphics and Audio > Audio > Volume when unfocused).

If the window is not focused, the sound volume will be multiplied by sound_volume_unfocused setting. The sound volume will be set back to sound_volume again when the window is focused.

Avoid movement jitter (minetest#13093)

This allows the client and server to agree on the position of objects and attached players even when there is lag.

Try to fix safeWriteToFile producing empty files on Windows (minetest#14085)

Use win32 APIs to write the temporary file before copying to the final
destination. Because we've observed the final file being empty, we
suspect that std::ostream::flush is not flushing.

Also add a test for it.

Remove use_texture_alpha compatibility code for nodeboxes & meshes (minetest#13929)

Warning: inform about entity name when bug detected about attachement (minetest#13354)

Clean up porting.h a bit

Improve clock_gettime usage

- correctly use value of _POSIX_MONOTONIC_CLOCK
- drop special path for macOS: it supports clock_gettime since macOS 10.12

Reduce test framework macrosity

Delete clang-format files and comments (minetest#14079)

Fix Windows architecture reporting in sysinfo

Upload artifacts in MinGW CI

Get rid of VERSION_EXTRA for buildbot

This is probably a leftover of when CMake didn't automatically
detect the revision from git.

Hash-check buildbot dependencies

Inventory: prevent item loss when stacking oversized ItemStacks (minetest#14072)

Remove usage of removed "PP" macro

This fixes a compilation error introduced by e7be135.

Allow running individual benchmarks

mirrors and reuses the option from 2f6a9d1

Try to benchmark common MapBlock usage

Allocate data seperately from MapBlock class again

This effectively reverts commit b3503e7.

Change MapBlock content cache to a vector

Get rid of parent pointer in MapBlock

Elide MapBlock::contents_cached

Reduce size of some MapBlock members

Also adds assertions to catch refcounting errors (on a debug build).

Reorder members of MapBlock for performance

Before and after as obtained via `pahole -C MapBlock bin/minetest`:
/* size: 336, cachelines: 6, members: 23 */
/* sum members: 329, holes: 4, sum holes: 7 */
vs.
/* size: 336, cachelines: 6, members: 23 */
/* sum members: 329, holes: 2, sum holes: 7 */

There is not much to be gained by packing but I made sure
to move the most important data (mainly for the client) into
the first cache line.

Update porting.h to fix build errors on macOS 14 / Xcode 15

Allow cheaper culling checks at a distance (minetest#14073)

* Allow cheaper culling checks at a distance
* Pick a random ray, so that far missing block will eventually be shown

Extract Game::drawScene from Game::updateFrame

Add `touch_controls` boolean to `get_player_window_information()` (minetest#14092)

MinGW toolchain refresh

Add dithering (minetest#9014)

Android: Pause rendering while the app is paused (minetest#14058)

Hand roll UTF-16 conversion in CGUITTFont (minetest#14121)

Extend bone override capabilities (minetest#12388)

Fix touch input on Linux

The code relied on touch IDs being consecutive. This is true on Android, but not on Linux.
Therefore, touch input on Linux was broken since 53886dc.

Enable segment heap on Windows

Fix TouchScreenGUI ignoring server-sent pitch changes

Manually configurable minimum protocol version (minetest#14054)

Partially address minetest#13483.  Server operators can set a minimum
protocol version to match the game requirements (or any other
restriction they may want), and it's applied as an additional
constraint on top of the baseline compatibility range, optional
strict_protocol_version_checking, and any kick-on-join used by
the game/mods.

Fix on_(grant|revoke) not being run by mods

Split windows from linux CI workflows

Fix set_bone_position regression (error on passing none)

Initial implementation of 'Godrays'

Make volumetric light effect strength server controllable

- Make volumetric light effect strength server controllable
- Separate volumetric and bloom shader pipeline
- Require bloom to be enable, scale godrays with bloom

Touchscreen: Make server-sent overrides of button textures work (minetest#14145)

Support specifying game in config

In minetest.conf:

```
game_dir = /path/to/game
```

Change-Id: I790cc6ea91aa988e82e0a1fda23ab4ae2f8026a3

Link with -latomic

Rework server stepping and dtime calculation

Address some clang-tidy warnings

Update clang-tidy workflow

Fix minor issue with log_deprecated()

Remove non-existent textures from texture_packs.md

These textures were removed 5 years ago by 326eeca.

Make the loading screen progress bar respect "gui_scaling"

MacOS: Add codesigning instructions to docs (minetest#14060)

Optimize and improve built-in PNG writer (minetest#14020)

Update CMakeLists.txt to fix MacOS build (minetest#14160)

Co-authored-by: sfan5 <sfan5@live.de>

Support both mouse and touch input in GUIs in a single binary  (minetest#14146)

Avoid short overflow with large viewing ranges (minetest#14175)

Rename `hud_elem_type` to `type` (minetest#14065)

Fix AsyncRunStep() skipping steps when dtime < 1 ms

Clean up OS-specific initialization

Clean up gettext initialization

Enable some runtime hardening on win32

Perform server occlusion check before a block is loaded or generated (minetest#14148)

Do not emerge blocks in the active_object_send_range_blocks range (minetest#14152)

The active object range is about active objects (not blocks). Activate blocks (and hence any object "in" them) in the cone define by the active object range (and fov) when they are loaded (i.e. visible), otherwise ignore them.

Extend sanity checks in ActiveBlockList::update

also fixes the space indentation

Add missing header for gcc-14

https://gcc.gnu.org/gcc-14/porting_to.html

Signed-off-by: Alfred Wingate <parona@protonmail.com>

Method add_pos for object/player (minetest#14126)

Comply with base64 license terms (minetest#14199)

Remove reference to defunct gitlab docker image

see minetest#14164

Fix tonemapping effect

Apply saturation even if tonemapping is disabled

Legible Lua profiler (minetest#14142)

Replace clientmap's MeshBufListList with a hashmap

Use AL_SOFT_direct_channels_remix extension for non-positional stereo sounds (minetest#14195)

Don't apply gui_scaling & DPI twice to table[] / textlist[] scrollbar (minetest#14206)

Remove server's address and port from pause menu (minetest#14082)

Touchscreen: Recognize double-taps as double-clicks  (minetest#14187)

Fix GameUI text staying visible during shutdown. (minetest#14197)

Don't run CDB update_detector more than once (minetest#14214)

Remove controls listed in the pause menu (no touchscreen) (minetest#13282)

Add "--needed" to Arch command to avoid reinstalling packages

Fix logic in porting::attachOrCreateConsole()

No functional change but now the comment is actually correct.

Add unittest to check thread_local destructor brokenness

Avoid unused argument spam with MinGW-clang

Fix native thread handle usage on win32

Fix some console window behavior on Windows

Ensure deterministic client occlusion culling and minor improvements (minetest#14212)

* Ensure deterministic client occlusion culling
* Increase culling optimize distance slightly
* More accurate culling when sampling

Android: Add selection dialog (drop down/combo box) (minetest#13814)

- The handling of IGUIComboBox uses the new setAndSendSelected() method.
- getDialogState() is now getInputDialogState() and returns the state of the input dialog.
- getLastDialogType() is added and returns current/last shown dialog's type.
- getInputDialogState() now returns an enum instead of int.
- getAndroidUIInput() now returns void instead of bool.
- New data types (enum) are added:
  (1) GameActivity.DialogType (Java) and porting::AndroidDialogType (C++)
  (2) GameActivity.DialogState (Java) and porting::AndroidDialogState (C++)
- When showing a text input dialog, there is no custom accept button text any more.
- showDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- showInputDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- getDialogValue()/getInputDialogValue() is now getDialogMessage()/getInputDialogMessage().

Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>

Extend capabilities of Address class

Some minor cleanups for UDPSocket class

Rework client connecting and enable fallback address use

Fix dividing by zero crashes in texture modifiers

slimmer gitignore

Bit of cleanup

ruff

First ZMQ Req returns image

.

add a basic env test

Document env setup

ci

ci

ci

ci

.

ci

ci

ci

ci

ci

make build a bit faster maybe

ci

ci

ci

ci

pytest

pytest again

add channels

pytest

forgot to setup env

cleanup minetest env

pytest timeout & logging

.

doc

.

pytest

Rm wrong comment & stdout printing

ci

ci

Better macos instructions

rm android and windows ci

rm docker ci

try fix macos ci

try fix clang tidy

ci

macos submodules

macos submodules

macos submodules 1

macos submodules 1

macos submodules 1

macos submodules 1

macos submodules 1

Add test world

macos submodules 11

macos build again

move reward mod

move world

.

no mdofi
siboehm added a commit to Astera-org/minetest that referenced this pull request Jan 17, 2024
Add ZMQ

Worlds shittiest minetest interface

CI MacOS install zmq

Handshakes, plus send Screenshots back

cleanup

Extract all command names

Move remote handler into own file

hook mouse

.

non-working protobuf commit

switch to capnproto

Send image with capnp

Send reward

Multi keypress in the client

support all possible keys

Add environment.yml

Commit unmodified eluther gym env

Fail to close the inventory

Minetester define action and obs space

Gymnasium basic work

gym env check bounds

switch dummy client to pygame

More work on gym client

more progress

First working gym client

Rm old client

Combine isRemote() and isRandom()

Make client port configurable

fix camera mode and sneak

.

fix remote cli flag

vscode

Add basic reward mod

Parse reward from HUD in C++

.

Cmake changes to get Linux building

README: add linux packages for capnp

minor linux changes

save png HACK

.

Linux CI deps

tri again

tri again

gitmodules

submodules

submodules

.

First draft

env start xvfb

more headless

fix screenshot startup issue

add handshaker for debugging

create a new world when starting a game

Now `minetest --gameid <foo> --go` should work.
Previously it would fail because a world was not specified, and the
default one did not exist.

Change-Id: Ic6001f73713d59930e96c3f2a30395f5b0b8cbb9

Improve Irrlicht instructions (minetest#14055)

Specify the version when cloning.
Move instructions from CMakeLists to docs/compiling/.

Check if liquid can flow into empty node before picking it as source (minetest#14057)

Fix unittest failure for release versions (minetest#14067)

GUIFormspecMenu: Fix race condition between quit event and cleanup in Game (minetest#14010)

To not instantly free GUIFormSpec upon close/quit, Game periodically
cleans up the remaining instance on the next frame.

When a new formspec is received and processed after closing the previous formspec
but before the cleanup in Game, the formspec would be closed regardless.
This now re-creates the formspec when the old one is already pending for removal.

Add sound volume when unfocused setting (minetest#14083)

This adds a new setting to set sound volume multiplier when Minetest window is unfocused/inactive (sound_volume_unfocused, located in Settings > Graphics and Audio > Audio > Volume when unfocused).

If the window is not focused, the sound volume will be multiplied by sound_volume_unfocused setting. The sound volume will be set back to sound_volume again when the window is focused.

Avoid movement jitter (minetest#13093)

This allows the client and server to agree on the position of objects and attached players even when there is lag.

Try to fix safeWriteToFile producing empty files on Windows (minetest#14085)

Use win32 APIs to write the temporary file before copying to the final
destination. Because we've observed the final file being empty, we
suspect that std::ostream::flush is not flushing.

Also add a test for it.

Remove use_texture_alpha compatibility code for nodeboxes & meshes (minetest#13929)

Warning: inform about entity name when bug detected about attachement (minetest#13354)

Clean up porting.h a bit

Improve clock_gettime usage

- correctly use value of _POSIX_MONOTONIC_CLOCK
- drop special path for macOS: it supports clock_gettime since macOS 10.12

Reduce test framework macrosity

Delete clang-format files and comments (minetest#14079)

Fix Windows architecture reporting in sysinfo

Upload artifacts in MinGW CI

Get rid of VERSION_EXTRA for buildbot

This is probably a leftover of when CMake didn't automatically
detect the revision from git.

Hash-check buildbot dependencies

Inventory: prevent item loss when stacking oversized ItemStacks (minetest#14072)

Remove usage of removed "PP" macro

This fixes a compilation error introduced by e7be135.

Allow running individual benchmarks

mirrors and reuses the option from 2f6a9d1

Try to benchmark common MapBlock usage

Allocate data seperately from MapBlock class again

This effectively reverts commit b3503e7.

Change MapBlock content cache to a vector

Get rid of parent pointer in MapBlock

Elide MapBlock::contents_cached

Reduce size of some MapBlock members

Also adds assertions to catch refcounting errors (on a debug build).

Reorder members of MapBlock for performance

Before and after as obtained via `pahole -C MapBlock bin/minetest`:
/* size: 336, cachelines: 6, members: 23 */
/* sum members: 329, holes: 4, sum holes: 7 */
vs.
/* size: 336, cachelines: 6, members: 23 */
/* sum members: 329, holes: 2, sum holes: 7 */

There is not much to be gained by packing but I made sure
to move the most important data (mainly for the client) into
the first cache line.

Update porting.h to fix build errors on macOS 14 / Xcode 15

Allow cheaper culling checks at a distance (minetest#14073)

* Allow cheaper culling checks at a distance
* Pick a random ray, so that far missing block will eventually be shown

Extract Game::drawScene from Game::updateFrame

Add `touch_controls` boolean to `get_player_window_information()` (minetest#14092)

MinGW toolchain refresh

Add dithering (minetest#9014)

Android: Pause rendering while the app is paused (minetest#14058)

Hand roll UTF-16 conversion in CGUITTFont (minetest#14121)

Extend bone override capabilities (minetest#12388)

Fix touch input on Linux

The code relied on touch IDs being consecutive. This is true on Android, but not on Linux.
Therefore, touch input on Linux was broken since 53886dc.

Enable segment heap on Windows

Fix TouchScreenGUI ignoring server-sent pitch changes

Manually configurable minimum protocol version (minetest#14054)

Partially address minetest#13483.  Server operators can set a minimum
protocol version to match the game requirements (or any other
restriction they may want), and it's applied as an additional
constraint on top of the baseline compatibility range, optional
strict_protocol_version_checking, and any kick-on-join used by
the game/mods.

Fix on_(grant|revoke) not being run by mods

Split windows from linux CI workflows

Fix set_bone_position regression (error on passing none)

Initial implementation of 'Godrays'

Make volumetric light effect strength server controllable

- Make volumetric light effect strength server controllable
- Separate volumetric and bloom shader pipeline
- Require bloom to be enable, scale godrays with bloom

Touchscreen: Make server-sent overrides of button textures work (minetest#14145)

Support specifying game in config

In minetest.conf:

```
game_dir = /path/to/game
```

Change-Id: I790cc6ea91aa988e82e0a1fda23ab4ae2f8026a3

Link with -latomic

Rework server stepping and dtime calculation

Address some clang-tidy warnings

Update clang-tidy workflow

Fix minor issue with log_deprecated()

Remove non-existent textures from texture_packs.md

These textures were removed 5 years ago by 326eeca.

Make the loading screen progress bar respect "gui_scaling"

MacOS: Add codesigning instructions to docs (minetest#14060)

Optimize and improve built-in PNG writer (minetest#14020)

Update CMakeLists.txt to fix MacOS build (minetest#14160)

Co-authored-by: sfan5 <sfan5@live.de>

Support both mouse and touch input in GUIs in a single binary  (minetest#14146)

Avoid short overflow with large viewing ranges (minetest#14175)

Rename `hud_elem_type` to `type` (minetest#14065)

Fix AsyncRunStep() skipping steps when dtime < 1 ms

Clean up OS-specific initialization

Clean up gettext initialization

Enable some runtime hardening on win32

Perform server occlusion check before a block is loaded or generated (minetest#14148)

Do not emerge blocks in the active_object_send_range_blocks range (minetest#14152)

The active object range is about active objects (not blocks). Activate blocks (and hence any object "in" them) in the cone define by the active object range (and fov) when they are loaded (i.e. visible), otherwise ignore them.

Extend sanity checks in ActiveBlockList::update

also fixes the space indentation

Add missing header for gcc-14

https://gcc.gnu.org/gcc-14/porting_to.html

Signed-off-by: Alfred Wingate <parona@protonmail.com>

Method add_pos for object/player (minetest#14126)

Comply with base64 license terms (minetest#14199)

Remove reference to defunct gitlab docker image

see minetest#14164

Fix tonemapping effect

Apply saturation even if tonemapping is disabled

Legible Lua profiler (minetest#14142)

Replace clientmap's MeshBufListList with a hashmap

Use AL_SOFT_direct_channels_remix extension for non-positional stereo sounds (minetest#14195)

Don't apply gui_scaling & DPI twice to table[] / textlist[] scrollbar (minetest#14206)

Remove server's address and port from pause menu (minetest#14082)

Touchscreen: Recognize double-taps as double-clicks  (minetest#14187)

Fix GameUI text staying visible during shutdown. (minetest#14197)

Don't run CDB update_detector more than once (minetest#14214)

Remove controls listed in the pause menu (no touchscreen) (minetest#13282)

Add "--needed" to Arch command to avoid reinstalling packages

Fix logic in porting::attachOrCreateConsole()

No functional change but now the comment is actually correct.

Add unittest to check thread_local destructor brokenness

Avoid unused argument spam with MinGW-clang

Fix native thread handle usage on win32

Fix some console window behavior on Windows

Ensure deterministic client occlusion culling and minor improvements (minetest#14212)

* Ensure deterministic client occlusion culling
* Increase culling optimize distance slightly
* More accurate culling when sampling

Android: Add selection dialog (drop down/combo box) (minetest#13814)

- The handling of IGUIComboBox uses the new setAndSendSelected() method.
- getDialogState() is now getInputDialogState() and returns the state of the input dialog.
- getLastDialogType() is added and returns current/last shown dialog's type.
- getInputDialogState() now returns an enum instead of int.
- getAndroidUIInput() now returns void instead of bool.
- New data types (enum) are added:
  (1) GameActivity.DialogType (Java) and porting::AndroidDialogType (C++)
  (2) GameActivity.DialogState (Java) and porting::AndroidDialogState (C++)
- When showing a text input dialog, there is no custom accept button text any more.
- showDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- showInputDialog()/showDialogUI() for text input is now showTextInputDialog()/showTextInputDialogUI().
- getDialogValue()/getInputDialogValue() is now getDialogMessage()/getInputDialogMessage().

Co-authored-by: Gregor Parzefall <82708541+grorp@users.noreply.github.com>

Extend capabilities of Address class

Some minor cleanups for UDPSocket class

Rework client connecting and enable fallback address use

Fix dividing by zero crashes in texture modifiers

slimmer gitignore

Bit of cleanup

ruff

First ZMQ Req returns image

.

add a basic env test

Document env setup

ci

ci

ci

ci

.

ci

ci

ci

ci

ci

make build a bit faster maybe

ci

ci

ci

ci

pytest

pytest again

add channels

pytest

forgot to setup env

cleanup minetest env

pytest timeout & logging

.

doc

.

pytest

Rm wrong comment & stdout printing

ci

ci

Better macos instructions

rm android and windows ci

rm docker ci

try fix macos ci

try fix clang tidy

ci

macos submodules

macos submodules

macos submodules 1

macos submodules 1

macos submodules 1

macos submodules 1

macos submodules 1

Add test world

macos submodules 11

macos build again

move reward mod

move world

.

no mdofi
JosiahWI pushed a commit to JosiahWI/minetest that referenced this pull request Apr 18, 2024
- Allow reliably detecting when the user opens a combobox.
- Allow preventing comboboxes from opening.
- Allow sending a combobox change event.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android @ Client / Controls / Input Feature ✨ PRs that add or enhance a feature Roadmap The change matches an item on the current roadmap. >= Two approvals ✅ ✅ UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants