Ctrl+F11设计的测试界面,在单机里面看不到文字效果。

[复制链接]
作者: trisen | 时间: 2023-7-16 14:36:14 | 技术答疑|
1 278

33

帖子

1941

金币

1074

积分

积分
1074
发表于 2023-7-16 14:36:14| 显示全部楼层 |阅读模式

马上注册,下载996引擎,与更多游戏开发者交流。

您需要 登录 才可以下载或查看,没有帐号?注册

x
附上代码:
  1. local _parent = GUI:Win_Create("test_openui", 0, 0, 0, 0, false, false, true, false)
  2.     if _parent then
  3.         local winSize = SL:GetScreenSize()
  4.         local x = winSize.width / 2
  5.         local y = winSize.height / 2
  6.         local w = winSize.width
  7.         local h = winSize.height


  8.         local bg_close = GUI:Image_Create(_parent, "bg_close", 0, 0, "res/01/010010.png")
  9.         if bg_close then
  10.             GUI:setContentSize(bg_close, {width = w, height = h})
  11.             GUI:setTouchEnabled(bg_close, true)
  12.             GUI:addOnClickEvent(bg_close, function()
  13.                 GUI:Win_Close(_parent)
  14.             end)
  15.         end
  16.         local ImageView = GUI:Image_Create(_parent, "ImageView", 13.00, 319.00, "res/public/bg_npc_10.jpg")
  17.         GUI:setTouchEnabled(ImageView, false)
  18.         GUI:setTag(ImageView, -1)

  19.         -- Create Text
  20.         local Text = GUI:Text_Create(ImageView, "Text", 100.00, 210.00, 16, "#ffffff", [[测试一下啊]])
  21.         GUI:setTouchEnabled(Text, false)
  22.         GUI:setTag(Text, -1)
  23.         GUI:Text_enableOutline(Text, "#000000", 1)

  24.         -- Create Button
  25.         local Button = GUI:Button_Create(ImageView, "Button", 88.00, 34.00, "res/public/1900000612.png")
  26.         GUI:Button_loadTexturePressed(Button, "res/public/1900000611.png")
  27.         GUI:Button_loadTextureDisabled(Button, "res/private/gui_edit/Button_Disable.png")
  28.         GUI:Button_setTitleText(Button, "启动")
  29.         GUI:Button_setTitleColor(Button, "#ffffff")
  30.         GUI:Button_setTitleFontSize(Button, 14)
  31.         GUI:Button_titleEnableOutline(Button, "#000000", 1)
  32.         GUI:setTouchEnabled(Button, true)
  33.         GUI:setTag(Button, -1)
  34.     end
复制代码




这是设计的

这是设计的

实际使用效果

实际使用效果
回复

使用道具 举报

33

帖子

1941

金币

1074

积分

积分
1074
 楼主| 发表于 2023-7-17 09:35:49| 显示全部楼层
已经解决:  前端文件编码格式必须是UTF-8
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

24小时热门更多>
快速回复 返回列表 返回顶部