Browse Source

Fix copyright on WebRequest, use UIWidgetEditComplete on array widget

Josh Engebretson 10 years ago
parent
commit
d3396cfa6e

+ 8 - 20
Script/AtomicEditor/ui/frames/inspector/ArrayEditWidget.ts

@@ -31,7 +31,7 @@ class ArrayEditWidget extends Atomic.UILayout {
 
         this.countEditField = <Atomic.UIEditField> countEdit.getWidget("editfield");
 
-        this.subscribeToEvent(this.countEditField, "WidgetEvent", (data) => this.handleCountWidgetEvent(data));
+        this.subscribeToEvent(this.countEditField, "UIWidgetEditComplete", (ev) => this.handleUIWidgetEditCompleteEvent(ev));
         this.subscribeToEvent(this.countEditField, "WidgetFocusChanged", (data) => this.handleCountWidgetFocusChanged(data));
 
     }
@@ -50,31 +50,19 @@ class ArrayEditWidget extends Atomic.UILayout {
 
     }
 
-    handleCountWidgetEvent(ev: Atomic.UIWidgetEvent) {
+    handleUIWidgetEditCompleteEvent(ev) {
 
-        if (ev.type == Atomic.UI_EVENT_TYPE_KEY_UP) {
+      if (this.countRestore != this.countEditField.text) {
 
-            if (ev.key == Atomic.KEY_RETURN) {
+          this.countRestore = this.countEditField.text;
 
-                if (this.countRestore != this.countEditField.text) {
+          if (this.onCountChanged) {
 
-                    this.countRestore = this.countEditField.text;
+            this.onCountChanged(Number(this.countRestore));
 
-                    if (this.onCountChanged) {
+          }
 
-                      this.onCountChanged(Number(this.countRestore));
-
-                    }
-
-                }
-
-            }
-
-        }
-
-        if (ev.type == Atomic.UI_EVENT_TYPE_CHANGED) {
-
-        }
+      }
 
     }
 

+ 1 - 0
Source/Atomic/Web/WebRequest.h

@@ -1,5 +1,6 @@
 //
 // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
+// Copyright (c) 2008-2015 the Urho3D project.
 //
 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to deal