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
Lisa Greene
Tales of MajEyal
Commits
1f171ec3
Commit
1f171ec3
authored
11 years ago
by
DarkGod
Browse files
Options
Downloads
Patches
Plain Diff
Added a slight outline to currently moused over item on the map
parent
6389003d
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/modules/tome/class/Game.lua
+16
-1
16 additions, 1 deletion
game/modules/tome/class/Game.lua
game/modules/tome/data/gfx/shaders/objectsoutline.lua
+31
-0
31 additions, 0 deletions
game/modules/tome/data/gfx/shaders/objectsoutline.lua
with
47 additions
and
1 deletion
game/modules/tome/class/Game.lua
+
16
−
1
View file @
1f171ec3
...
...
@@ -1711,11 +1711,27 @@ end
function
_M
:
setupMouse
(
reset
)
if
reset
==
nil
or
reset
then
self
.
mouse
:
reset
()
end
local
cur_obj
=
nil
local
outline
=
Shader
.
new
(
"objectsoutline"
).
shad
self
.
mouse
:
registerZone
(
Map
.
display_x
,
Map
.
display_y
,
Map
.
viewport
.
width
,
Map
.
viewport
.
height
,
function
(
button
,
mx
,
my
,
xrel
,
yrel
,
bx
,
by
,
event
,
extra
)
if
not
self
.
uiset
:
isLocked
()
then
return
end
if
core
.
shader
.
allow
(
"adv"
)
and
outline
then
local
tmx
,
tmy
=
game
.
level
.
map
:
getMouseTile
(
mx
,
my
)
local
o
=
self
.
level
.
map
(
tmx
,
tmy
,
Map
.
OBJECT
)
if
cur_obj
and
cur_obj
.
_mo
then
cur_obj
.
_mo
:
shader
(
nil
)
end
if
o
and
o
.
_mo
and
not
o
.
shader
then
outline
:
paramNumber2
(
"textSize"
,
Map
.
tile_w
,
Map
.
tile_h
)
o
.
_mo
:
shader
(
outline
)
cur_obj
=
o
end
end
self
.
tooltip
.
add_map_str
=
extra
and
extra
.
log_str
if
game
.
tooltip
.
locked
then
if
button
==
"wheelup"
and
event
==
"button"
then
game
.
tooltip
.
container
.
scrollbar
.
pos
=
util
.
minBound
(
game
.
tooltip
.
container
.
scrollbar
.
pos
-
1
,
0
,
game
.
tooltip
.
container
.
scrollbar
.
max
)
...
...
@@ -1742,7 +1758,6 @@ function _M:setupMouse(reset)
-- Cheat kill
if
config
.
settings
.
cheat
and
button
==
"right"
and
core
.
key
.
modState
(
"ctrl"
)
and
core
.
key
.
modState
(
"shift"
)
and
not
xrel
and
not
yrel
and
event
==
"button"
and
self
.
zone
and
not
self
.
zone
.
wilderness
then
local
tmx
,
tmy
=
game
.
level
.
map
:
getMouseTile
(
mx
,
my
)
local
target
=
game
.
level
.
map
(
tmx
,
tmy
,
Map
.
ACTOR
)
if
target
then
target
:
die
(
game
.
player
)
...
...
This diff is collapsed.
Click to expand it.
game/modules/tome/data/gfx/shaders/objectsoutline.lua
0 → 100644
+
31
−
0
View file @
1f171ec3
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012, 2013 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return
{
frag
=
"textoutline"
,
vert
=
nil
,
args
=
{
tex
=
{
texture
=
0
},
textSize
=
textSize
or
{
1
,
1
},
intensity
=
intensity
or
0
.
3
,
outlineSize
=
outlineSize
or
{
2
,
2
},
outlineColor
=
outlineColor
or
{
0
,
1
,
0
.
5
,
0
.
4
},
},
clone
=
false
,
}
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