mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-17 00:40:42 +09:00
Fixed stores in gui
This commit is contained in:
1 parent
258ca8dbde
commit
3b5c69cfd1
103 files changed
+213
-243
No files matched your search
@@ -40,14 +40,12 @@ local Text = {
|
||||
_prototype_field=Prototype.extend{
|
||||
on_element_update = Prototype.event,
|
||||
on_store_update = Prototype.event,
|
||||
add_store = Prototype.store(false,store_update),
|
||||
add_sync_store = Prototype.store(true,store_update)
|
||||
add_store = Prototype.store(store_update)
|
||||
},
|
||||
_prototype_box=Prototype.extend{
|
||||
on_element_update = Prototype.event,
|
||||
on_store_update = Prototype.event,
|
||||
add_store = Prototype.store(false,store_update),
|
||||
add_sync_store = Prototype.store(true,store_update)
|
||||
add_store = Prototype.store(store_update)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +71,7 @@ function Text.new_text_field(name)
|
||||
end
|
||||
|
||||
if self.store then
|
||||
local category = self.categorize and self.categorize(element) or nil
|
||||
local value = self:get_store(category)
|
||||
local value = self:get_store(element)
|
||||
if value then element.text = value end
|
||||
end
|
||||
end)
|
||||
@@ -84,8 +81,7 @@ function Text.new_text_field(name)
|
||||
local value = element.text
|
||||
|
||||
if self.store then
|
||||
local category = self.categorize and self.categorize(element) or value
|
||||
self:set_store(category,value)
|
||||
self:set_store(element,value)
|
||||
|
||||
else
|
||||
self:raise_event('on_element_update',event.player,element,value)
|
||||
|
||||
Reference in new issue
Block a user