We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Expected behaviour Two buttons: LEFT and RIGHT should be positioned according to their parent element. But right_target does not work correctly.
Screenshots
Code
import pygame from pygame import Rect from pygame import Window from pygame_gui import UIManager from pygame_gui.elements import UIButton, UIPanel class test(Window): def __init__(self): pygame.init() super().__init__(fullscreen_desktop = True) self.clock = pygame.time.Clock() self.screen = self.get_surface() self.manager = UIManager(self.size) parent_panel = UIPanel(Rect(self.size[0] / 2 - 250, self.size[1] / 2 - 100, 500, 200), manager = self.manager) child_rect = Rect() child_rect.size = (200, 200) child_rect.topright = (-10, self.size[1] / 2 - 100) child_left = UIButton(child_rect, "RIGHT", self.manager, anchors = {"right_target":parent_panel}) child_rect.topleft = (10, self.size[1] / 2 - 100) child_right = UIButton(child_rect, "LEFT", self.manager, anchors = {"left_target":parent_panel}) def run(self): running = True while running: td = self.clock.tick(120) / 1000.0 for event in pygame.event.get(): self.manager.process_events(event) if event.type == pygame.QUIT: running = False self.screen.fill("#141414") self.manager.update(td) self.manager.draw_ui(self.screen) self.flip() if __name__ == "__main__": test().run()
Platform and software (please complete the following information):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Expected behaviour
Two buttons: LEFT and RIGHT should be positioned according to their parent element. But right_target does not work correctly.
Screenshots

Code
Platform and software (please complete the following information):
The text was updated successfully, but these errors were encountered: