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

HUD: Dialoge an den Hero binden statt an eine neue Dummy-Entität? #1486

Open
cagix opened this issue Apr 10, 2024 · 0 comments
Open

HUD: Dialoge an den Hero binden statt an eine neue Dummy-Entität? #1486

cagix opened this issue Apr 10, 2024 · 0 comments
Labels

Comments

@cagix
Copy link
Member

cagix commented Apr 10, 2024

In https://github.com/Dungeon-CampusMinden/dojo-dungeon/pull/53 sollte ein Öffnen des Inventars unterbunden werden, wenn es noch offene Dialog-Fenster gibt - durch das Öffnen des Inventars würden nämlich bestimmte Tasteneingaben nie im Dialog-Fenster ankommen.

In diesem Zusammenhang (https://github.com/Dungeon-CampusMinden/dojo-dungeon/pull/53#discussion_r1559351272) wurde disktutiert, dass beim Erstellen eines neuen Dialogs dieser an eine neue Entität gebunden wird (Beispiel:

public static Entity textDialog(
final String content, final String buttonText, final String windowText) {
Entity entity = new Entity();
UIUtils.show(
() -> {
Dialog textDialog =
DialogFactory.createTextDialog(
defaultSkin(),
content,
buttonText,
windowText,
createResultHandler(entity, buttonText));
UIUtils.center(textDialog);
return textDialog;
},
entity);
Game.add(entity);
return entity;
}
) und ob das wirklich notwendig und sinnvoll ist.

In der Diskussion kam die Idee auf, dass man die Dialoge stattdessen auch dem jeweiligen Hero als Entität zuordnen könnte.

Dies soll einmal geprüft werden. Welche Auswirkungen hätte diese Änderung? Machen wir uns damit etwas kaputt?

Es wird vermutlich einen Grund für das aktuelle Design gegeben haben (hoffentlich), allerdings ist das nicht dokumentiert und erschließt sich auch nicht direkt aus sich selbst heraus.

@cagix cagix added the dungeon label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant