Jump to content

Search the Community

Showing results for tags 'tooltip'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News & Announcements
    • News
  • Project Zomboid
    • PZ Updates
    • General Discussions
    • Bug Reports
    • PZ Support
    • PZ Multiplayer
    • PZ Community & Creativity
    • PZ Suggestions
  • PZ Modding
    • Tutorials & Resources
    • Mods
    • Items
    • Mapping
    • Mod Ideas and Requests
  • General Games Development
    • Indie Scene
  • Other Discussions
    • General Discussion
    • Forum Games & Activities

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Twitter


Interests

Found 5 results

  1. After stumbling over this thread http://theindiestone.com/forums/index.php/topic/13649-serious-problem-with-the-new-keys-and-lockable-doorknobs/ I realized that I actually do have that implemented already. What's this mod do? It shows you a short info in a doorknobs tooltip if you have a key for this specific knob in your keyring. Also, when you right-click on doors, you get an option to drop one key for this door to the ground. Where do I get this mod? On github: https://github.com/blind-coder/pz-dihakft/releases How do I install it? Like any other mod, download and extract to Zomboid/mods, then enable it in the Mods section. Does this mod have tiny_avc support? Yes! What is the license of this mod? It's Free For All!
  2. ORMtnMan

    Tooltips

    Hey, I have a feeling this should be in the modding help sections, but I seem to get no responses there to this question. To someone in the know, this should be an easy one to answer. Where is the tooltip code for displaying weapon ammo capacity? I have been digging around for far to long to try to figure out how to make my mods tooltips reappear to no avail. So, help please, and don't kick me to the mod section curb.
  3. Hello there, I hope this is the correct forum to post, if not, feel free to move it. I'm currently in the progress of writing a mod for PZ called "The Bookshop". Two things I noticed that have to do with the tooltip when hovering (skill)books: Grammer The tooltip currently says "The book give you a xp multiplier for the lvl2 skill". While I'm no native english speaking person, I think this should be something like "This book gives you an XP multiplier for the lvl2 skill" The tooltip should include the skill name This is ok for books called "Farming for Beginners", but in the case of a book called "Cunninghams Encyclopedia of Magical Herbs" (or any other) it would be nice to have the skill name inlcuded in the tooltip, like so: "This book gives you an XP multiplier for the lvl2 skill Cooking" or something like that. Thank you.
  4. I used similar tooltip descriptions similar to tooltip.description = tooltip.description .. " <RGB:1,0,0>" .. getItemText("Plank") .. " " .. ISBuildMenu.planks .. "/" .. plankNb .. " <LINE>";But instead of being interpreted, the text is display verbatim. There are no errors in the console. Maybe I am forgetting something? *edit* Added entire code. ISSafe = {};ISSafe.planks = 0;ISSafe.nails = 0;ISSafe.hinge = 0;ISSafe.doorknob = 0;ISSafe.cheat = false;ISSafe.woodWorkXp = 0;ISSafe.doBuildMenu = function(player, context, worldobjects, test) if getCore():getGameMode()=="LastStand" then return; end ISSafe.woodWorkXp = getSpecificPlayer(player):getPerkLevel(Perks.Woodwork); local thump = nil; local square = nil; -- we get the thumpable item (like wall/door/furniture etc.) if exist on the tile we right clicked for i,v in ipairs(worldobjects) do square = v:getSquare(); if instanceof(v, "IsoThumpable") and not v:isDoor() then thump = v; end end -- dismantle stuff if thump and thump:isDismantable() and getSpecificPlayer(player):getInventory():contains("Saw") and getSpecificPlayer(player):getInventory():contains("Screwdriver") then if test == true then return true; end context:addOption(getText("ContextMenu_Dismantle"), worldobjects, ISSafe.onDismantle, thump, getSpecificPlayer(player)); end -- build menu -- if we have any thing to build in our inventory if ISSafe.haveSomethingtoBuild(player) then if test == true then return true; end local buildOption = context:addOption("ISZ Build", worldobjects, nil); -- create a brand new context menu wich contain our different material (wood, stone etc.) to build local subMenu = ISContextMenu:getNew(context); -- We create the different option for this new menu (wood, stone etc.) -- check if we can build something in wood material if haveSomethingtoBuildWood(player) then -- we add the subMenu to our current option (Build) context:addSubMenu(buildOption, subMenu); ------------------ WOODEN CRATE ------------------ ISSafe.buildContainerMenu(subMenu, player); end endendfunction ISSafe.haveSomethingtoBuild(player)--~ return true; return haveSomethingtoBuildWood(player);endfunction haveSomethingtoBuildWood(player) if ISSafe.cheat then return true; end ISSafe.planks = 0; ISSafe.nails = 0; ISSafe.hinge = 0; ISSafe.doorknob = 0; -- if not getSpecificPlayer(player):getInventory():contains("Hammer") and not haveSandbags then return false; end -- get the number of plank we got for i = 0, getSpecificPlayer(player):getInventory():getItems():size() - 1 do local item = getSpecificPlayer(player):getInventory():getItems():get(i); if item:getType() == "Plank" then ISSafe.planks = ISSafe.planks + 1; elseif item:getType() == "Nails" then ISSafe.nails = ISSafe.nails + 1; elseif item:getType() == "Doorknob" then ISSafe.doorknob = ISSafe.doorknob + 1; elseif item:getType() == "Hinge" then ISSafe.hinge = ISSafe.hinge + 1; end end -- we also check if there's any material on the ground, in a 3x3 square around the player local materialOnGround = buildUtil.checkMaterialOnGround(getSpecificPlayer(player):getCurrentSquare()); for i,v in pairs(materialOnGround) do if i == "Plank" then ISSafe.planks = ISSafe.planks + v; elseif i == "Nails" then ISSafe.nails = ISSafe.nails + v; elseif i == "Doorknob" then ISSafe.doorknob = ISSafe.doorknob + v; elseif i == "Hinge" then ISSafe.hinge = ISSafe.hinge + v; end end return true;end-- **********************************************-- ** *CONTAINER* **-- **********************************************ISSafe.buildContainerMenu = function(subMenu, player) local crateSprite = ISSafe.getSafeSprites(player); local crateOption = subMenu:addOption("Safe", worldobjects, ISSafe.onWoodenCrate, square, crateSprite, player); local toolTip = ISSafe.canBuild(4,8,2,1,0,0,crateOption, player); toolTip:setName("Safe"); toolTip.description = "Make a safe to keep a few items secure." .. toolTip.description; toolTip:setTexture(crateSprite.sprite);endISSafe.onWoodenCrate = function(worldobjects, square, crateSprite, player) -- sprite, northSprite local crate = ISWoodenContainer:new(crateSprite.sprite, crateSprite.northSprite); crate.renderFloorHelper = true crate.canBeAlwaysPlaced = true; crate.modData["need:Base.Plank"] = "4"; crate.modData["need:Base.Nails"] = "8"; crate.modData["need:Base.Hinge"] = "2"; crate.modData["need:Base.Doorknob"] = "1"; crate:setEastSprite(crateSprite.eastSprite); crate.player = player getCell():setDrag(crate, player);end-- **********************************************-- ** SPRITE FUNCTIONS **-- **********************************************ISSafe.getSafeSprites = function(player) local sprite = {}; sprite.sprite = "carpentry_01_16"; sprite.northSprite = "carpentry_01_17"; sprite.eastSprite = "carpentry_01_18"; return sprite;end-- **********************************************-- ** DISMANTLE **-- **********************************************ISSafe.onDismantle = function(worldobjects, thumpable, player) if luautils.walkAdj(thumpable:getSquare()) then ISTimedActionQueue.add(ISDismantleAction:new(player, thumpable)) endend-- **********************************************-- ** OTHER **-- **********************************************-- Create our toolTip, depending on the required materialISSafe.canBuild = function(plankNb, nailsNb, hingeNb, doorknobNb, baredWireNb, carpentrySkill, option, player) -- create a new tooltip local tooltip = ISSafe.addToolTip(); -- add it to our current option option.toolTip = tooltip; local result = true; if ISSafe.cheat then return tooltip; end tooltip.description = "<LINE> <LINE>" .. getText("Tooltip_craft_Needs") .. " : <LINE>"; -- now we gonna test all the needed material, if we don't have it, they'll be in red into our toolip if ISSafe.planks < plankNb then tooltip.description = tooltip.description .. " <RGB:1,0,0>" .. getItemText("Plank") .. " " .. ISSafe.planks .. "/" .. plankNb .. " <LINE>"; result = false; elseif ISSafe.planks >= plankNb then tooltip.description = tooltip.description .. " <RGB:1,1,1>" .. getItemText("Plank") .. " " .. ISSafe.planks .. "/" .. plankNb .. " <LINE>"; end if ISSafe.nails < nailsNb then tooltip.description = tooltip.description .. " <RGB:1,0,0>" .. getItemText("Nails") .. " " .. ISSafe.nails .. "/" .. nailsNb .. " <LINE>"; result = false; elseif ISSafe.nails >= nailsNb then tooltip.description = tooltip.description .. " <RGB:1,1,1>" .. getItemText("Nails") .. " " .. ISSafe.nails .. "/" .. nailsNb .. " <LINE>"; end if ISSafe.doorknob < doorknobNb then tooltip.description = tooltip.description .. " <RGB:1,0,0>" .. getItemText("Doorknob") .. " " .. ISSafe.doorknob .. "/" .. doorknobNb .. " <LINE>"; result = false; elseif ISSafe.doorknob >= doorknobNb then tooltip.description = tooltip.description .. " <RGB:1,1,1>" .. getItemText("Doorknob") .. " " .. ISSafe.doorknob .. "/" .. doorknobNb .. " <LINE>"; end if ISSafe.hinge < hingeNb then tooltip.description = tooltip.description .. " <RGB:1,0,0>" .. getItemText("Door Hinge") .. " " .. ISSafe.hinge .. "/" .. hingeNb .. " <LINE>"; result = false; elseif ISSafe.hinge >= hingeNb then tooltip.description = tooltip.description .. " <RGB:1,1,1>" .. getItemText("Door Hinge") .. " " .. ISSafe.hinge .. "/" .. hingeNb .. " <LINE>"; end if getSpecificPlayer(player):getPerkLevel(Perks.Woodwork) < carpentrySkill then tooltip.description = tooltip.description .. " <RGB:1,0,0>" .. getText("IGUI_perks_Carpentry") .. " " .. getSpecificPlayer(player):getPerkLevel(Perks.Woodwork) .. "/" .. carpentrySkill .. " <LINE>"; result = false; elseif getSpecificPlayer(player):getPerkLevel(Perks.Woodwork) >= carpentrySkill then tooltip.description = tooltip.description .. " <RGB:1,1,1>" .. getText("IGUI_perks_Carpentry") .. " " .. getSpecificPlayer(player):getPerkLevel(Perks.Woodwork) .. "/" .. carpentrySkill .. " <LINE>"; end if not result then option.onSelect = nil; option.notAvailable = true; end return tooltip;endISSafe.addToolTip = function() local toolTip = ISToolTip:new(); toolTip:initialise(); toolTip:setVisible(false); return toolTip;endEvents.OnFillWorldObjectContextMenu.Add(ISSafe.doBuildMenu);
  5. Kenpachi™

    Image tooltip

    How i can add an tooltip to image? I tried: function ISImage:render() self.toolTip = ISToolTip:new(); self.toolTip:initialise(); self.toolTip:setVisible(false); if self.mouseover then self.toolTip.description = self.tooltiptext; self.toolTip:setVisible(true); self.toolTip:addToUIManager(); else self.toolTip:setVisible(false); self.toolTip:removeFromUIManager(); endendTooltip appears, but does not disappear. What am I doing wrong?
×
×
  • Create New...