Skip to content

Commit e56dcd2

Browse files
New Icon for Cursor. (#2355)
* Change client pointer. Now need change to TGUI pointer * Safe moment * Mouse on everyone (No Scrollbars) --------- Co-authored-by: DeadLine <[email protected]>
1 parent 2d8fd69 commit e56dcd2

26 files changed

+63
-21
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
*.gif binary
3434
*.jpg binary
3535
*.png binary
36+
*.ico binary
3637
*.so binary
3738

3839
## Merger hooks, run tools/hooks/install.bat or install.sh to set up

code/modules/admin/verbs/beakerpanel.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
background: #40628a;
9999
border: 1px solid #161616;
100100
margin: 0 2px 0 0;
101-
cursor:default;
101+
cursor: url("default_mousepointer.ico"), default;
102102
}
103103

104104
.remove-reagent {

code/modules/client/client_defines.dm

+3
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@
109109

110110
var/atom/movable/screen/click_catcher/void
111111

112+
mouse_pointer_icon = 'mojave/icons/effects/mouse_pointers/mojave_pointer.dmi' //MOJAVE Edit
113+
var/mojave_pointer_icon = 'mojave/icons/effects/mouse_pointers/mojave_pointer.dmi' //MOJAVE Add
114+
112115
///used to make a special mouse cursor, this one for mouse up icon
113116
var/mouse_up_icon = null
114117
///used to make a special mouse cursor, this one for mouse up icon

code/modules/client/client_procs.dm

+2
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
337337
set_macros()
338338

339339
// Initialize tgui panel
340+
var/datum/asset/A = get_asset_datum(/datum/asset/simple/mouse)
341+
A.send(src)
340342
src << browse(file('html/statbrowser.html'), "window=statbrowser")
341343
addtimer(CALLBACK(src, .proc/check_panel_loaded), 30 SECONDS)
342344
tgui_panel.initialize()

code/modules/mob/dead/new_player/poll.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ GLOBAL_PROTECT(poll_options)
264264
<script src="[SSassets.transport.get_asset_url("jquery-ui.custom-core-widgit-mouse-sortable.min.js")]"></script>
265265
<style>
266266
#sortable { list-style-type: none; margin: 0; padding: 2em; }
267-
#sortable li { min-height: 1em; margin: 0px 1px 1px 1px; padding: 1px; border: 1px solid black; border-radius: 5px; background-color: white; cursor:move;}
267+
#sortable li { min-height: 1em; margin: 0px 1px 1px 1px; padding: 1px; border: 1px solid black; border-radius: 5px; background-color: white; cursor: move;}
268268
#sortable .sortable-placeholder-highlight { min-height: 1em; margin: 0 2px 2px 2px; padding: 2px; border: 1px dotted blue; border-radius: 5px; background-color: GhostWhite; }
269269
span.grippy { content: '....'; width: 10px; height: 20px; display: inline-block; overflow: hidden; line-height: 5px; padding: 3px 1px; cursor: move; vertical-align: middle; margin-top: -.7em; margin-right: .3em; font-size: 12px; font-family: sans-serif; letter-spacing: 2px; color: #cccccc; text-shadow: 1px 0 1px black; }
270270
span.grippy::after { content: '.. .. .. ..';}

code/modules/mob/mob.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@
11331133
/mob/proc/update_mouse_pointer()
11341134
if(!client)
11351135
return
1136-
client.mouse_pointer_icon = initial(client.mouse_pointer_icon)
1136+
client.mouse_pointer_icon = client.mojave_pointer_icon
11371137
if(examine_cursor_icon && client.keys_held["Shift"]) //mouse shit is hardcoded, make this non hard-coded once we make mouse modifiers bindable
11381138
client.mouse_pointer_icon = examine_cursor_icon
11391139
if(istype(loc, /obj/vehicle/sealed))

code/modules/mob/mob_defines.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
/// A special action? No idea why this lives here
5252
var/list/datum/action/chameleon_item_actions
5353
///Cursor icon used when holding shift over things
54-
var/examine_cursor_icon = 'icons/effects/mouse_pointers/examine_pointer.dmi'
54+
var/examine_cursor_icon = 'mojave/icons/effects/mouse_pointers/examine_pointer.dmi' //MOJAVE Edit
5555

5656
///Whether this mob has or is in the middle of committing suicide.
5757
var/suiciding = FALSE

code/modules/vehicles/mecha/mecha_topic.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
hr {border: 1px solid #0f0; color: #0f0; background-color: #0f0;}
1414
a {padding:2px 5px;;color:#0f0;}
1515
.wr {margin-bottom: 5px;}
16-
.header {cursor:pointer;}
16+
.header {cursor: url("drag_mousepointer.ico"), pointer;}
1717
.open, .closed {background: #32CD32; color:#000; padding:1px 2px;}
1818
.links a {margin-bottom: 2px;padding-top:3px;}
1919
.visible {display: block;}

html/admin/admin_panels_css3.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.inputlabel {
22
position: relative;
33
display: inline;
4-
cursor: pointer;
4+
cursor: url("drag_mousepointer.ico"), pointer;
55
padding-left: 20px;
66
}
77

html/browser/common.css

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
html, body
2+
{
3+
cursor: url("default_mousepointer.ico"), default;
4+
}
5+
16
body
27
{
38
padding: 0;
@@ -22,7 +27,7 @@ a, button, a:link, a:visited, a:active, .linkOn, .linkOff
2227
border: 1px solid #161616;
2328
padding: 1px 4px 1px 4px;
2429
margin: 0 2px 0 0;
25-
cursor:default;
30+
cursor: url("drag_mousepointer.ico"), pointer;
2631
}
2732

2833
a:hover
@@ -39,7 +44,7 @@ a.white, a.white:link, a.white:visited, a.white:active
3944
border: 1px solid #161616;
4045
padding: 1px 4px 1px 4px;
4146
margin: 0 2px 0 0;
42-
cursor:default;
47+
cursor: url("drag_mousepointer.ico"), pointer;
4348
}
4449

4550
a.white:hover
@@ -316,7 +321,7 @@ div.notice
316321

317322
.slider {
318323
position: absolute;
319-
cursor: pointer;
324+
cursor: url("drag_mousepointer.ico"), pointer;
320325
top: 0;
321326
left: 0;
322327
right: 0;

html/statbrowser.html

+11-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,19 @@
77
<meta http-equiv="Cache-Control" content="max-age=15; must-revalidate" />
88
<link id="goonStyle" rel="stylesheet" type="text/css" href="browserOutput_white.css" media="all" />
99
<style>
10+
11+
html {
12+
cursor: url("default_mousepointer.ico"), auto;
13+
}
14+
1015
body {
1116
font-family: Verdana, Geneva, Tahoma, sans-serif;
1217
font-size: 12px !important;
1318
margin: 0 !important;
1419
padding: 0 !important;
1520
overflow-x: hidden;
1621
overflow-y: scroll;
22+
cursor: url("default_mousepointer.ico"), auto;
1723
}
1824

1925
body.dark {
@@ -45,7 +51,8 @@
4551

4652
a {
4753
color: black;
48-
text-decoration: none
54+
text-decoration: none;
55+
cursor: url("drag_mousepointer.ico"), pointer;
4956
}
5057

5158
.dark a {
@@ -73,6 +80,7 @@
7380
text-align: center;
7481
padding: 14px 16px;
7582
text-decoration: none;
83+
cursor: url("drag_mousepointer.ico"), pointer;
7684
}
7785

7886
li a:hover:not(.active) {
@@ -99,7 +107,7 @@
99107
text-decoration: none;
100108
font-size: 12px;
101109
margin: 0;
102-
cursor: pointer;
110+
cursor: url("drag_mousepointer.ico"), pointer;
103111
transition-duration: 100ms;
104112
order: 3;
105113
min-width: 40px;
@@ -209,7 +217,7 @@
209217
padding: 7px 14px;
210218
color: black;
211219
text-decoration: none;
212-
cursor: pointer;
220+
cursor: url("drag_mousepointer.ico"), pointer;
213221
font-size: 13px;
214222
margin: 2px 2px;
215223
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/datum/asset/simple/mouse
2+
early = TRUE
3+
keep_local_name = TRUE
4+
assets = list(
5+
"default_mousepointer.ico" = 'tgui/packages/tgui/assets/default_mousepointer.ico',
6+
"drag_mousepointer.ico" = 'tgui/packages/tgui/assets/drag_mousepointer.ico',
7+
"n-resize_mousepointer.ico" = 'tgui/packages/tgui/assets/n-resize_mousepointer.ico',
8+
"e-resize_mousepointer.ico" = 'tgui/packages/tgui/assets/e-resize_mousepointer.ico',
9+
"se-resize_mousepointer.ico" = 'tgui/packages/tgui/assets/se-resize_mousepointer.ico',
10+
)
Binary file not shown.
Binary file not shown.

mojave/machinery/terminals.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
var/clicksound = pick('mojave/sound/ms13machines/terminals/ui_hacking_charenter_01.ogg','mojave/sound/ms13machines/terminals/ui_hacking_charenter_02.ogg', 'mojave/sound/ms13machines/terminals/ui_hacking_charenter_03.ogg',)
194194
playsound(src, clicksound, 50, FALSE)
195195
var/dat = ""
196-
dat += "<head><style>body {padding: 0; margin: 15px; background-color: [main_color]; color: [secondary_color]; line-height: 170%;} a, button, a:link, a:visited, a:active, .linkOn, .linkOff {color: [secondary_color]; text-decoration: none; background: [main_color]; border: none; padding: 1px 4px 1px 4px; margin: 0 2px 0 0; cursor:default;} a:hover {color: [main_color]; background: [secondary_color]; border: 1px solid [secondary_color]} a.white, a.white:link, a.white:visited, a.white:active {color: [secondary_color]; text-decoration: none; background: [secondary_color]; border: 1px solid #161616; padding: 1px 4px 1px 4px; margin: 0 2px 0 0; cursor:default;} a.white:hover {color: [main_color]; background: [secondary_color];} .linkOn, a.linkOn:link, a.linkOn:visited, a.linkOn:active, a.linkOn:hover {color: [secondary_color]; background: [main_color]; border-color: [main_color];} .linkOff, a.linkOff:link, a.linkOff:visited, a.linkOff:active, a.linkOff:hover{color: [secondary_color]; background: [main_color]; border-color: [main_color];}</style></head><font face='courier'>"
196+
dat += "<head><style>body {padding: 0; margin: 15px; background-color: [main_color]; color: [secondary_color]; line-height: 170%;} a, button, a:link, a:visited, a:active, .linkOn, .linkOff {color: [secondary_color]; text-decoration: none; background: [main_color]; border: none; padding: 1px 4px 1px 4px; margin: 0 2px 0 0; cursor: url('default_mousepointer.ico'), default;} a:hover {color: [main_color]; background: [secondary_color]; border: 1px solid [secondary_color]} a.white, a.white:link, a.white:visited, a.white:active {color: [secondary_color]; text-decoration: none; background: [secondary_color]; border: 1px solid #161616; padding: 1px 4px 1px 4px; margin: 0 2px 0 0; cursor: url('default_mousepointer.ico'), default;} a.white:hover {color: [main_color]; background: [secondary_color];} .linkOn, a.linkOn:link, a.linkOn:visited, a.linkOn:active, a.linkOn:hover {color: [secondary_color]; background: [main_color]; border-color: [main_color];} .linkOff, a.linkOff:link, a.linkOff:visited, a.linkOff:active, a.linkOff:hover{color: [secondary_color]; background: [main_color]; border-color: [main_color];}</style></head><font face='courier'>"
197197
switch (system)
198198
if ("ROBCO50")
199199
dat += "<center><b>ROBCO INDUSTRIES UNIFIED OPERATING SYSTEM V.5.0</b><br>"

tgstation.dme

+1
Original file line numberDiff line numberDiff line change
@@ -4400,6 +4400,7 @@
44004400
#include "mojave\code\game\objects\effects\displacement_maps.dm"
44014401
#include "mojave\code\game\objects\effects\displacement\fat.dm"
44024402
#include "mojave\code\modules\ai\effect_node.dm"
4403+
#include "mojave\code\modules\asset_cache\assets\mouse.dm"
44034404
#include "mojave\code\modules\atmosphere\atmosphere.dm"
44044405
#include "mojave\code\modules\client\preferences\fatness.dm"
44054406
#include "mojave\code\modules\clothing\spacesuits\power_armor.dm"
974 Bytes
Binary file not shown.
1.02 KB
Binary file not shown.
946 Bytes
Binary file not shown.
566 Bytes
Binary file not shown.
1006 Bytes
Binary file not shown.

tgui/packages/tgui/styles/components/Knob.scss

-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ $inner-padding: 0.1em;
2323
height: 2.6em;
2424
margin: 0 auto;
2525
margin-bottom: -0.2em;
26-
cursor: n-resize;
2726

2827
// Adjusts a baseline in a way, that makes knob middle-aligned
2928
// when it flows with the text.

tgui/packages/tgui/styles/components/NumberInput.scss

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ $border-radius: Input.$border-radius !default;
2626
line-height: base.em(17px);
2727
text-align: right;
2828
overflow: visible;
29-
cursor: n-resize;
3029
}
3130

3231
.NumberInput--fluid {

tgui/packages/tgui/styles/components/Slider.scss

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ $cursor-color: base.$color-fg !default;
99
$popup-background-color: #000000 !default;
1010
$popup-text-color: #ffffff !default;
1111

12-
.Slider {
13-
cursor: e-resize;
14-
}
1512

1613
.Slider__cursorOffset {
1714
position: absolute;

tgui/packages/tgui/styles/layouts/Window.scss

-3
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
width: base.rem(20px);
7878
height: 20px;
7979
height: base.rem(20px);
80-
cursor: se-resize;
8180
}
8281

8382
.Window__resizeHandle__s {
@@ -87,7 +86,6 @@
8786
right: 0;
8887
height: 6px;
8988
height: base.rem(6px);
90-
cursor: s-resize;
9189
}
9290

9391
.Window__resizeHandle__e {
@@ -97,5 +95,4 @@
9795
right: 0;
9896
width: 3px;
9997
width: base.rem(3px);
100-
cursor: e-resize;
10198
}

tgui/public/tgui.html

+20
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,26 @@
440440
</script>
441441

442442
<style>
443+
html, body{
444+
cursor: url("default_mousepointer.ico"), auto;
445+
}
446+
447+
.Button, .Tabs, .TitleBar__close {
448+
cursor: url("drag_mousepointer.ico"), pointer;
449+
}
450+
451+
.Knob, .NumberInput, .Window__resizeHandle__s {
452+
cursor: url("n-resize_mousepointer.ico"), s-resize;
453+
}
454+
455+
.Window__resizeHandle__e {
456+
cursor: url("e-resize_mousepointer.ico"), e-resize;
457+
}
458+
459+
.Window__resizeHandle__se {
460+
cursor: url("se-resize_mousepointer.ico"), se-resize;
461+
}
462+
443463
.FatalError {
444464
display: none;
445465
position: absolute;

0 commit comments

Comments
 (0)