aboutsummaryrefslogtreecommitdiff
path: root/src/inventorymanager.cpp
Commit message (Collapse)AuthorAge
* Client-side prediction of inventory changes, and some inventory menu fixesKahrl2012-01-22
|
* Inventory menu (with dragging) improved. Crafting is now handled via a ↵Kahrl2012-01-22
| | | | IACTION_CRAFT inventory action.
* Inventory menu changes: Tooltips; dragging; drop from menu. Lag is a bit ↵Kahrl2012-01-13
| | | | annoying (even in single player).
* The huge item definition and item namespace unification patch (itemdef), see ↵Kahrl2012-01-12
| | | | http://c55.me/minetest/wiki/doku.php?id=changes:itemdef
* Add InvRef and InvStack (currently untested and unusable)Perttu Ahola2012-01-02
--You should have received a copy of the GNU Lesser General Public License along --with this program; if not, write to the Free Software Foundation, Inc., --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -------------------------------------------------------------------------------- local function rename_modpack_formspec(dialogdata) dialogdata.mod = modmgr.global_mods:get_list()[dialogdata.selected] local retval = "size[11.5,4.5,true]" .. "field[2.5,2;7,0.5;te_modpack_name;".. fgettext("Rename Modpack:") .. ";" .. dialogdata.mod.name .. "]" .. "button[3.25,3.5;2.5,0.5;dlg_rename_modpack_confirm;".. fgettext("Accept") .. "]" .. "button[5.75,3.5;2.5,0.5;dlg_rename_modpack_cancel;".. fgettext("Cancel") .. "]" return retval end -------------------------------------------------------------------------------- local function rename_modpack_buttonhandler(this, fields) if fields["dlg_rename_modpack_confirm"] ~= nil then local oldpath = core.get_modpath() .. DIR_DELIM .. this.data.mod.name local targetpath = core.get_modpath() .. DIR_DELIM .. fields["te_modpack_name"] core.copy_dir(oldpath,targetpath,false) modmgr.refresh_globals() modmgr.selected_mod = modmgr.global_mods:get_current_index( modmgr.global_mods:raw_index_by_uid(fields["te_modpack_name"])) this:delete() return true end if fields["dlg_rename_modpack_cancel"] then this:delete() return true end return false end -------------------------------------------------------------------------------- function create_rename_modpack_dlg(selected_index) local retval = dialog_create("dlg_delete_mod", rename_modpack_formspec, rename_modpack_buttonhandler, nil) retval.data.selected = selected_index return retval end