This commit is contained in:
phidias authored and GitHub committed 2026-11-17 18:55:28 +09:00
1 parent 42a36241f2
commit f846979e11
4 files changed
+8 -17

No files matched your search

+5 -11
View File
@@ -74,15 +74,6 @@ Elements.calculator_info_label = Gui.define("calculator/info_label")
single_line = false
}
--- Container Info
Elements.container_info = Gui.define("calculator/container_info")
:draw{function(def, parent)
local screen_frame = Gui.elements.screen_frame(parent, nil, true)
Gui.elements.header(screen_frame, { caption = { "exp-gui_calculator.info_tooltip" } })
Elements.calculator_info_label(screen_frame)
return Gui.elements.screen_frame.get_root_element(screen_frame)
end}
--- Info button
Elements.calculator_info_button = Gui.define("calculator/info_button")
:draw{
@@ -93,8 +84,10 @@ Elements.calculator_info_button = Gui.define("calculator/info_button")
name = "calculator_info_button",
}
:on_click(function(def, player)
Elements.container_info(player.gui.screen)
end) --[[@as any]]
for _, label in Elements.calculator_info_label:tracked_elements(player) do
label.visible = not label.visible
end
end)
--- Input textfield
Elements.calculator_input_textfield = Gui.define("calculator/input_textfield")
@@ -122,6 +115,7 @@ Elements.container = Gui.define("calculator/container")
Elements.calculator_info_button(header)
Elements.calculator_input_textfield(screen_frame)
Elements.calculator_result_label(screen_frame)
Elements.calculator_info_label(screen_frame).visible = false
return Gui.elements.screen_frame.get_root_element(screen_frame)
end)
+1 -2
View File
@@ -271,8 +271,7 @@ inserted=Inserted __1__ __2__ into __3__
[exp-gui_calculator]
tooltip=Calculator
info_tooltip=Calculator Info
info_caption=Supported Operators: + - * / % () ^ ** !\nPrefix: K M G T P\nBase: 0x 0b 0o\nFunction: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
caption=Supported Operators: + - * / % () ^ ** !\nPrefix: K M G T P\nBase: 0x 0b 0o\nFunction: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
error=[ERROR]
input_too_long=Input too long
factorial_neg=Factorial of a negative number __1__
+1 -2
View File
@@ -273,8 +273,7 @@ inserted=自動填入 __1__ __2__ 到 __3__
[exp-gui_calculator]
tooltip=計算機
info_tooltip=計算機資訊
info_caption=支援的運算符: + - * / % () ^ ** !\n詞頭: K M G T P\n進制: 0x 0b 0o\n函數: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
caption=支援的運算符: + - * / % () ^ ** !\n詞頭: K M G T P\n進制: 0x 0b 0o\n函數: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
error=[錯誤]
input_too_long=輸入太長
factorial_neg=負數的階乘 __1__
+1 -2
View File
@@ -273,8 +273,7 @@ inserted=自動填入 __1__ __2__ 到 __3__
[exp-gui_calculator]
tooltip=計算機
info_tooltip=計算機資訊
info_caption=支援的運算符: + - * / % () ^ ** !\n詞頭: K M G T P\n進制: 0x 0b 0o\n函數: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
caption=支援的運算符: + - * / % () ^ ** !\n詞頭: K M G T P\n進制: 0x 0b 0o\n函數: ABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC
error=[錯誤]
input_too_long=輸入太長
factorial_neg=負數的階乘 __1__