mirror of
https://github.com/DaanVandenBosch/phantasmal-world.git
synced 2025-04-05 15:28:29 +08:00
1 line
337 KiB
JavaScript
1 line
337 KiB
JavaScript
![]() |
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"4aaK":function(e,t,i){"use strict";i.r(t);var o=i("xGNL"),s=i.n(o),n=i("xs7i"),r=i("PE7g"),a=i("Tpfs"),d=i("0Xme");class c extends d.a{constructor(e="",t){if(super(e,"core_TextInput","text","core_TextInput_inner",t),this.preferred_label_position="left",t){const{max_length:e}=t;this.set_attr("maxLength",e)}this.set_value(e),this.finalize_construction()}get_value(){return this.input_element.value}set_value(e){this.input_element.value=e}}var l=i("sDu+"),_=(i("C5oP"),i("4VsB")),u=i("FXpb");class v extends l.a{constructor(e="",t){super(t),this.element=Object(u.h)({className:"core_TextArea"}),this.preferred_label_position="left",this.text_element=Object(u.u)({className:"core_TextArea_inner"}),this._value=new _.a(this,"",this.set_value),t&&(null!=t.max_length&&(this.text_element.maxLength=t.max_length),null!=t.font_family&&(this.text_element.style.fontFamily=t.font_family),null!=t.rows&&(this.text_element.rows=t.rows),null!=t.cols&&(this.text_element.cols=t.cols)),this.value=this._value,this.set_value(e),this.text_element.onchange=()=>this._value.set_val(this.text_element.value,{silent:!1}),this.element.append(this.text_element),this.finalize_construction()}set_value(e){this.text_element.value=e}}i("ObFr");var h=i("7ZX1"),p=(i("7YJZ"),i("6Fug"));class g extends p.a{constructor(e){super(),this.element=Object(u.h)({className:"quest_editor_UnavailableView"}),this.label=this.disposable(new h.a(e,{enabled:!1})),this.element.append(this.label.element),this.finalize_construction()}}var b=i("zsIO");class f extends b.a{constructor(e){super(),this.element=Object(u.h)({className:"quest_editor_QuestInfoView",tabIndex:-1}),this.table_element=Object(u.r)(),this.id_input=this.add(new r.a(0,{min:0,step:1})),this.name_input=this.add(new c("",{max_length:32})),this.short_description_input=this.add(new v("",{max_length:128,font_family:'"Courier New", monospace',cols:25,rows:5})),this.long_description_input=this.add(new v("",{max_length:288,font_family:'"Courier New", monospace',cols:25,rows:10})),this.unavailable_view=this.add(new g("No quest loaded.")),this.quest_disposer=this.disposable(new a.a);const t=e.current_quest;this.table_element.append(Object(u.y)(Object(u.w)("Episode:"),this.episode_element=Object(u.t)()),Object(u.y)(Object(u.w)("ID:"),Object(u.t)(this.id_input.element)),Object(u.y)(Object(u.w)("Name:"),Object(u.t)(this.name_input.element)),Object(u.y)(Object(u.w)({colSpan:2},"Short description:")),Object(u.y)(Object(u.t)({colSpan:2},this.short_description_input.element)),Object(u.y)(Object(u.w)({colSpan:2},"Long description:")),Object(u.y)(Object(u.t)({colSpan:2},this.long_description_input.element))),this.element.append(this.table_element,this.unavailable_view.element),this.element.addEventListener("focus",e.focused,!0),this.disposables(this.unavailable_view.visible.bind_to(e.unavailable),Object(u.c)(this.table_element,"hidden",e.unavailable),t.observe(({value:t})=>{this.quest_disposer.dispose_all(),this.episode_element.textContent=t?n.b[t.episode]:"",t&&this.quest_disposer.add_all(this.id_input.value.bind_to(t.id),this.id_input.value.observe(({value:t})=>e.set_id(t)),this.name_input.value.bind_to(t.name),this.name_input.value.observe(({value:t})=>e.set_name(t)),this.short_description_input.value.bind_to(t.short_description),this.short_description_input.value.observe(({value:t})=>e.set_short_description(t)),this.long_description_input.value.bind_to(t.long_description),this.long_description_input.value.observe(({value:t})=>e.set_long_description(t)),this.enabled.bind_to(e.enabled))})),this.finalize_construction()}set_enabled(e){super.set_enabled(e),this.id_input.enabled.val=e,this.name_input.enabled.val=e,this.short_description_input.enabled.val=e,this.long_description_input.enabled.val=e}}i("88+i"),i("UrNz"),i("5sDa");class m extends b.a{constructor(e){super(),this.element=Object(u.h)({className:"quest_editor_NpcCountsView"}),this.table_element=Object(u.r)(),this.unavailable_view=this.add(new g("No quest loaded.")),this.element.append(this.table_element,this.unavailable_view
|