-
Notifications
You must be signed in to change notification settings - Fork 14
GUI
Adam Furman edited this page Jul 9, 2016
·
1 revision
The GUI
class sets up Pygame and the screen, and also acts as a container for all UI-related subclasses. It is automatically initialized by the system at start. It is accessible through state
.
GUI ()
Accessible via state.getGUI()
.
Static Methods
-
getCenteredCoordinates ( component, larger )
Returns a set of coordinates that would place the Componentcomponent
at the center oflarger
.
Object Variables
-
int orientation
Not used yet. -
pygame.clock.Clock timer
The clock object that regulates loop speed. -
int update_interval
The current FPS. -
int width
The screen width. -
int height
The screen height. The height available to your app is this - the FunctionBar height.
Methods
-
orient ( int orientation )
Not working. Do not use. -
repaint ()
Fills the screen with the background color. -
refresh ()
Callspygame.display.flip()
. -
getScreen ()
Returns the globalscreen
object. -
monitorFPS ()
The system FPS monitoring function. Adjusts FPS for best performance. -
displayStandbyText ( text="Stand by...", size=20, color=(20,20,20), bgcolor=(100,100,200) )
Displays the given text in a rectangle on the screen. Intended as a warning that an app is doing long work on the main thread.
Wiki and documentation by Adam Furman. Find an error or have a suggestion? Send it to furmada (at) gmail dot com.
Documentation
-
Application
class -
ApplicationList
class -
Notification
class-
PermanentNotification
class
-
-
NotificationQueue
class -
DataStore
class -
ImmersionUI
class
-
State
class
-
GUI
class
The following classes are all under the GUI class, e.g. Font
is actually accessed as GUI.Font
.
-
Font
class -
Icons
class -
ColorPalette
class -
LongClickEvent
class -
IntermediateUpdateEvent
class -
EventQueue
class -
FunctionBar
class -
Keyboard
class -
Overlay
class -
Dialog
class-
OKDialog
dialog -
ErrorDialog
dialog -
WarningDialog
dialog -
YNDialog
dialog -
OKCancelDialog
dialog -
AskDialog
dialog -
CustomContentDialog
dialog
-
-
NotificationMenu
overlay-
RecentAppSwitcher
overlay -
Selector
overlay
-
-
Component
class
The following classes are all Components
, they inherit from that class.
-
Container
component -
AppContainer
container -
Button
container -
KeyboardButton
container -
TextEntryField
container -
PagedContainer
container-
GriddedPagedContainer
container -
ListedPagedContainer
container
-
-
ButtonRow
container -
ScrollableContainer
container-
ListScrollableContainer
container -
TextScrollableContainer
container -
MultiLineTextEntryField
container
-
-
Text
component -
MultiLineText
component -
ExpandingMultiLineText
component -
Image
component -
Slider
component -
Checkbox
component -
Switch
component -
Canvas
component -
ScrollIndicator
component