Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/gamesetup/Panels/GameDescription.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
class GameDescription | |||||
{ | |||||
constructor(gameSettingTabs, gameSettingsControl) | |||||
{ | |||||
this.gameDescriptionFrame = Engine.GetGUIObjectByName("gameDescriptionFrame"); | |||||
this.gameDescription = Engine.GetGUIObjectByName("gameDescription"); | |||||
gameSettingsControl.registerGameAttributesChangeHandler(this.onGameAttributesChange.bind(this)); | |||||
gameSettingTabs.registerTabsResizeHandler(this.onTabsResize.bind(this)); | |||||
} | |||||
onTabsResize(settingsTabButtonsFrame) | |||||
{ | |||||
let size = this.gameDescriptionFrame.size; | |||||
size.top = settingsTabButtonsFrame.size.bottom + this.Margin; | |||||
this.gameDescriptionFrame.size = size; | |||||
} | |||||
onGameAttributesChange() | |||||
{ | |||||
this.gameDescription.caption = getGameDescription(); | |||||
} | |||||
} | |||||
GameDescription.prototype.Margin = 3; |
Wildfire Games · Phabricator