Package horizons :: Package gui :: Package widgets :: Module productionoverview :: Class ProductionOverview
[hide private]
[frames] | no frames]

Class ProductionOverview

source code

statswidget.StatsWidget --+    
                          |    
       MultiPageStatsWidget --+
                              |
             windows.Window --+
                              |
                             ProductionOverview

Widget that shows every produced resource in this game.

Implementation based on https://github.com/unknown-horizons/unknown-horizons/issues/749 .

Instance Methods [hide private]
 
__init__(self, windows, settlement) source code
 
_init_gui(self) source code
 
displayed_resources(self)
Returns all resources of the settlement that should be shown.
source code
 
max_pages(self)
Returns number of pages the resources need.
source code
 
go_to_next_page(self)
Scrolls forward two pages.
source code
 
go_to_previous_page(self)
Scrolls backward two pages.
source code
 
refresh(self) source code
 
_add_line_to_gui(self, container, resource_id, amount) source code
    Inherited from MultiPageStatsWidget
 
_clear_entries(self) source code
    Inherited from statswidget.StatsWidget
 
_refresh_tick(self) source code
 
hide(self) source code
 
is_visible(self) source code
 
show(self) source code
 
toggle_visibility(self) source code
    Inherited from windows.Window
 
_hide_modal_background(self) source code
 
_show_modal_background(self)
Loads transparent background that de facto prohibits access to other gui elements by eating all input events.
source code
 
close(self)
Closes the window.
source code
 
on_escape(self)
Define what happens when ESC is pressed.
source code
 
on_return(self)
Define what happens when RETURN is pressed.
source code
 
open(self, **kwargs)
Open the window.
source code
Class Variables [hide private]
  LINES_PER_PAGE = 12
  widget_file_name = 'island_production.xml'
hash(x)
Method Details [hide private]

__init__(self, windows, settlement)
(Constructor)

source code 
Overrides: windows.Window.__init__

_init_gui(self)

source code 
Overrides: statswidget.StatsWidget._init_gui

displayed_resources(self)

source code 

Returns all resources of the settlement that should be shown.

Decorators:
  • @property

max_pages(self)

source code 

Returns number of pages the resources need.

Decorators:
  • @property

go_to_next_page(self)

source code 

Scrolls forward two pages. `self.current_page` will always be the index of the left page of the book.

go_to_previous_page(self)

source code 

Scrolls backward two pages. `self.current_page` will always be the index of the left page of the book.

refresh(self)

source code 
Overrides: statswidget.StatsWidget.refresh