mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Adds left and right arrows
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
var/floor_state = "floor"
|
||||
var/floor_dir = SOUTH
|
||||
|
||||
var/list/allowed_states = list("arrival", "arrivalcorner", "bar", "barber", "blackcorner", "blue", "bluecorner",
|
||||
var/static/list/allowed_states = list("arrival", "arrivalcorner", "bar", "barber", "blackcorner", "blue", "bluecorner",
|
||||
"bluefull", "bluered", "blueyellow", "blueyellowfull", "bot", "brown", "browncorner", "browncornerold", "brownold",
|
||||
"cafeteria", "caution", "cautioncorner", "chapel", "cmo", "dark", "delivery", "escape", "escapecorner", "floor",
|
||||
"freezerfloor", "gcircuit", "green", "greenblue", "greenbluefull", "greencorner", "greenfull", "greenyellow",
|
||||
@@ -47,14 +47,18 @@
|
||||
floor_icon = icon('icons/turf/floors.dmi', floor_state, floor_dir)
|
||||
user << browse_rsc(floor_icon, "floor.png")
|
||||
var/dat = {"
|
||||
<center><img style="-ms-interpolation-mode: nearest-neighbor;" src="floor.png" width=128 height=128 border=4></center>
|
||||
<center>
|
||||
<a href="?src=\ref[src];cycleleft=1"><-</a>
|
||||
<img style="-ms-interpolation-mode: nearest-neighbor;" src="floor.png" width=128 height=128 border=4>
|
||||
<a href="?src=\ref[src];cycleright=1">-></a>
|
||||
</center>
|
||||
<a href="?src=\ref[src];choose_state=1">Choose Style</a>
|
||||
<div class='statusDisplay'>Style: [floor_state]</div>
|
||||
<a href="?src=\ref[src];choose_dir=1">Choose Direction</a>
|
||||
<div class='statusDisplay'>Direction: [dir2text(floor_dir)]</div>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(user, "floor_painter", name, 200, 300)
|
||||
var/datum/browser/popup = new(user, "floor_painter", name, 225, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
|
||||
@@ -71,6 +75,20 @@
|
||||
var/seldir = input("Please select a direction", "[src]") as null|anything in list("north", "south", "east", "west", "northeast", "northwest", "southeast", "southwest")
|
||||
if(seldir)
|
||||
floor_dir = text2dir(seldir)
|
||||
if(href_list["cycleleft"])
|
||||
var/index = allowed_states.Find(floor_state)
|
||||
index--
|
||||
if(index < 1)
|
||||
index = allowed_states.len
|
||||
floor_state = allowed_states[index]
|
||||
floor_dir = SOUTH
|
||||
if(href_list["cycleright"])
|
||||
var/index = allowed_states.Find(floor_state)
|
||||
index++
|
||||
if(index > allowed_states.len)
|
||||
index = 1
|
||||
floor_state = allowed_states[index]
|
||||
floor_dir = SOUTH
|
||||
|
||||
floor_icon = icon('icons/turf/floors.dmi', floor_state, floor_dir)
|
||||
if(usr)
|
||||
|
||||
Reference in New Issue
Block a user