computer3 merge

This commit is contained in:
ZomgPonies
2013-11-03 14:18:54 -05:00
parent 88d6a3fbdc
commit 36c7fa3dcd
85 changed files with 9350 additions and 31 deletions
+11 -4
View File
@@ -13,6 +13,7 @@
var/body_elements
var/head_content = ""
var/content = ""
var/title_buttons = ""
/datum/browser/New(nuser, nwindow_id, ntitle = 0, nwidth = 0, nheight = 0, var/atom/nref = null)
@@ -29,9 +30,16 @@
ref = nref
add_stylesheet("common", 'html/browser/common.css') // this CSS sheet is common to all UIs
/datum/browser/proc/set_title(ntitle)
title = format_text(ntitle)
/datum/browser/proc/add_head_content(nhead_content)
head_content = nhead_content
/datum/browser/proc/set_title_buttons(ntitle_buttons)
title_buttons = ntitle_buttons
/datum/browser/proc/set_window_options(nwindow_options)
window_options = nwindow_options
@@ -75,7 +83,7 @@
</head>
<body scroll=auto>
<div class='uiWrapper'>
[title ? "<div class='uiTitleWrapper'><div [title_attributes]><tt>[title]</tt></div></div>" : ""]
[title ? "<div class='uiTitleWrapper'><div [title_attributes]><tt>[title]</tt></div><div class='uiTitleButtons'>[title_buttons]</div></div>" : ""]
<div class='uiContent'>
"}
@@ -140,7 +148,7 @@
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
/proc/onclosed(mob/user, windowid, var/atom/ref=null)
if(!user.client) return
if(!user || !user.client) return
var/param = "null"
if(ref)
param = "\ref[ref]"
@@ -162,11 +170,10 @@
//world << "windowclose: [atomref]"
if(atomref!="null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
var/href = "close=1"
if(hsrc)
//world << "[src] Topic [href] [hsrc]"
usr = src.mob
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
src.Topic("close=1", list("close"="1"), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()
// no atomref specified (or not found)