UI文件的定义

ui 部分做了非常大的修改,几乎是重写了,灵活性与渲染性能都比上一个版本要好很多。

# 设计尺寸
ScreenSize = 1920,1080
Fonts {
	# 字体定义,支持 ttf 和位图
	en {
		FontFamily = font.ttf
		TextureSize = 1024
		FontSize = 200
	}
	bitmap {
		ClipsFile = font.ck
	}
}
Images {
	clip {
		AtlasImage = ui.atlas
	}
	cover {
		AtlasImage = cover.atlas
	}
}
FrameSequences {
}
Transitions {
}
Windows {
	winFirst {
		WindowID = 0
		FullScreen = False
		Modal = False
		ZIndex = 0
		ScalingBasis = Width|Height
		Enabled = False
		Sound = snd
		ctrl_1 {
			Type = Picture|Button|Label|NumberLabel
			EventID = 0
			GroupID = 0
			Visible = True
			VerticalAlign = Top|Center|Bottom
			HorizontalAlign = Left|Center|Right
			Color = ffffff
			# 尺寸与位置可以写成百分比
			Size = 200,100%
			Position = 200,100%
			Rotation = 0~360
			Scale = 1
			Enabled = False

			FrameSequence = fs
			Frame = clip/c_0
			# 锚点是尺寸的比例值
			Anchor = 0.5,0.5

			TweenType = Ease|EasingOut|Linear|EasingBack|EasingBackOut|EasingWave|EasingRide|EasingBounce
			TweenDuration = 1
			TweenRange = begin,end
			TweenBegin = 0
			TweenEnd = 1
			TweenWaveFrequency = 3

			TweenStartTime = 0
			TweenOutTime = startTime
			TweenOver = Hide|HideOut|IgnoreDisappear
			TweenAnimation = Horizontal|Vertical|Fade|Scale|Other
		}
		button {
			FrameDown = frame
			FrameDisabled = frame
			ColorDown = a0a0a0
			ColorDisabled = c0c0c0
			SoundClick = snd
		}
		label {
			Type = Label
			Font = en
			TextAlign = Left|Center|Right
			FontSize = 20
			LineSpacing = 5
			Text = something
		}
		number {
			Type = NumberLabel
			Duration = 1
			Delay = 0
			Format = Ex: %.2f
			SoundDecrease = snd
			SoundIncrease = snd
			ColorFlash = color
		}
	}
}
MetalCore
2018-5-8
  • {{comment.name}}{{comment.time | fDateTime}}

    • {{reply.name}}{{reply.time | fDateTime}}

Recent Articles

Recent Comments