Use Roboto instead of Protest Strike, add Mandelbar, Multi Mandelbar, Phoenix and Lambda Fractal

This commit is contained in:
csd4ni3l
2025-06-17 20:01:15 +02:00
parent f1070321fd
commit 666a275810
12 changed files with 240 additions and 23 deletions

View File

@@ -15,10 +15,10 @@ class FractalChooser(arcade.gui.UIView):
self.anchor = self.add_widget(arcade.gui.UIAnchorLayout(size_hint=(1, 1)))
self.grid = self.add_widget(arcade.gui.UIGridLayout(row_count=3, column_count=3, horizontal_spacing=10, vertical_spacing=10))
self.grid = self.add_widget(arcade.gui.UIGridLayout(row_count=4, column_count=3, horizontal_spacing=10, vertical_spacing=10))
self.anchor.add(self.grid, anchor_x="center", anchor_y="center")
self.title_label = self.anchor.add(arcade.gui.UILabel(text="Choose a fractal to view.", font_name="Protest Strike", font_size=32), anchor_x="center", anchor_y="top", align_y=-50)
self.title_label = self.anchor.add(arcade.gui.UILabel(text="Choose a fractal to view.", font_name="Roboto", font_size=32), anchor_x="center", anchor_y="top", align_y=-50)
self.back_button = arcade.gui.UITextureButton(texture=button_texture, texture_hovered=button_hovered_texture, text='<--', style=button_style, width=100, height=50)
self.back_button.on_click = lambda event: self.main_exit()
@@ -27,13 +27,13 @@ class FractalChooser(arcade.gui.UIView):
for n, fractal_name in enumerate(iter_fractals):
row = n // 3
col = n % 3
self.iter_fractal_buttons.append(self.grid.add(arcade.gui.UITextureButton(texture=button_texture, texture_hovered=button_hovered_texture, text=fractal_name.replace("_", " ").capitalize(), style=button_style, width=200, height=200), row=row, column=col))
self.mandelbrot_button.on_click = lambda event, fractal_name=fractal_name: self.iter_fractal(fractal_name)
self.iter_fractal_buttons[-1].on_click = lambda event, fractal_name=fractal_name: self.iter_fractal(fractal_name)
row = n // 3
col = n % 3
self.sierpinsky_carpet_button = self.grid.add(arcade.gui.UITextureButton(texture=button_texture, texture_hovered=button_hovered_texture, text='Sierpinsky Carpet', style=button_style, width=200, height=200), row=0, column=n + 1)
row = (n + 1) // 3
col = (n + 1) % 3
self.sierpinsky_carpet_button = self.grid.add(arcade.gui.UITextureButton(texture=button_texture, texture_hovered=button_hovered_texture, text='Sierpinsky Carpet', style=button_style, width=200, height=200), row=row, column=col)
self.sierpinsky_carpet_button.on_click = lambda event: self.sierpinsky_carpet()
def main_exit(self):

View File

@@ -50,7 +50,7 @@ class Main(arcade.gui.UIView):
def on_show_view(self):
super().on_show_view()
self.title_label = self.box.add(arcade.gui.UILabel(text="Fractal Viewer", font_name="Protest Strike", font_size=48))
self.title_label = self.box.add(arcade.gui.UILabel(text="Fractal Viewer", font_name="Roboto", font_size=48))
self.play_button = self.box.add(arcade.gui.UITextureButton(text="Play", texture=button_texture, texture_hovered=button_hovered_texture, width=self.window.width / 2, height=150, style=big_button_style))
self.play_button.on_click = lambda event: self.play()

View File

@@ -58,7 +58,7 @@ class Settings(arcade.gui.UIView):
def display_categories(self):
for category in settings:
category_button = arcade.gui.UITextureButton(texture=button_texture, texture_hovered=button_hovered_texture, text=category, style=button_style, width=self.window.width / 10, height=50)
category_button = arcade.gui.UITextureButton(texture=button_texture, texture_hovered=button_hovered_texture, text=category, style=button_style, width=self.window.width / 13, height=50)
if not category == "Credits":
category_button.on_click = lambda e, category=category: self.display_category(category)
@@ -82,7 +82,7 @@ class Settings(arcade.gui.UIView):
self.value_layout.clear()
for setting in settings[category]:
label = arcade.gui.UILabel(text=setting, font_name="Protest Strike", font_size=28, text_color=arcade.color.WHITE )
label = arcade.gui.UILabel(text=setting, font_name="Roboto", font_size=28, text_color=arcade.color.WHITE )
self.key_layout.add(label)
setting_dict = settings[category][setting]
@@ -261,7 +261,7 @@ class Settings(arcade.gui.UIView):
else:
font_size = 12
self.credits_label = arcade.gui.UILabel(text=text, text_color=arcade.color.WHITE, font_name="Protest Strike", font_size=font_size, align="center", multiline=True)
self.credits_label = arcade.gui.UILabel(text=text, text_color=arcade.color.WHITE, font_name="Roboto", font_size=font_size, align="center", multiline=True)
self.key_layout.add(self.credits_label)