mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-11-20 07:23:13 +09:00
info
This commit is contained in:
1 parent
c81797ff4b
commit
d025f235b5
4 files changed
+10
-6
No files matched your search
@@ -69,11 +69,12 @@ Elements.calculator_result_label = Gui.define("calculator/result_label")
|
|||||||
style = "heading_2_label",
|
style = "heading_2_label",
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Empty new line label
|
--- Info label
|
||||||
Elements.calculator_label_1 = Gui.define("calculator/label_1")
|
Elements.calculator_info_label = Gui.define("calculator/info_label")
|
||||||
:draw{
|
:draw{
|
||||||
type = "label",
|
type = "label",
|
||||||
caption = "",
|
caption = "[virtual-signal=signal-info]",
|
||||||
|
tooltip = {"exp-gui_calculator.info_tooltip"},
|
||||||
style = "heading_2_label",
|
style = "heading_2_label",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ Elements.container = Gui.define("calculator/container")
|
|||||||
Elements.calculator_function_label(screen_frame)
|
Elements.calculator_function_label(screen_frame)
|
||||||
Elements.calculator_input_textfield(screen_frame)
|
Elements.calculator_input_textfield(screen_frame)
|
||||||
Elements.calculator_result_label(screen_frame)
|
Elements.calculator_result_label(screen_frame)
|
||||||
Elements.calculator_label_1(screen_frame)
|
Elements.calculator_info_label(screen_frame)
|
||||||
|
|
||||||
return Gui.elements.screen_frame.get_root_element(screen_frame)
|
return Gui.elements.screen_frame.get_root_element(screen_frame)
|
||||||
end)
|
end)
|
||||||
@@ -94,7 +95,7 @@ Elements.container = Gui.define("calculator/container")
|
|||||||
Gui.toolbar.create_button{
|
Gui.toolbar.create_button{
|
||||||
name = "open_calculator",
|
name = "open_calculator",
|
||||||
sprite = "entity/arithmetic-combinator",
|
sprite = "entity/arithmetic-combinator",
|
||||||
tooltip = { "exp-gui_calculator.tooltip" },
|
tooltip = {"exp-gui_calculator.tooltip"},
|
||||||
visible = function(player, element)
|
visible = function(player, element)
|
||||||
return Roles.player_has_permission(player, "exp-gui_calculator")
|
return Roles.player_has_permission(player, "exp-gui_calculator")
|
||||||
end
|
end
|
||||||
@@ -319,7 +320,7 @@ function Elements.parse(expression)
|
|||||||
return value
|
return value
|
||||||
end)
|
end)
|
||||||
|
|
||||||
return ok and format_number(result, false) or (type(result) == "table" and result or {"", {"exp-gui_calculator.error"}, tostring(result)})
|
return ok and ("= " .. format_number(result, false)) or (type(result) == "table" and result or {"", {"exp-gui_calculator.error"}, tostring(result)})
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Value change
|
--- Value change
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ inserted=Inserted __1__ __2__ into __3__
|
|||||||
|
|
||||||
[exp-gui_calculator]
|
[exp-gui_calculator]
|
||||||
tooltip=Calculator
|
tooltip=Calculator
|
||||||
|
info_tooltip=Supported Operators: + - * / % () ^ **\nSuffix: K M G T P\nBase: 0x 0b 0o\nFunction: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
|
||||||
error=[ERROR]
|
error=[ERROR]
|
||||||
factorial_neg=Factorial of a negative number __1__
|
factorial_neg=Factorial of a negative number __1__
|
||||||
factorial_large=Factorial too large __1__
|
factorial_large=Factorial too large __1__
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ inserted=自動填入 __1__ __2__ 到 __3__
|
|||||||
|
|
||||||
[exp-gui_calculator]
|
[exp-gui_calculator]
|
||||||
tooltip=計算機
|
tooltip=計算機
|
||||||
|
info_tooltip=支援的運算符: + - * / % () ^ **\n後綴: K M G T P\n進制: 0x 0b 0o\n函數: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
|
||||||
error=[錯誤]
|
error=[錯誤]
|
||||||
factorial_neg=負數的階乘 __1__
|
factorial_neg=負數的階乘 __1__
|
||||||
factorial_large=階乘太大 __1__
|
factorial_large=階乘太大 __1__
|
||||||
|
|||||||
@@ -262,6 +262,7 @@ inserted=自動填入 __1__ __2__ 到 __3__
|
|||||||
|
|
||||||
[exp-gui_calculator]
|
[exp-gui_calculator]
|
||||||
tooltip=計算機
|
tooltip=計算機
|
||||||
|
info_tooltip=支援的運算符: + - * / % () ^ **\n後綴: K M G T P\n進制: 0x 0b 0o\n函數: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
|
||||||
error=[錯誤]
|
error=[錯誤]
|
||||||
factorial_neg=負數的階乘 __1__
|
factorial_neg=負數的階乘 __1__
|
||||||
factorial_large=階乘太大 __1__
|
factorial_large=階乘太大 __1__
|
||||||
|
|||||||
Reference in new issue
Block a user