Skip to content

Commit e5d27e4

Browse files
committed
first commit
0 parents  commit e5d27e4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+13485
-0
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Lua.workspace.library": [
3+
"c:/Users/lmmgh/.vscode/extensions/sumneko.lua-3.15.0-win32-x64/server/meta/055db936"
4+
]
5+
}

1.lua

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--require('2')
2+
3+
local data = require("2")
4+
5+
gui:add_view(gui:load_layout(data))
6+
--print(gui)
7+
function love.draw()
8+
--love.graphics.rectangle("fill", 0, 0, 20, 20, 5)
9+
gui:draw()
10+
end
11+
12+
function love.update(dt)
13+
gui:update(dt)
14+
end
15+
16+
function love.mousemoved(x, y, dx, dy, istouch) --鼠标滑动
17+
gui:mousemoved(nil, x, y, dx, dy, istouch, nil)
18+
end
19+
20+
function love.mousepressed(x, y, id, istouch, pressure) --pre短时间按下次数 模拟双击
21+
gui:mousepressed(id, x, y, nil, nil, istouch, pressure)
22+
end
23+
24+
function love.mousereleased(x, y, id, istouch, pressure) --pre短时间按下次数 模拟双击
25+
gui:mousereleased(id, x, y, nil, nil, istouch, pressure)
26+
end
27+
28+
function love.wheelmoved(x, y)
29+
gui:wheelmoved(nil, x, y)
30+
end
31+
32+
--print(321)

2.lua

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
return {
2+
[1] = {
3+
["text"] = "button",
4+
["height"] = 30,
5+
["id"] = "",
6+
["borderColor"] = "#000000FF",
7+
["hoverColor"] = "#CCCCFFFF",
8+
["pressedColor"] = "#99FFFFFF",
9+
["width"] = 100,
10+
["textColor"] = "#000000FF",
11+
["x"] = 363,
12+
["y"] = 118,
13+
["type"] = "button",
14+
["backgroundColor"] = "#9999FFFF",
15+
},
16+
[2] = {
17+
["text"] = "button",
18+
["height"] = 30,
19+
["id"] = "",
20+
["borderColor"] = "#000000FF",
21+
["hoverColor"] = "#CCCCFFFF",
22+
["pressedColor"] = "#99FFFFFF",
23+
["width"] = 100,
24+
["textColor"] = "#000000FF",
25+
["x"] = 37,
26+
["y"] = 46,
27+
["type"] = "button",
28+
["backgroundColor"] = "#9999FFFF",
29+
},
30+
[3] = {
31+
["text"] = "button",
32+
["height"] = 30,
33+
["id"] = "",
34+
["borderColor"] = "#000000FF",
35+
["hoverColor"] = "#CCCCFFFF",
36+
["pressedColor"] = "#99FFFFFF",
37+
["width"] = 100,
38+
["textColor"] = "#000000FF",
39+
["x"] = 30,
40+
["y"] = 301,
41+
["type"] = "button",
42+
["backgroundColor"] = "#9999FFFF",
43+
},
44+
[4] = {
45+
["text"] = "button",
46+
["height"] = 30,
47+
["id"] = "",
48+
["borderColor"] = "#000000FF",
49+
["hoverColor"] = "#CCCCFFFF",
50+
["pressedColor"] = "#99FFFFFF",
51+
["width"] = 100,
52+
["textColor"] = "#000000FF",
53+
["x"] = 339,
54+
["y"] = 361,
55+
["type"] = "button",
56+
["backgroundColor"] = "#9999FFFF",
57+
},
58+
[5] = {
59+
["text"] = "button",
60+
["height"] = 30,
61+
["id"] = "",
62+
["borderColor"] = "#000000FF",
63+
["hoverColor"] = "#CCCCFFFF",
64+
["pressedColor"] = "#99FFFFFF",
65+
["width"] = 100,
66+
["textColor"] = "#000000FF",
67+
["x"] = 90,
68+
["y"] = 116,
69+
["type"] = "button",
70+
["backgroundColor"] = "#9999FFFF",
71+
},
72+
[6] = {
73+
["text"] = "button",
74+
["height"] = 30,
75+
["id"] = "",
76+
["borderColor"] = "#000000FF",
77+
["hoverColor"] = "#CCCCFFFF",
78+
["pressedColor"] = "#99FFFFFF",
79+
["width"] = 100,
80+
["textColor"] = "#000000FF",
81+
["x"] = 63,
82+
["y"] = 88,
83+
["type"] = "button",
84+
["backgroundColor"] = "#9999FFFF",
85+
},
86+
[7] = {
87+
["text"] = "button",
88+
["height"] = 30,
89+
["id"] = "",
90+
["borderColor"] = "#000000FF",
91+
["hoverColor"] = "#CCCCFFFF",
92+
["pressedColor"] = "#99FFFFFF",
93+
["width"] = 100,
94+
["textColor"] = "#000000FF",
95+
["x"] = 385,
96+
["y"] = 219,
97+
["type"] = "button",
98+
["backgroundColor"] = "#9999FFFF",
99+
},
100+
[8] = {
101+
["text"] = "button",
102+
["height"] = 30,
103+
["id"] = "",
104+
["borderColor"] = "#000000FF",
105+
["hoverColor"] = "#CCCCFFFF",
106+
["pressedColor"] = "#99FFFFFF",
107+
["width"] = 100,
108+
["textColor"] = "#000000FF",
109+
["x"] = 200,
110+
["y"] = 374,
111+
["type"] = "button",
112+
["backgroundColor"] = "#9999FFFF",
113+
},
114+
[9] = {
115+
["text"] = "button",
116+
["height"] = 30,
117+
["id"] = "",
118+
["borderColor"] = "#000000FF",
119+
["hoverColor"] = "#CCCCFFFF",
120+
["pressedColor"] = "#99FFFFFF",
121+
["width"] = 100,
122+
["textColor"] = "#000000FF",
123+
["x"] = 87,
124+
["y"] = 190,
125+
["type"] = "button",
126+
["backgroundColor"] = "#9999FFFF",
127+
},
128+
[10] = {
129+
["text"] = "button",
130+
["height"] = 30,
131+
["id"] = "",
132+
["borderColor"] = "#000000FF",
133+
["hoverColor"] = "#CCCCFFFF",
134+
["pressedColor"] = "#99FFFFFF",
135+
["width"] = 100,
136+
["textColor"] = "#000000FF",
137+
["x"] = 288,
138+
["y"] = 93,
139+
["type"] = "button",
140+
["backgroundColor"] = "#9999FFFF",
141+
},
142+
[11] = {
143+
["id"] = "",
144+
["title"] = "window",
145+
["dragOffsetX"] = 0,
146+
["dragOffsetY"] = 0,
147+
["textColor"] = "#FFFFFFFF",
148+
["min_height"] = 50,
149+
["originalX"] = 100,
150+
["originalY"] = 100,
151+
["originalWidth"] = 300,
152+
["originalHeight"] = 200,
153+
["borderWidth"] = 10,
154+
["content"] = "window",
155+
["type"] = "window",
156+
["width"] = 112,
157+
["titleBarColor"] = "#3366CCFF",
158+
["x"] = 0,
159+
["backgroundColor"] = "#E5E5E5E5",
160+
["borderColor"] = "#191919FF",
161+
["titleBarHeight"] = 25,
162+
["y"] = 0,
163+
["height"] = 50,
164+
["min_width"] = 112,
165+
},
166+
}

API.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
local view = require("view.view")
2+
local button = require("view.button")
3+
local switch_button = require("view.switch_button")
4+
local slider = require("view.slider")
5+
local list = require("view.list")
6+
--local list_free = require "list_free"
7+
local text = require("view.text")
8+
local edit_text = require("view.edit_text")
9+
local image = require("view.image")
10+
local select_button = require("view.select_button")
11+
local select_menu = require("view.select_menu")
12+
--
13+
local line_layout = require("layout.line_layout")
14+
local gravity_layout = require("layout.gravity_layout")
15+
local grid_layout = require("layout.grid_layout")
16+
local frame_layout = require("layout.frame_layout")
17+
--
18+
local title_menu = require("container.title_menu")
19+
local tab_control = require("container.tab_control")
20+
local border_container = require("container.border_container")
21+
local fold_container = require("container.fold_container")
22+
local slider_container = require("container.slider_container")
23+
local window = require("container.window")
24+
local tree_manager = require("container.tree_manager")
25+
--ew
26+
local scene_2D_guiEditor = require("function_widget.scene_2D_guiEditor")
27+
local scene_2D = require("function_widget.scene_2D")
28+
local sandbox = require("function_widget.sandbox")
29+
--
30+
local api = {
31+
view = view,
32+
button = button,
33+
switch_button = switch_button,
34+
text = text,
35+
edit_text = edit_text,
36+
select_button = select_button,
37+
select_menu = select_menu,
38+
list = list,
39+
slider = slider,
40+
image = image,
41+
--list_free = list_free
42+
--
43+
line_layout = line_layout,
44+
gravity_layout = gravity_layout,
45+
grid_layout = grid_layout,
46+
frame_layout = frame_layout,
47+
--
48+
border_container = border_container,
49+
tab_control = tab_control,
50+
window = window,
51+
title_menu = title_menu,
52+
fold_container = fold_container,
53+
slider_container = slider_container,
54+
tree_manager = tree_manager,
55+
--
56+
scene_2D = scene_2D,
57+
scene_2D_guiEditor = scene_2D_guiEditor,
58+
sandbox = sandbox,
59+
}
60+
61+
return api;

YeZiGongChangTangYingHei-2.ttf

3.63 MB
Binary file not shown.

conf.lua

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
function love.conf(t)
2+
t.Identity = '/'
3+
--保存目录的名称(字符串)的名称
4+
t.appendidentity = true
5+
--在保存目录(boolean)之前,在源目录中搜索文件
6+
t.version = '11.4' -- l?ve版本此游戏是为(字符串)制作的
7+
t.console = false
8+
--附加控制台(布尔值,仅限窗口)
9+
t.accelerometerjoystick = true
10+
--启用iOS加速度计和Android的加速度计,将其暴露为操纵杆(布尔)
11+
t.externalStorage = true
12+
-- tum tum ture保存文件(并从保存目录中读取)在Android(boolean)上的外部存储中
13+
t.gammacorrect = false
14+
--启用伽马校正渲染,在系统支持时(布尔值)
15+
t.audio.mic = false
16+
--请求并在Android(Boolean)中使用麦克风功能
17+
t.audio.mixwithsystem = true
18+
--打开爱情时保持背景音乐播放(仅布尔,iOS和Android)
19+
t.window.title = 'lmGui 3.1'
20+
-- 窗口标题(字符串)
21+
t.window.icon = nil -- 用作窗口图标的图像的文件路径(字符串)
22+
23+
t.window.width = 400 -- 窗口宽度(数字)
24+
t.window.height = 400 -- 窗口高度(数字)
25+
t.window.borderless = false -- 从窗口中删除所有边框视觉效果(布尔值)
26+
t.window.resizable = true -- 让窗口可由用户调整大小(布尔值)
27+
t.window.minwidth = 100
28+
-- 窗口可调整大小时的最小窗口宽度(数字)
29+
t.window.minheight = 100
30+
-- 窗口可调整大小时的最小窗口高度(数字)
31+
t.window.fullscreen = false -- 启用全屏(布尔值)
32+
t.window.fullscreentype = 'desktop' -- 在“桌面”全屏或“独占”全屏模式之间选择(字符串)
33+
t.window.vsync = 1 -- 垂直同步模式(数字)
34+
t.window.msaa = 4 -- 用于多重采样抗锯齿的采样数(number)
35+
t.window.depth = nil -- 深度缓冲区中每个样本的位数
36+
t.window.stencil = nil -- 模板缓冲区中每个样本的位数
37+
t.window.display = 1 -- 显示窗口的监视器索引(数字)
38+
t.window.highdpi = false -- 在 Retina 显示屏上为窗口启用高 dpi 模式(布尔值)
39+
t.window.usedpiscale = true -- 当 highdpi 也设置为 true 时启用自动 DPI 缩放(布尔值)
40+
t.window.x = nil -- 窗口在指定显示中的位置的 x 坐标(数字)
41+
t.window.y = nil -- 指定显示中窗口位置的y坐标(数字)
42+
43+
44+
t.modules.audio = true
45+
--启用音频模块(布尔值)
46+
t.modules.data = true
47+
--启用数据模块(boolean)
48+
t.modules.event = true
49+
--启用事件模块(布尔值)
50+
t.modules.font = true
51+
--启用字体模块(boolean)
52+
t.modules.graphics = true
53+
--启用图形模块(boolean)
54+
t.modules.image = true
55+
--启用图像模块(布尔值)
56+
t.modules.joystick = true
57+
--启用操纵杆模块(布尔值)
58+
t.modules.keyboard = true
59+
--启用键盘模块(布尔值)
60+
t.modules.math = true
61+
--启用数学模块(布尔值)
62+
t.modules.mouse = true
63+
--启用鼠标模块(布尔值)
64+
t.modules.physics = true
65+
--启用物理模块(布尔值)
66+
t.modules.sound = true
67+
--启用声音模块(布尔值)
68+
t.modules.system = true
69+
--启用系统模块(布尔值)
70+
t.modules.thread = true
71+
--启用线程模块(boolean)
72+
t.modules.timer = true
73+
--启用计时器模块(布尔值),禁用它将导致0 delta time in Love.update
74+
t.modules.touch = true
75+
--启用触摸模块(布尔值)
76+
t.modules.video = true
77+
--启用视频模块(布尔值)
78+
t.modules.window = true
79+
--启用窗口模块(布尔值)
80+
--
81+
end

0 commit comments

Comments
 (0)