diff --git a/protoDebuger/ProtoDebug.qml b/protoDebuger/ProtoDebug.qml index 4f60b5a..5bbf40b 100644 --- a/protoDebuger/ProtoDebug.qml +++ b/protoDebuger/ProtoDebug.qml @@ -84,22 +84,37 @@ Item { Layout.leftMargin: 10 } - - - Button { - id: button - text: qsTr("更新lua脚本") - Layout.preferredHeight: 41 - Layout.preferredWidth: 116 + RowLayout{ Layout.columnSpan: 2 - Layout.leftMargin: parent.width/2 - 41 - Layout.bottomMargin: 10 + Button { + id: button2 + text: qsTr("保存lua脚本") + Layout.preferredHeight: 41 + Layout.preferredWidth: 116 + Layout.leftMargin: 15 + Layout.bottomMargin: 10 - onClicked: { - lua_script_text = lua_script.text - DataWrap.SaveLuaScript(lua_script_text) + onClicked: { + lua_script_text = lua_script.text + DataWrap.SaveLuaScript(lua_script_text) + + } + } + Button { + id: button + text: qsTr("更新lua脚本") + Layout.preferredHeight: 41 + Layout.preferredWidth: 116 + Layout.bottomMargin: 10 + + onClicked: { + lua_script_text = lua_script.text + DataWrap.UpdateLuaScript(lua_script_text) + } } } + + } } @@ -109,8 +124,4 @@ Item { } } -/*##^## -Designer { - D{i:2;anchors_height:600;anchors_width:800} -} -##^##*/ + diff --git a/protoDebuger/sharedata.cpp b/protoDebuger/sharedata.cpp index 5c3ea9b..9a57604 100644 --- a/protoDebuger/sharedata.cpp +++ b/protoDebuger/sharedata.cpp @@ -99,7 +99,7 @@ int ShareData::TestShowData() return 0; } -int ShareData::SaveLuaScript(QString str) +int ShareData::UpdateLuaScript(QString str) { qDebug()<