Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@h0tp-ftw
Copy link
Owner

This Pull Request introduces a significant refactoring of the Ankimon reviewer look, transitioning from an
iframe-based system to a new Shadow DOM-based HUD portal. The BIGGEST FIX this makes is that most of the card's CSS will NOT affect appearance of the Ankimon GUI in the reviewer.

Key changes include:

  • New HUD Portal Implementation:

    • A new JavaScript file, src/Ankimon/user_files/web/ankimon_hud_portal.js, has been added to establish a Shadow
      DOM-based HUD. This provides better isolation and control over the injected UI elements.
    • The reviewer_obj.py has been refactored to construct the HUD's HTML and CSS dynamically and inject it into the
      new HUD portal via reviewer.web.eval().
    • The init.py and hooks.py files have been updated to integrate with this new HUD portal system, removing old
      iframe-related injections and hooks.
  • Main Pokemon Sprite Flipping:

    • The main pokemon sprite (user's pokemon) now consistently faces the opponent by being reflected along the
      X-axis.
    • This was achieved by ensuring transform: scaleX(-1); is applied to the #ankimon-hud #MyPokeImage CSS rule in
      src/Ankimon/functions/create_css_for_reviewer.py for all display configurations (show_mainpkmn_in_reviewer
      values 0, 1, and 2).
    • Crucially, initial CSS overrides within ankimon_hud_portal.js (specifically transform: none !important; on img
      and *, *::before, *::after selectors) were identified and removed to allow the sprite transformation to take
      effect.
  • Status Text Formatting:

    • Status messages (e.g., "fighting", "asleep", "fainted") are now displayed in full uppercase and bold.
    • This was ensured by removing text-transform: none !important; from the *, *::before, *::after rule in
      ankimon_hud_portal.js and adding !important to font-weight: bold; in the inline styles generated by
      create_status_html within src/Ankimon/functions/create_gui_functions.py to guarantee its application.

@github-actions github-actions bot requested a review from thepeacemonk August 13, 2025 06:15
Copy link
Owner Author

@h0tp-ftw h0tp-ftw left a comment

Choose a reason for hiding this comment

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

@thepeacemonk @Axil12 let me know what you think of this! Tried to integrate it fully with the existing system and variables. :)

@h0tp-ftw h0tp-ftw merged commit 04f4a28 into main Aug 15, 2025
4 checks passed
h0tp-ftw added a commit that referenced this pull request Nov 1, 2025
Implementation of HUD Portal for Reviewer Look
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants