Пример #1
0
func UpdateImgPositions(sz size.Event, u *uistate.UIState) {
	// must copy u.WindowSize instead of creating a pointer to it
	oldWindowSize := coords.MakeVec(u.WindowSize.X, u.WindowSize.Y)
	updateWindowSize(sz, u)
	if windowExists(oldWindowSize) && windowExists(u.WindowSize) {
		u.Padding = scaleVar(u.Padding, oldWindowSize, u.WindowSize)
		AdjustImgs(oldWindowSize, u)
	}
}