Comments (6)
Hola, no tendrías alguna forma de poder probar el codigo? me gustaria tener algo en donde poder ejecutar tu función. (no me interesa el resto, pero por ejemplo me faltan muchas variables para poder correr tu problema).
Una cosa que me pareció curiosa fue el nombre de la variable tamaño_del_menu, según yo (no tengo acceso ahora a mi computador) no se pueden usar ñ o variables con tilde en una variable.
Si tienes problemas con pegar las cosas aqui me puedes enviar un correo con los archivos.
Saludos 😄
from pygame-menu.
Pensando, no creo que se "caiga" por decirlo de cierta manera, quizás al tener muchas opciones el menú entra en alguna clase de bucle místico infinito y se congela, aunque no me imaginaría por qué, lo otro es que se haya formado alguna clase de bucle dentro de las configuraciones, por ejemplo sería ilegal tener una opción que apunte al mismo menú, ya que entraría en alguna cosa recursiva.
Seria interesante poner algún check así
from pygame-menu.
@ppizarror Te he dejado un mensaje por Facebook! Por ese canal te he pasado el archivo completo con todas las imágenes
from pygame-menu.
Lo revisaré, gracias 😃
from pygame-menu.
Revisando el codigo me parece algo raro:
Cuando haces game.ChasquiRunner este deberia de cierta manera "pausar" el menu antes de empezar el mainloop del juego.
Esto es parecido a https://github.com/ppizarror/pygame-menu/blob/master/example2.py, en este se ve que la función play_function (que en este caso seria como tu ChasquiRunner) ver línea 75 primero cierra el menú principal (básicamente lo deshabilita, línea 102) y luego comienza el mainloop del juego.
Notar que cuando el menú se deshabilita luego para volverlo a usar tienes que habilitarlo (menu.enable()).
Dime si este pequeño cambio hace algo.
PD: Esto en verdad se programó así dado la dificultad de tener multithreading con pygame, por eso la unica solución que se me ocurrió para poder tener dos mainloops fue esa.
Revisa https://github.com/ppizarror/pygame-menu/blob/master/example2.py e intenta estructurar un poco el código de esa manera.
Saludos
from pygame-menu.
Cerrado por inactividad
from pygame-menu.
Related Issues (20)
- Center menu items when scrollbar is shown HOT 5
- Python version limit HOT 2
- typehints (label) - mypy HOT 2
- [BUG] Menu closes for no reason HOT 5
- Resize all submenus HOT 3
- Unable to hide the cursor, due to pygame_menu HOT 3
- Controller has no influence on menu actions HOT 1
- Example of menu using USB controller, with name of controller used HOT 6
- pygame-ce requirement HOT 6
- file selector HOT 5
- How do I limit the size of a label in px? HOT 4
- Mouse-selection bug HOT 4
- Unpacking then repacking any widget misplaces it in the parent frame HOT 1
- Add method to dropselect API that tells if its dropdown is expanded
- Have a _sdl2 mode where make_surface is never called whith alpha=True
- Navigating back from a nested submenu forgets the widget selection in the parent menu HOT 2
- User warning for equal title font color and menu background color when the latter is set to (0, 0, 0) HOT 2
- How check value for text_input? HOT 1
- AttributeError when changing rangeslider value with an USB gamepad
- bug in windows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pygame-menu.