Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tales of MajEyal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
Assen Kanev
Tales of MajEyal
Commits
3a428e2d
Commit
3a428e2d
authored
6 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
accomodate big lore visuals better
parent
74771940
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
game/modules/tome/dialogs/LorePopup.lua
+28
-16
28 additions, 16 deletions
game/modules/tome/dialogs/LorePopup.lua
with
28 additions
and
16 deletions
game/modules/tome/dialogs/LorePopup.lua
+
28
−
16
View file @
3a428e2d
...
...
@@ -69,10 +69,22 @@ function _M:init(l, w, force_height)
local
image
if
l
.
image
then
image
=
Image
.
new
{
file
=
"lore/"
..
l
.
image
,
auto_width
=
true
,
auto_height
=
true
}
uis
=
{
{
hcenter
=
0
,
top
=
3
,
ui
=
image
},
{
left
=
3
,
top
=
3
+
image
.
h
,
ui
=
c_text
},
}
while
image
.
w
>=
game
.
w
*
0
.
85
or
image
.
h
>=
game
.
h
*
0
.
85
do
image
.
w
=
math.floor
(
image
.
w
*
0
.
95
)
image
.
h
=
math.floor
(
image
.
h
*
0
.
95
)
end
if
image
.
w
<
w
then
uis
=
{
{
hcenter
=
0
,
top
=
3
,
ui
=
image
},
{
left
=
3
,
top
=
3
+
image
.
h
,
ui
=
c_text
},
}
else
uis
=
{
{
left
=
0
,
top
=
3
,
ui
=
image
},
{
left
=
3
,
top
=
3
+
image
.
h
,
ui
=
c_text
},
}
end
end
local
on_end
=
function
()
...
...
@@ -88,18 +100,18 @@ function _M:init(l, w, force_height)
self
.
key
:
addBind
(
"ACCEPT"
,
on_end
)
self
:
setupUI
(
true
,
true
)
if
self
.
w
>=
game
.
w
or
self
.
h
>=
game
.
h
then
if
l
.
image
then
image
.
w
=
math.floor
(
image
.
w
/
2
)
image
.
h
=
math.floor
(
image
.
h
/
2
)
uis
=
{
{
hcenter
=
0
,
top
=
3
,
ui
=
image
},
{
left
=
3
,
top
=
3
+
image
.
h
,
ui
=
c_text
},
}
end
self
:
loadUI
(
uis
)
self
:
setupUI
(
true
,
true
)
end
--
if self.w >= game.w or self.h >= game.h then
--
if l.image then
--
image.w = math.floor(image.w / 2)
--
image.h = math.floor(image.h / 2)
--
uis = {
--
{hcenter = 0, top = 3, ui=image},
--
{left = 3, top = 3 + image.h, ui=c_text},
--
}
--
end
--
self:loadUI(uis)
--
self:setupUI(true, true)
--
end
game
:
registerDialog
(
self
)
game
:
playSound
(
"actions/read"
)
...
...
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