Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tome
Tales of MajEyal
Commits
a3599db4
Commit
a3599db4
authored
11 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
moar steam stuff
parent
6c948f8f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
game/engines/default/engine/utils.lua
+4
-0
4 additions, 0 deletions
game/engines/default/engine/utils.lua
game/engines/default/modules/boot/dialogs/MainMenu.lua
+15
-0
15 additions, 0 deletions
game/engines/default/modules/boot/dialogs/MainMenu.lua
with
19 additions
and
0 deletions
game/engines/default/engine/utils.lua
+
4
−
0
View file @
a3599db4
...
...
@@ -497,6 +497,10 @@ function string.parseHex(str)
return
res
end
function
string
.
toHex
(
str
,
spacer
)
return
string.gsub
(
str
,
"."
,
function
(
c
)
return
string.format
(
"%02X%s"
,
string.byte
(
c
),
spacer
or
""
)
end
)
end
function
__get_uid_surface
(
uid
,
w
,
h
)
uid
=
tonumber
(
uid
)
local
e
=
uid
and
__uids
[
uid
]
...
...
This diff is collapsed.
Click to expand it.
game/engines/default/modules/boot/dialogs/MainMenu.lua
+
15
−
0
View file @
a3599db4
...
...
@@ -87,6 +87,8 @@ function _M:updateUI()
end
function
_M
:
uiLogin
(
uis
)
if
core
.
steam
then
return
self
:
uiLoginSteam
(
uis
)
end
local
str
=
Textzone
.
new
{
auto_width
=
true
,
auto_height
=
true
,
text
=
"#GOLD#Online Profile"
}
local
bt
=
Button
.
new
{
text
=
"Login"
,
width
=
50
,
fct
=
function
()
self
:
login
()
end
}
self
.
c_login
=
Textbox
.
new
{
title
=
"Username: "
,
text
=
""
,
chars
=
20
,
max_len
=
20
,
fct
=
function
(
text
)
self
:
login
()
end
}
...
...
@@ -99,6 +101,15 @@ function _M:uiLogin(uis)
uis
[
#
uis
+
1
]
=
{
hcenter
=
0
,
bottom
=
0
,
ui
=
bt
}
end
function
_M
:
uiLoginSteam
(
uis
)
local
str
=
Textzone
.
new
{
auto_width
=
true
,
auto_height
=
true
,
text
=
"#GOLD#Online Profile"
}
local
bt
=
Button
.
new
{
text
=
"Login with Steam"
,
fct
=
function
()
self
:
loginSteam
()
end
}
uis
[
#
uis
+
1
]
=
{
left
=
10
,
bottom
=
bt
.
h
+
str
.
h
,
ui
=
Separator
.
new
{
dir
=
"vertical"
,
size
=
self
.
iw
-
20
}}
uis
[
#
uis
+
1
]
=
{
hcenter
=
0
,
bottom
=
bt
.
h
,
ui
=
str
}
uis
[
#
uis
+
1
]
=
{
hcenter
=
0
,
bottom
=
0
,
ui
=
bt
}
end
function
_M
:
uiStats
(
uis
)
self
.
logged_url
=
"http://te4.org/users/"
..
profile
.
auth
.
page
local
str1
=
Textzone
.
new
{
auto_width
=
true
,
auto_height
=
true
,
text
=
"#GOLD#Online Profile#WHITE#"
}
...
...
@@ -124,6 +135,10 @@ function _M:login()
game
:
createProfile
({
create
=
false
,
login
=
self
.
c_login
.
text
,
pass
=
self
.
c_pass
.
text
})
end
function
_M
:
loginSteam
()
print
(
"<<<"
,
core
.
steam
.
sessionTicket
():
toHex
())
end
function
_M
:
logout
()
profile
:
logOut
()
self
:
on_recover_focus
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment