-
Notifications
You must be signed in to change notification settings - Fork 144
Design
OSBC is designed using the Model-View-Controller (MVC) pattern. This pattern is used to separate the application's logic from its presentation. Models, in this application, refer to bots (their properties, functions, etc.). Views refer to the user interface (the buttons, text, etc.). Communication between these two layers is handled by a single controller instance.
The UI is divided into two main sections: the left-side panel, and right-side frame. The words "panel" and "frame" may be used interchangeably.
The left side is used for navigation throughout the application, and the right side is for displaying information and controlling bots.

OSBC takes a "nearly-single file" approach to UI. This means that the components that make up the UI are divided into multiple files, but all of the files are imported into a single file, OSRS Bot COLOR.py. This is done to make it easier to navigate the codebase.
The UI is divided into the following files:
-
OSRS Bot COLOR.py- The main file that imports all of the other UI files. The left-side navigation panel is also defined here. - Home Views - Views that serve as an introduction to the selected game and allow the user to perform initial client configuration.
-
bot_view.py- The view that displays the bot's information and controls. It consists of two components:info_frame.pyoutput_log_frame.py


One special UI component is the Options Builder. This is a utility that builds a dynamic window for collecting user input on how a bot should operate. It is defined in options_builder.py. It allows for a dynamic UI to be built at runtime.

Many of these UI files should remain untouched by developers adding their own bots. It helps to understand how they function, but in practice, developers will only need to perform minor edits in the OSRS Bot COLOR.py file and Home Views should they be adding support for a new private server.