Skip to content
New issue

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

Changes to allow rgsimulator to be extend via inheritance #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

treacheroust
Copy link

See rgsimulatorExtendedExample.py for how to do this. This provides a way to add behavior to rgsimulator without mucking with the base rgsimulator code. For example, this can be used to add new key binding with custom behavior.

The main changes are:

  1. move self.UI.run() out of the constructor, so the class can be extended before the UI is started.
  2. the Simulator constructor is now passed the uiClass, so a custom UI can be instantiated, instead of explicitly instantiating the base SimulatorUI class.

Apologies if I've screwed something up, I'm relatively new to python and GitHub, and this is my first attempt at contributing to a project.

rgsimulatorExtendedExample.py for how to do this.
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.

None yet

1 participant