Package horizons :: Package gui :: Package tabs :: Module diplomacytab :: Class DiplomacyTab
[hide private]
[frames] | no frames]

Class DiplomacyTab

source code

tabwidget.TabWidget --+

Instance Methods [hide private]
__init__(self, ingame_gui, world) source code
    Inherited from tabwidget.TabWidget
_apply_layout_hack(self) source code
Draws the widget, but does not show it automatically
source code
Add enough tabbuttons for all widgets.
source code
hide(self, caller=None)
Hides current tab and this widget
source code
Show the current widget
source code
show_tab(self, number)
Used as callback function for the TabButtons.
source code
Class Methods [hide private]
is_useable(cls, world)
Diplomacy only makes sense if there is another player.
source code
Class Variables [hide private]
  name = "diplomacy_widget"
    Inherited from tabwidget.TabWidget
  log = logging.getLogger("gui.tabs.tabwidget")
Method Details [hide private]

__init__(self, ingame_gui, world)

source code 
  • ingame_gui - IngameGui instance
  • tabs - tab instances to show
  • name - optional name for the tabwidget
  • active_tab - int id of tab, 0 <= active_tab < len(tabs)
Overrides: tabwidget.TabWidget.__init__
(inherited documentation)

is_useable(cls, world)
Class Method

source code 

Diplomacy only makes sense if there is another player. Pirates do not qualify as players: right now they're not interested in diplomacy.