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

Abierto Apto para principiantes
#368 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
82/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java
Área
frontend

Línea de trabajo

Comienza en DropdownWidget#extractRenderState, donde el popup utiliza Screen.MENU_BACKGROUND, y reproduce el problema con un DropdownStringControllerBuilder que se abre hacia arriba sobre otras opciones. Comprueba cómo se rellena el fondo y verifica que el dropdown se vuelva opaco y cubra por completo las opciones que quedan detrás.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
161
Forks
70
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de isXander/YetAnotherConfigLib

Todos los issues de isXander/YetAnotherConfigLib

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.