diff --git a/exp_scenario/module/gui/calculator.lua b/exp_scenario/module/gui/calculator.lua index 772f82cd..dfd84e77 100644 --- a/exp_scenario/module/gui/calculator.lua +++ b/exp_scenario/module/gui/calculator.lua @@ -63,6 +63,24 @@ local function factorial(n) return result end +--- Expression caption label +Elements.calculator_expression_caption_label = Gui.define("calculator/expression_caption_label") + :draw{ + type = "label", + caption = {"exp-gui_calculator.expression"}, + name = "calculator_expression_caption_label", + style = "heading_2_label", + } + +--- Result caption label +Elements.calculator_result_caption_label = Gui.define("calculator/result_caption_label") + :draw{ + type = "label", + caption = {"exp-gui_calculator.expression"}, + name = "calculator_result_caption_label", + style = "heading_2_label", + } + --- Info label Elements.calculator_info_label = Gui.define("calculator/info_label") :draw{ @@ -97,7 +115,9 @@ Elements.container = Gui.define("calculator/container") :draw(function(def, parent) local screen_frame = Gui.elements.screen_frame(parent, nil, true) local header = Gui.elements.header(screen_frame, { caption = { "exp-gui_calculator.tooltip" } }) + Elements.calculator_expression_caption_label(screen_frame) Elements.calculator_input_textfield(screen_frame) + Elements.calculator_result_caption_label(screen_frame) Elements.calculator_result_label(screen_frame) Elements.calculator_info_label(screen_frame) return Gui.elements.screen_frame.get_root_element(screen_frame) diff --git a/exp_scenario/module/locale/en.cfg b/exp_scenario/module/locale/en.cfg index 0a960a28..0e23538b 100644 --- a/exp_scenario/module/locale/en.cfg +++ b/exp_scenario/module/locale/en.cfg @@ -271,6 +271,8 @@ inserted=Inserted __1__ __2__ into __3__ [exp-gui_calculator] tooltip=Calculator +expression=Expression: +result=Result: caption=Operator\n+ - * / % () ^ ** !\nPrefix\nK M G T P\nBase\n0x 0b 0o\nFunction\nABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC error=[ERROR] input_too_long=Input too long diff --git a/exp_scenario/module/locale/zh-CN.cfg b/exp_scenario/module/locale/zh-CN.cfg index 717c13ef..98468b41 100644 --- a/exp_scenario/module/locale/zh-CN.cfg +++ b/exp_scenario/module/locale/zh-CN.cfg @@ -273,6 +273,8 @@ inserted=自動填入 __1__ __2__ 到 __3__ [exp-gui_calculator] tooltip=計算機 +expression=表達式: +result=結果: caption=運算符\n+ - * / % () ^ ** !\n詞頭\nK M G T P\n進制\n0x 0b 0o\n函數\nABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC error=[錯誤] input_too_long=輸入太長 diff --git a/exp_scenario/module/locale/zh-TW.cfg b/exp_scenario/module/locale/zh-TW.cfg index 717c13ef..98468b41 100644 --- a/exp_scenario/module/locale/zh-TW.cfg +++ b/exp_scenario/module/locale/zh-TW.cfg @@ -273,6 +273,8 @@ inserted=自動填入 __1__ __2__ 到 __3__ [exp-gui_calculator] tooltip=計算機 +expression=表達式: +result=結果: caption=運算符\n+ - * / % () ^ ** !\n詞頭\nK M G T P\n進制\n0x 0b 0o\n函數\nABS, CEIL, EXP, FLOOR, LN, LOG, ROUND, SQRT, TRUNC error=[錯誤] input_too_long=輸入太長