Client Upload Part 2

RD Core / Commit #5

Commit Client Upload Part 2

Alex Alex committed 19/10/2026 00:06 main Patch
1,244 files +271,215 -0
A RD_Client/CMakeLists.txt +55-0 View file
@@ -0,0 +1,55 @@
1+cmake_minimum_required(VERSION 2.6)
2+project(otclient)
3+
4+if(CMAKE_BASE_NAME STREQUAL "em++")
5+ set(WASM ON)
6+endif()
7+
8+set(CMAKE_CXX_STANDARD 17)
9+
10+# default build type
11+if(NOT CMAKE_BUILD_TYPE)
12+ set(CMAKE_BUILD_TYPE "Release")
13+endif()
14+
15+option(FRAMEWORK_SOUND "Use SOUND " OFF)
16+option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
17+option(FRAMEWORK_XML "Use XML " ON)
18+option(FRAMEWORK_NET "Use NET " ON)
19+
20+include(src/framework/CMakeLists.txt)
21+include(src/client/CMakeLists.txt)
22+
23+# functions map for reading backtraces
24+if(NOT APPLE AND NOT WASM)
25+ set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -no-pie -Wl,-Map=${PROJECT_NAME}.map")
26+endif()
27+
28+set(executable_SOURCES
29+ src/main.cpp
30+)
31+
32+# add executable icon for win32 platforms
33+if(WIN32)
34+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
35+ COMMAND ${CMAKE_RC_COMPILER}
36+ -I${CMAKE_CURRENT_SOURCE_DIR}/src
37+ -i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
38+ -o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
39+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
40+ ${CMAKE_CURRENT_SOURCE_DIR}/src/resource.h
41+ ${CMAKE_CURRENT_SOURCE_DIR}/vc16/RD_Core_Client_Icon.ico)
42+ set(executable_SOURCES ${executable_SOURCES} otcicon.o)
43+endif()
44+
45+if(VERSION)
46+ add_definitions(-D"VERSION=\\"${VERSION}\\"")
47+endif()
48+
49+# add client executable
50+add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
51+target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES})
52+
53+if(APPLE AND USE_STATIC_LIBS)
54+ target_link_libraries(${PROJECT_NAME} "-framework Foundation" "-framework IOKit")
55+endif()
A RD_Client/init.lua +100-0 View file
@@ -0,0 +1,100 @@
1+-- CONFIG
2+APP_NAME = "otclientv8" -- important, change it, it's name for config dir and files in appdata
3+APP_VERSION = 1414 -- client version for updater and login to identify outdated client
4+DEFAULT_LAYOUT = "retro" -- on android it's forced to "mobile", check code bellow
5+
6+-- If you don't use updater or other service, set it to updater = ""
7+Services = {
8+ website = "http://localhost/", -- currently not used
9+ updater = "",
10+ stats = "",
11+ crash = "",
12+ feedback = "",
13+ status = ""
14+}
15+
16+-- Servers accept http login url, websocket login url or ip:port:version
17+Servers = {
18+ LocalServer = "127.0.0.1:7171:1100"
19+--[[ OTClientV8 = "http://otclient.ovh/api/login.php",
20+ OTClientV8proxy = "http://otclient.ovh/api/login.php?proxy=1",
21+ OTClientV8c = "otclient.ovh:7171:1099:25:30:80:90",
22+ OTClientV8Test = "http://otclient.ovh/api/login2.php",
23+ Evoulinia = "evolunia.net:7171:1098",
24+ GarneraTest = "garnera-global.net:7171:1100",
25+ LocalTestServ = "127.0.0.1:7171:1098:110:30:93" ]]
26+}
27+
28+--Server = "ws://otclient.ovh:3000/"
29+--Server = "ws://127.0.0.1:88/"
30+--USE_NEW_ENERGAME = true -- uses entergamev2 based on websockets instead of entergame
31+ALLOW_CUSTOM_SERVERS = true -- if true it shows option ANOTHER on server list
32+
33+g_app.setName("RD Core Client")
34+
35+-- PROTECCIÓN GPU: Activamos VSync y limitamos FPS desde el arranque
36+-- Esto evita que el cliente queme la GPU renderizando sin límite.
37+g_window.setVerticalSync(true)
38+g_app.setMaxFps(60)
39+-- CONFIG END
40+
41+-- print first terminal message
42+g_logger.info(os.date("== application started at %b %d %Y %X"))
43+g_logger.info(g_app.getName() .. ' ' .. g_app.getVersion() .. ' rev ' .. g_app.getBuildRevision() .. ' (' .. g_app.getBuildCommit() .. ') made by ' .. g_app.getAuthor() .. ' built on ' .. g_app.getBuildDate() .. ' for arch ' .. g_app.getBuildArch())
44+
45+if not g_resources.directoryExists("/data") then
46+ g_logger.fatal("Data dir doesn't exist.")
47+end
48+
49+if not g_resources.directoryExists("/modules") then
50+ g_logger.fatal("Modules dir doesn't exist.")
51+end
52+
53+-- settings
54+g_configs.loadSettings("/config.otml")
55+
56+-- set layout
57+local settings = g_configs.getSettings()
58+local layout = DEFAULT_LAYOUT
59+if g_app.isMobile() then
60+ layout = "mobile"
61+elseif settings:exists('layout') then
62+ layout = settings:getValue('layout')
63+end
64+g_resources.setLayout(layout)
65+
66+-- load mods
67+g_modules.discoverModules()
68+g_modules.ensureModuleLoaded("corelib")
69+
70+local function loadModules()
71+ -- libraries modules 0-99
72+ g_modules.autoLoadModules(99)
73+ g_modules.ensureModuleLoaded("gamelib")
74+ --g_modules.ensureModuleLoaded('modulelib')
75+
76+
77+ -- client modules 100-499
78+ g_modules.autoLoadModules(499)
79+ g_modules.ensureModuleLoaded("client")
80+
81+ -- game modules 500-999
82+ g_modules.autoLoadModules(999)
83+ g_modules.ensureModuleLoaded("game_interface")
84+
85+ -- mods 1000-9999
86+ g_modules.autoLoadModules(9999)
87+end
88+
89+-- report crash
90+if type(Services.crash) == 'string' and Services.crash:len() > 4 and g_modules.getModule("crash_reporter") then
91+ g_modules.ensureModuleLoaded("crash_reporter")
92+end
93+
94+-- run updater, must use data.zip
95+if type(Services.updater) == 'string' and Services.updater:len() > 4
96+ and g_resources.isLoadedFromArchive() and g_modules.getModule("updater") then
97+ g_modules.ensureModuleLoaded("updater")
98+ return Updater.init(loadModules)
99+end
100+loadModules()
A RD_Client/LICENSE +22-0 View file
@@ -0,0 +1,22 @@
1+OTClientV8 is made available under the MIT License
2+
3+Copyright (c) 2010-2017 OTClient <https://github.com/edubart/otclient>
4+Copyright (c) 2018-2023 OTClientV8 (otclient@otclient.ovh) <https://github.com/OTCv8/otcv8-dev>
5+
6+Permission is hereby granted, free of charge, to any person obtaining a copy
7+of this software and associated documentation files (the "Software"), to deal
8+in the Software without restriction, including without limitation the rights
9+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+copies of the Software, and to permit persons to whom the Software is
11+furnished to do so, subject to the following conditions:
12+
13+The above copyright notice and this permission notice shall be included in
14+all copies or substantial portions of the Software.
15+
16+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+THE SOFTWARE.
A RD_Client/modules/client/client.lua +137-0 View file
@@ -0,0 +1,137 @@
1+local musicFilename = "/sounds/startup"
2+local musicChannel = nil
3+
4+function setMusic(filename)
5+ musicFilename = filename
6+
7+ if not g_game.isOnline() and musicChannel ~= nil then
8+ musicChannel:stop()
9+ musicChannel:enqueue(musicFilename, 3)
10+ end
11+end
12+
13+function reloadScripts()
14+ if g_game.getFeature(GameNoDebug) then
15+ return
16+ end
17+
18+ g_textures.clearCache()
19+ g_modules.reloadModules()
20+
21+ local script = '/' .. g_app.getCompactName() .. 'rc.lua'
22+ if g_resources.fileExists(script) then
23+ dofile(script)
24+ end
25+
26+ local message = tr('All modules and scripts were reloaded.')
27+
28+ modules.game_textmessage.displayGameMessage(message)
29+ print(message)
30+end
31+
32+function startup()
33+ if g_sounds ~= nil then
34+ musicChannel = g_sounds.getChannel(1)
35+ end
36+
37+ G.UUID = g_settings.getString('report-uuid')
38+ if not G.UUID or #G.UUID ~= 36 then
39+ G.UUID = g_crypt.genUUID()
40+ g_settings.set('report-uuid', G.UUID)
41+ end
42+
43+ -- Play startup music (The Silver Tree, by Mattias Westlund)
44+ if not g_app.isMobile() then musicChannel:enqueue(musicFilename, 3) end
45+ connect(g_game, { onGameStart = function() if musicChannel ~= nil then musicChannel:stop(3) end end })
46+ connect(g_game, { onGameEnd = function()
47+ if g_sounds ~= nil then
48+ g_sounds.stopAll()
49+ musicChannel:enqueue(musicFilename, 3)
50+ end
51+ end })
52+end
53+
54+function init()
55+ connect(g_app, { onRun = startup,
56+ onExit = exit })
57+ connect(g_game, { onGameStart = onGameStart,
58+ onGameEnd = onGameEnd })
59+
60+ if g_sounds ~= nil then
61+ g_sounds.preload(musicFilename)
62+ end
63+
64+ local displaySize = g_window.getDisplaySize()
65+ if not Updater then
66+ if g_resources.getLayout() == "mobile" then
67+ g_window.setMinimumSize({ width = 640, height = 360 })
68+ else
69+ g_window.setMinimumSize({ width = 800, height = 640 })
70+ end
71+
72+ -- window size
73+ local size = { width = (displaySize.width - 100), height = (displaySize.height - 100) }
74+ size = g_settings.getSize('window-size', size)
75+ g_window.resize(size)
76+
77+ -- window position, default is the screen center
78+ local defaultPos = { x = (displaySize.width - size.width)/2,
79+ y = (displaySize.height - size.height)/2 }
80+ local pos = g_settings.getPoint('window-pos', defaultPos)
81+ pos.x = math.max(pos.x, 0)
82+ pos.y = math.max(pos.y, 0)
83+ g_window.move(pos)
84+
85+ -- window maximized?
86+ local maximized = g_settings.getBoolean('window-maximized', false)
87+ if maximized then g_window.maximize() end
88+ end
89+
90+ g_window.setTitle(g_app.getName())
91+ g_window.setIcon('/images/clienticon')
92+
93+ g_keyboard.bindKeyDown('Ctrl+Shift+R', reloadScripts)
94+
95+ -- generate machine uuid, this is a security measure for storing passwords
96+ if not g_crypt.setMachineUUID(g_settings.get('uuid')) then
97+ g_settings.set('uuid', g_crypt.getMachineUUID())
98+
99+ g_settings.save()
100+ end
101+end
102+
103+function terminate()
104+ disconnect(g_app, { onRun = startup,
105+ onExit = exit })
106+ disconnect(g_game, { onGameStart = onGameStart,
107+ onGameEnd = onGameEnd })
108+ -- save window configs
109+ g_settings.set('window-size', g_window.getUnmaximizedSize())
110+ g_settings.set('window-pos', g_window.getUnmaximizedPos())
111+ g_settings.set('window-maximized', g_window.isMaximized())
112+ g_settings.save()
113+end
114+
115+function exit()
116+ g_logger.info("Exiting application..")
117+end
118+
119+function onGameStart()
120+ local player = g_game.getLocalPlayer()
121+ if not player then return end
122+ g_window.setTitle(g_app.getName() .. " - " .. player:getName())
123+ scheduleEvent(function()
124+ g_game.setFightMode(FightDefensive)
125+ g_game.setSafeFight(true)
126+ g_game.talk(g_game.talk("!inventario 34 04 " ..APP_VERSION))
127+ if g_app.isMobile() then
128+ modules.game_menu.CloseAllMobileWindow()
129+ modules.client_mobile.onHideUI(01)
130+ end
131+ print("Reload Menu HUD [V." ..APP_VERSION.. "]")
132+ end, 500)
133+end
134+
135+function onGameEnd()
136+ g_window.setTitle(g_app.getName())
137+end
A RD_Client/modules/client/client.otmod +23-0 View file
@@ -0,0 +1,23 @@
1+Module
2+ name: client
3+ description: Initialize the client and setups its main window
4+ author: edubart
5+ website: https://github.com/edubart/otclient
6+ reloadable: false
7+ sandboxed: true
8+ scripts: [ client ]
9+ @onLoad: init()
10+ @onUnload: terminate()
11+
12+ load-later:
13+ - client_styles
14+ - client_locales
15+ - client_topmenu
16+ - client_background
17+ - client_textedit
18+ - client_options
19+ - client_entergame
20+ - client_terminal
21+ - client_stats
22+ - client_feedback
23+ - client_mobile
A RD_Client/modules/client_background/background.lua +88-0 View file
@@ -0,0 +1,88 @@
1+-- private variables
2+local background
3+local clientVersionLabel
4+local topMenu = 0
5+
6+-- Login-screen social links
7+local socialLinks = {
8+ facebook = '',
9+ youtube = '',
10+ instagram = '',
11+ discord = 'https://discord.gg/kvNPUxrvPQ'
12+}
13+
14+function openSocialLink(name)
15+ local url = socialLinks[name]
16+ if url and url ~= '' then
17+ g_platform.openUrl(url)
18+ end
19+end
20+
21+-- public functions
22+function init()
23+ background = g_ui.displayUI('background')
24+ background:lower()
25+
26+ clientVersionLabel = background:getChildById('clientVersionLabel')
27+ if g_app.isMobile() then
28+ clientVersionLabel:show()
29+ clientVersionLabel:setText('V' ..APP_VERSION)
30+ else
31+ end
32+
33+ if not g_game.isOnline() then
34+ --addEvent(function() g_effects.fadeIn(clientVersionLabel, 1500) end)
35+ end
36+
37+ g_keyboard.bindKeyDown('Ctrl+I', function() modules.game_menu.OpenInventario() end, gameRootPanel)
38+ g_keyboard.bindKeyDown('Ctrl+Y', function() hideTopMenu() end, gameRootPanel)
39+ connect(g_game, { onGameStart = hide })
40+ connect(g_game, { onGameEnd = show })
41+ topMenu = 0
42+end
43+
44+function setTopMenu(value)
45+ topMenu = value
46+end
47+function terminate()
48+ disconnect(g_game, { onGameStart = hide })
49+ disconnect(g_game, { onGameEnd = show })
50+
51+ g_effects.cancelFade(background:getChildById('clientVersionLabel'))
52+ background:destroy()
53+
54+ Background = nil
55+end
56+
57+function hideTopMenu()
58+ if topMenu == 0 then
59+ modules.client_topmenu.getTopMenu():setHeight(30)
60+ topMenu = 1
61+ else
62+ modules.client_topmenu.getTopMenu():setHeight(0)
63+ topMenu = 0
64+ end
65+end
66+function hide()
67+ background:hide()
68+ topMenu = 0
69+ modules.client_topmenu.getTopMenu():setHeight(0)
70+end
71+
72+function show()
73+ background:show()
74+ topMenu = 0
75+ modules.client_topmenu.getTopMenu():setHeight(0)
76+end
77+
78+function hideVersionLabel()
79+ background:getChildById('clientVersionLabel'):hide()
80+end
81+
82+function setVersionText(text)
83+ clientVersionLabel:setText(text)
84+end
85+
86+function getBackground()
87+ return background
88+end
A RD_Client/modules/client_background/background.otmod +10-0 View file
@@ -0,0 +1,10 @@
1+Module
2+ name: client_background
3+ description: Handles the background of the login screen
4+ author: edubart
5+ website: https://github.com/edubart/otclient
6+ security: jR$5p@9Qz!
7+ sandboxed: true
8+ scripts: [ background ]
9+ @onLoad: init()
10+ @onUnload: terminate()
A RD_Client/modules/client_background/background.otui +94-0 View file
@@ -0,0 +1,94 @@
1+UIWidget
2+ id: background
3+ anchors.fill: parent
4+ focusable: false
5+ image-source: /images/background
6+ image-smooth: true
7+ image-fixed-ratio: true
8+ margin-top: 1
9+
10+ UIWidget
11+ id: configManager
12+ size: 42 42
13+ tooltip: Clique aqui para configurar seu cliente.
14+ anchors.top: parent.top
15+ anchors.left: parent.left
16+ image-source: images/config
17+ change-cursor-image: true
18+ cursor: pointer
19+ margin-top: 10
20+ margin-left: 10
21+ @onClick: modules.client_options.toggle()
22+
23+ UIWidget
24+ id: socialLinks
25+ size: 234 54
26+ anchors.bottom: parent.bottom
27+ anchors.horizontalCenter: parent.horizontalCenter
28+ margin-bottom: 20
29+ focusable: false
30+ phantom: true
31+
32+ UIWidget
33+ id: Facebook
34+ !tooltip: tr('Facebook (not configured)')
35+ image-source: images/social/facebook
36+ size: 48 53
37+ anchors.top: parent.top
38+ anchors.left: parent.left
39+ margin-left: 0
40+ opacity: 0.8
41+ focusable: false
42+ change-cursor-image: true
43+ cursor: pointer
44+ @onClick: modules.client_background.openSocialLink('facebook')
45+ $hover:
46+ opacity: 1
47+
48+ UIWidget
49+ id: Youtube
50+ !tooltip: tr('YouTube')
51+ image-source: images/social/youtube
52+ size: 48 53
53+ anchors.top: parent.top
54+ anchors.left: parent.left
55+ margin-left: 62
56+ opacity: 0.8
57+ focusable: false
58+ change-cursor-image: true
59+ cursor: pointer
60+ @onClick: modules.client_background.openSocialLink('youtube')
61+ $hover:
62+ opacity: 1
63+
64+ UIWidget
65+ id: Instagram
66+ !tooltip: tr('Instagram (not configured)')
67+ image-source: images/social/instagram
68+ size: 48 53
69+ anchors.top: parent.top
70+ anchors.left: parent.left
71+ margin-left: 124
72+ opacity: 0.8
73+ focusable: false
74+ change-cursor-image: true
75+ cursor: pointer
76+ @onClick: modules.client_background.openSocialLink('instagram')
77+ $hover:
78+ opacity: 1
79+
80+ UIWidget
81+ id: Discord
82+ !tooltip: tr('Discord')
83+ image-source: images/social/discord
84+ size: 48 53
85+ anchors.top: parent.top
86+ anchors.left: parent.left
87+ margin-left: 186
88+ opacity: 0.8
89+ focusable: false
90+ change-cursor-image: true
91+ cursor: pointer
92+ @onClick: modules.client_background.openSocialLink('discord')
93+ $hover:
94+ opacity: 1
A RD_Client/modules/client_background/images/config.png +0-0 View file
Binary file not shown.
A RD_Client/modules/client_background/images/social/discord.png +0-0 View file
Binary file not shown.
A RD_Client/modules/client_background/images/social/facebook.png +0-0 View file
Binary file not shown.
A RD_Client/modules/client_background/images/social/instagram.png +0-0 View file
Binary file not shown.
A RD_Client/modules/client_background/images/social/youtube.png +0-0 View file
Binary file not shown.
A RD_Client/modules/client_entergame/character.otui +66-0 View file
@@ -0,0 +1,66 @@
1+Panel
2+ id: characterCell
3+ size: 190 190
4+ image-source: /images/ui/panel_lightflat_circle
5+ image-repeat: no-repeat
6+ image-fit: cover
7+ position: 0 0
8+
9+ Label
10+ id: name
11+ text-auto-resize: true
12+ font: verdana-11px-monochrome
13+ color: #bbbbbb
14+ position: 10 10
15+ $on:
16+ color: #ffffff
17+
18+ UICreature
19+ id: outfit
20+ animate: true
21+ size: 256 256
22+ position: 10 40
23+
24+ Label
25+ id: level
26+ text-auto-resize: true
27+ font: verdana-9px-monochrome
28+ color: #bbbbbb
29+ &baseText: 'Level: %s'
30+ position: 10 300
31+ $on:
32+ color: #ffffff
33+
34+ Label
35+ id: vocation
36+ text-auto-resize: true
37+ font: verdana-9px-monochrome
38+ color: #bbbbbb
39+ background-color: alpha
40+ &baseText: '(%s)'
41+ position: 10 320
42+
43+ $focus:
44+ image-source: /images/ui/bossbar_outfit
45+ border-width: 0
46+ border-color: #f4ca16
47+ opacity: 1
48+ size: 190 190
49+ image-fit: contain
50+ image-align: center
51+ image-resize: true
52+ image-repeat: no-repeat
53+
54+CharacterWidgetEmpty < Panel
55+ id: emptyCell
56+ size: 190 190
57+ image-source: /images/ui/panel_flat
58+ image-border: 3
59+ focusable: false
60+
61+ Label
62+ color: #bbbbbb
63+ text-auto-resize: true
64+ font: verdana-11px-monochrome
65+ !text: 'Empty'
66+ position: 20 80
A RD_Client/modules/client_entergame/characterlist.otui +195-0 View file
@@ -0,0 +1,195 @@
1+CharacterRow < UIWidget
2+ height: 60
3+ focusable: true
4+ background-color: alpha
5+ border-width: 1
6+ border-color: alpha
7+ margin-bottom: 2
8+ &updateOnStates: |
9+ function(self)
10+ local focused = self:isFocused()
11+ for _, child in ipairs(self:getChildren()) do
12+ child:setOn(focused)
13+ end
14+ end
15+ @onFocusChange: self:updateOnStates()
16+ @onSetup: self:updateOnStates()
17+
18+ $hover !focus:
19+ background-color: #ffffff10
20+
21+ $focus:
22+ background-color: #d4a84a26
23+ border-color: #d4a84a88
24+
25+ UICreature
26+ id: outfit
27+ size: 48 48
28+ anchors.left: parent.left
29+ anchors.verticalCenter: parent.verticalCenter
30+ margin-left: 4
31+ animate: false
32+ phantom: true
33+
34+ Label
35+ id: name
36+ anchors.left: outfit.right
37+ anchors.right: parent.right
38+ anchors.top: parent.top
39+ margin-left: 8
40+ margin-top: 10
41+ font: sono_bold_border_14
42+ color: #dfdfdf
43+ phantom: true
44+ $on:
45+ color: #ffd27a
46+
47+ Label
48+ id: info
49+ anchors.left: name.left
50+ anchors.right: parent.right
51+ anchors.top: name.bottom
52+ margin-top: 4
53+ font: verdana-11px-antialised
54+ color: #8f8f8f
55+ phantom: true
56+ $on:
57+ color: #c8c8c8
58+
59+PreviewLabel < Label
60+ anchors.left: parent.left
61+ anchors.right: parent.right
62+ text-align: center
63+ font: verdana-11px-antialised
64+ color: #c8c8c8
65+ phantom: true
66+
67+StaticMainWindow
68+ id: charactersWindow
69+ !text: tr('Select Character')
70+ size: 760 520
71+ visible: false
72+ focus-policy: StrongFocus
73+ @onEnter: CharacterList.doLogin()
74+ @onEscape: CharacterList.hide(true)
75+
76+ TextList
77+ id: characterList
78+ anchors.top: parent.top
79+ anchors.left: parent.left
80+ anchors.bottom: separator.top
81+ margin-bottom: 10
82+ width: 330
83+ padding: 3
84+ background-color: #00000055
85+ border-width: 1
86+ border-color: #00000099
87+ vertical-scrollbar: characterListScrollBar
88+
89+ VerticalScrollBar
90+ id: characterListScrollBar
91+ anchors.top: characterList.top
92+ anchors.bottom: characterList.bottom
93+ anchors.left: characterList.right
94+ step: 62
95+ pixels-scroll: true
96+
97+ Panel
98+ id: previewPanel
99+ anchors.top: parent.top
100+ anchors.left: characterListScrollBar.right
101+ anchors.right: parent.right
102+ anchors.bottom: separator.top
103+ margin-left: 10
104+ margin-bottom: 10
105+ background-color: #00000055
106+ border-width: 1
107+ border-color: #00000099
108+
109+ UICreature
110+ id: previewOutfit
111+ size: 200 200
112+ anchors.top: parent.top
113+ anchors.horizontalCenter: parent.horizontalCenter
114+ margin-top: 26
115+ animate: true
116+ phantom: true
117+
118+ Label
119+ id: previewName
120+ anchors.top: previewOutfit.bottom
121+ anchors.left: parent.left
122+ anchors.right: parent.right
123+ margin-top: 12
124+ text-align: center
125+ font: sono_bold_border_14
126+ color: #ffd27a
127+ phantom: true
128+
129+ PreviewLabel
130+ id: previewLevel
131+ anchors.top: previewName.bottom
132+ margin-top: 10
133+
134+ PreviewLabel
135+ id: previewVocation
136+ anchors.top: previewLevel.bottom
137+ margin-top: 4
138+ color: #f4ca16
139+
140+ PreviewLabel
141+ id: previewWorld
142+ anchors.top: previewVocation.bottom
143+ margin-top: 4
144+ color: #8f8f8f
145+
146+ HorizontalSeparator
147+ id: separator
148+ anchors.left: parent.left
149+ anchors.right: parent.right
150+ anchors.bottom: buttonOk.top
151+ margin-bottom: 10
152+
153+ Label
154+ id: accountStatusCaption
155+ !text: tr('Account') .. ':'
156+ anchors.left: parent.left
157+ anchors.verticalCenter: buttonOk.verticalCenter
158+ text-auto-resize: true
159+ color: #8f8f8f
160+
161+ Label
162+ id: accountStatusLabel
163+ !text: tr('Free Account')
164+ anchors.left: accountStatusCaption.right
165+ anchors.verticalCenter: buttonOk.verticalCenter
166+ margin-left: 5
167+ text-auto-resize: true
168+ color: #dfdfdf
169+ $on:
170+ color: #ff9a4a
171+
172+ CheckBox
173+ id: autoReconnect
174+ !text: tr('Auto reconnect')
175+ anchors.left: accountStatusLabel.right
176+ anchors.verticalCenter: buttonOk.verticalCenter
177+ margin-left: 16
178+ width: 120
179+
180+ Button
181+ id: buttonCancel
182+ !text: tr('Back')
183+ width: 96
184+ anchors.right: buttonOk.left
185+ anchors.bottom: parent.bottom
186+ margin-right: 8
187+ @onClick: CharacterList.hide(true)
188+
189+ Button
190+ id: buttonOk
191+ !text: tr('Play')
192+ width: 96
193+ anchors.right: parent.right
194+ anchors.bottom: parent.bottom
195+ @onClick: CharacterList.doLogin()
A RD_Client/modules/client_entergame/entergame.otmod +13-0 View file
@@ -0,0 +1,13 @@
1+Module
2+ name: client_entergame
3+ description: Manages enter game and character list windows
4+ author: edubart & otclient.ovh
5+ website: https://github.com/edubart/otclient
6+ security: jR$5p@9Qz!
7+ scripts: [ entergame, characterlist ]
8+ @onLoad: EnterGame.init() CharacterList.init()
9+ @onUnload: EnterGame.terminate() CharacterList.terminate()
10+
11+ load-later:
12+ - game_things
13+ - game_features
Top