mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-30 04:21:41 +09:00
Fixed stores in gui
This commit is contained in:
@@ -61,8 +61,7 @@ local Slider = {
|
||||
_prototype=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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,8 +87,7 @@ function Slider.new_slider(name)
|
||||
element.set_slider_minimum_maximum(min,max)
|
||||
|
||||
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.slider_value = value end
|
||||
end
|
||||
|
||||
@@ -103,8 +101,7 @@ function Slider.new_slider(name)
|
||||
local value = element.slider_value
|
||||
|
||||
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
|
||||
event_call(self,element,value)
|
||||
@@ -144,8 +141,7 @@ function Slider._prototype:draw_label(element)
|
||||
|
||||
local value = 0
|
||||
if self.store then
|
||||
local category = self.categorize and self.categorize(element) or value
|
||||
value = self:get_store(category) or 0
|
||||
value = self:get_store(element) or 0
|
||||
end
|
||||
|
||||
local new_element = element.add{
|
||||
|
||||
Reference in New Issue
Block a user