Dropdown popup background is mostly transparent, so the options behind it show through

オープン 初心者向け
#368 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
java
領域
frontend

調査の方向性

ポップアップがScreen.MENU_BACKGROUNDを使用するDropdownWidget#extractRenderStateから始め、他のオプションの上に向かって開くDropdownStringControllerBuilderで問題を再現します。背景がどのように塗りつぶされるかを確認し、dropdownが不透明になって背後のオプションを完全に覆うことを検証してください。

索引モデルが issue の本文から書いたものです。

説明

When a dropdown (DropdownStringControllerBuilder) opens, its list is drawn over the options above it, but its background is mostly see-through. The text, checkboxes and outlines of those options show through the list, which makes the suggestions hard to read.

Image
Environment
  • Minecraft: 26.2
  • YACL: 3.9.7+26.2-fabric
  • Fabric Loader: 0.19.5
Steps to reproduce
  1. Put a ListOption<String> using DropdownStringControllerBuilder below a few other options in a category (the list opens upwards, over them). For example:
    ListOption.<String>createBuilder()
            .name(Component.literal("Blocks"))
            .binding(List.of(), () -> list, v -> list = v)
            .controller(opt -> DropdownStringControllerBuilder.create(opt)
                    .values(BuiltInRegistries.BLOCK.keySet().stream().map(Object::toString).toList())
                    .allowAnyValue(true))
            .initial("minecraft:")
            .build()
    
  2. Open the config screen and click into one of the list's entries so the dropdown opens.
Expected

The dropdown list has an opaque background and covers the options behind it.

Actual

The options behind the list are visible through it, and their text overlaps the

Possible cause

DropdownWidget#extractRenderState fills the background with `Screen.MENU_BACK

graphics.blit(RenderPipelines.GUI_TEXTURED, Screen.MENU_BACKGROUND, x, y1, 0.0f
        textureWidth, textureHeight, 32, 32, 0xFF3F3F3F);

Vanilla's textures/gui/menu_background.png has an alpha of 64/255 in every pint jar), and the tint only darkens the color, so the popup ends up about 25%opaque. Drawing an opaque fill first (e.g. graphics.fill(..., 0xFF000000)), ould probably fix it.

Related: the last line of #276 asks for a less transparent background for the same reason.

主要言語
Java
スター
161
フォーク
70
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

isXander/YetAnotherConfigLib のほかの issue

isXander/YetAnotherConfigLib の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。