Differential D2483 Diff 10980 ps/trunk/binaries/data/mods/public/gui/gamesetup/Panels/GameDescription.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/gamesetup/Panels/GameDescription.js
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
class GameDescription | |||||
{ | |||||
constructor(mapCache, gameSettingTabs, gameSettingsControl) | |||||
{ | |||||
this.mapCache = mapCache; | |||||
this.gameDescriptionFrame = Engine.GetGUIObjectByName("gameDescriptionFrame"); | |||||
this.gameDescription = Engine.GetGUIObjectByName("gameDescription"); | |||||
gameSettingsControl.registerGameAttributesBatchChangeHandler(this.onGameAttributesBatchChange.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; | |||||
} | |||||
onGameAttributesBatchChange() | |||||
{ | |||||
this.gameDescription.caption = getGameDescription(this.mapCache); | |||||
} | |||||
} | |||||
GameDescription.prototype.Margin = 3; |
Wildfire Games · Phabricator