Mapped all icon locations

master
sigonasr2 1 year ago
parent e490ca4e8a
commit 96228d946e
  1. 398
      FiestaCraftingCalculator/FiestaCraftingCalculator.cpp
  2. 2
      FiestaCraftingCalculator/assets/Produce.txt
  3. BIN
      FiestaCraftingCalculator/assets/collectibles.png
  4. BIN
      FiestaCraftingCalculator/assets/collectibles2.png
  5. BIN
      FiestaCraftingCalculator/assets/grade.png
  6. 43
      FiestaCraftingCalculator/olcPGEX_QuickGUI.h

@ -11,189 +11,215 @@ using namespace olc::QuickGUI;
int PANEL_WIDTH=620; int PANEL_WIDTH=620;
int PANEL_HEIGHT=240; int PANEL_HEIGHT=240;
std::map<std::string,std::string>IDToName={
{"El1","Elrue [1]"}, enum Image{
{"El2","Elrue [2]"}, PRODUCTION,
{"El3","Elrue [3]"}, COLLECTIBLE,
{"El4","Elrue [4]"}, COLLECTIBLE2
{"El5","Elrue [5]"}, };
{"Lix1","Lix [1]"},
{"Lix2","Lix [2]"}, enum Grade{
{"Lix3","Lix [3]"}, GRADE_NONE,
{"Lix4","Lix [4]"}, GRADEL,
{"Lix5","Lix [5]"}, GRADEM,
{"Xir1","Xir [1]"}, GRADEH,
{"Xir2","Xir [2]"}, GRADE1,
{"Xir3","Xir [3]"}, GRADE2,
{"Xir4","Xir [4]"}, GRADE3,
{"Xir5","Xir [5]"}, GRADE4,
{"BestLowHpPotion","HP Potion (Tier 1)"}, GRADE5,
{"LowHpPotion","HP Potion (Tier 2)"}, };
{"NorHpPotion","HP Potion (Tier 3)"},
{"HighHpPotion","HP Potion (Tier 4)"}, struct ItemData{
{"BestHighHpPotion","HP Potion (Tier 5)"}, std::string name;
{"BestLowSpPotion","SP Potion (Tier 1)"}, Pixel borderCol;
{"LowSpPotion","SP Potion (Tier 2)"}, vi2d tilesheetPos={0,0};
{"NorSpPotion","SP Potion (Tier 3)"}, Image img=COLLECTIBLE;
{"HighSpPotion","SP Potion (Tier 4)"}, Grade grade=GRADE_NONE;
{"BestHighSpPotion","SP Potion (Tier 5)"}, };
{"BestLowConHPPotion","HP Regeneration Potion (Tier 1)"},
{"LowConHPPotion","HP Regeneration Potion (Tier 2)"}, std::map<std::string,ItemData>IDToName={
{"NorConHPPotion","HP Regeneration Potion (Tier 3)"}, {"El1",{"Elrue [1]",{0,0,0},{6,2},PRODUCTION,GRADE1}},
{"HighConHPPotion","HP Regeneration Potion (Tier 4)"}, {"El2",{"Elrue [2]",{0,0,0},{6,2},PRODUCTION,GRADE2}},
{"BestHighConHPPotion","HP Regeneration Potion (Tier 5)"}, {"El3",{"Elrue [3]",{0,0,0},{6,2},PRODUCTION,GRADE3}},
{"BestLowConSPPotion","SP Regeneration Potion (Tier 1)"}, {"El4",{"Elrue [4]",{0,0,0},{6,2},PRODUCTION,GRADE4}},
{"LowConSPPotion","SP Regeneration Potion (Tier 2)"}, {"El5",{"Elrue [5]",{0,0,0},{6,2},PRODUCTION,GRADE5}},
{"NorConSPPotion","SP Regeneration Potion (Tier 3)"}, {"Lix1",{"Lix [1]",{0,0,0},{1,3},PRODUCTION,GRADE1}},
{"HighConSPPotion","SP Regeneration Potion (Tier 4)"}, {"Lix2",{"Lix [2]",{0,0,0},{1,3},PRODUCTION,GRADE2}},
{"BestHighConSPPotion","SP Regeneration Potion (Tier 5)"}, {"Lix3",{"Lix [3]",{0,0,0},{1,3},PRODUCTION,GRADE3}},
{"BestLowTHScroll","Aim(Tier 1)"}, {"Lix4",{"Lix [4]",{0,0,0},{1,3},PRODUCTION,GRADE4}},
{"LowTHScroll","Aim(Tier 2)"}, {"Lix5",{"Lix [5]",{0,0,0},{1,3},PRODUCTION,GRADE5}},
{"NorTHScroll","Aim(Tier 3)"}, {"Xir1",{"Xir [1]",{0,0,0},{4,3},PRODUCTION,GRADE1}},
{"HighTHScroll","Aim(Tier 4)"}, {"Xir2",{"Xir [2]",{0,0,0},{4,3},PRODUCTION,GRADE2}},
{"BestHighTHScroll","Aim(Tier 5)"}, {"Xir3",{"Xir [3]",{0,0,0},{4,3},PRODUCTION,GRADE3}},
{"BestLowTBScroll","Nature's Agility (Tier 1)"}, {"Xir4",{"Xir [4]",{0,0,0},{4,3},PRODUCTION,GRADE4}},
{"LowTBScroll","Nature's Agility (Tier 2)"}, {"Xir5",{"Xir [5]",{0,0,0},{4,3},PRODUCTION,GRADE5}},
{"NorTBScroll","Nature's Agility (Tier 3)"}, {"BestLowHpPotion",{"HP Potion (Tier 1)",{0,0,0},{0,0},PRODUCTION}},
{"HighTBScroll","Nature's Agility (Tier 4)"}, {"LowHpPotion",{"HP Potion (Tier 2)",{0,0,0},{0,0},PRODUCTION,GRADEL}},
{"BestHighTBScroll","Nature's Agility (Tier 5)"}, {"NorHpPotion",{"HP Potion (Tier 3)",{0,0,0},{1,0},PRODUCTION,GRADEM}},
{"BestLowMRScroll","Magical Defense (Tier 1)"}, {"HighHpPotion",{"HP Potion (Tier 4)",{0,0,0},{1,0},PRODUCTION,GRADEH}},
{"LowMRScroll","Magical Defense (Tier 2)"}, {"BestHighHpPotion",{"HP Potion (Tier 5)",{0,0,0},{2,0},PRODUCTION}},
{"NorMRScroll","Magical Defense (Tier 3)"}, {"BestLowSpPotion",{"SP Potion (Tier 1)",{0,0,0},{3,0},PRODUCTION}},
{"HighMRScroll","Magical Defense (Tier 4)"}, {"LowSpPotion",{"SP Potion (Tier 2)",{0,0,0},{3,0},PRODUCTION,GRADEL}},
{"BestHighMRScroll","Magical Defense (Tier 5)"}, {"NorSpPotion",{"SP Potion (Tier 3)",{0,0,0},{4,0},PRODUCTION,GRADEM}},
{"BestLowACScroll","Shield Increase (Tier 1)"}, {"HighSpPotion",{"SP Potion (Tier 4)",{0,0,0},{4,0},PRODUCTION,GRADEH}},
{"LowACScroll","Shield Increase (Tier 2)"}, {"BestHighSpPotion",{"SP Potion (Tier 5)",{0,0,0},{5,0},PRODUCTION}},
{"NorACScroll","Shield Increase (Tier 3)"}, {"BestLowConHPPotion",{"HP Regeneration Potion (Tier 1)",{0,0,0},{0,0},PRODUCTION}},
{"HighACScroll","Shield Increase (Tier 4)"}, {"LowConHPPotion",{"HP Regeneration Potion (Tier 2)",{0,0,0},{0,0},PRODUCTION,GRADEL}},
{"BestHighACScroll","Shield Increase (Tier 5)"}, {"NorConHPPotion",{"HP Regeneration Potion (Tier 3)",{0,0,0},{1,0},PRODUCTION,GRADEM}},
{"BestLowMaxHPScroll","Vitality (Tier 1)"}, {"HighConHPPotion",{"HP Regeneration Potion (Tier 4)",{0,0,0},{1,0},PRODUCTION,GRADEH}},
{"LowMaxHPScroll","Vitality (Tier 2)"}, {"BestHighConHPPotion",{"HP Regeneration Potion (Tier 5)",{0,0,0},{2,0},PRODUCTION}},
{"NorMaxHPScroll","Vitality (Tier 3)"}, {"BestLowConSPPotion",{"SP Regeneration Potion (Tier 1)",{0,0,0},{3,0},PRODUCTION}},
{"HighMaxHPScroll","Vitality (Tier 4)"}, {"LowConSPPotion",{"SP Regeneration Potion (Tier 2)",{0,0,0},{3,0},PRODUCTION,GRADEL}},
{"BestHighMaxHPScroll","Vitality (Tier 5)"}, {"NorConSPPotion",{"SP Regeneration Potion (Tier 3)",{0,0,0},{4,0},PRODUCTION,GRADEM}},
{"BestLowMaxSPScroll","Mentality (Tier 1)"}, {"HighConSPPotion",{"SP Regeneration Potion (Tier 4)",{0,0,0},{4,0},PRODUCTION,GRADEH}},
{"LowMaxSPScroll","Mentality (Tier 2)"}, {"BestHighConSPPotion",{"SP Regeneration Potion (Tier 5)",{0,0,0},{5,0},PRODUCTION}},
{"NorMaxSPScroll","Mentality (Tier 3)"}, {"BestLowTHScroll",{"Aim(Tier 1)",{0,0,0},{4,1},PRODUCTION}},
{"HighMaxSPScroll","Mentality (Tier 4)"}, {"LowTHScroll",{"Aim(Tier 2)",{0,0,0},{4,1},PRODUCTION,GRADEL}},
{"BestHighMaxSPScroll","Mentality (Tier 5)"}, {"NorTHScroll",{"Aim(Tier 3)",{0,0,0},{4,1},PRODUCTION,GRADEM}},
{"NorMSScroll","Speed Increase (Tier 3)"}, {"HighTHScroll",{"Aim(Tier 4)",{0,0,0},{4,1},PRODUCTION,GRADEH}},
{"LowMSScroll","Speed Increase (Tier 2)"}, {"BestHighTHScroll",{"Aim(Tier 5)",{0,0,0},{4,1},PRODUCTION}},
{"HighMSScroll","Speed Increase (Tier 4)"}, {"BestLowTBScroll",{"Nature's Agility (Tier 1)",{0,0,0},{5,1},PRODUCTION}},
{"BestMSScroll","Speed Increase (Tier 5)"}, {"LowTBScroll",{"Nature's Agility (Tier 2)",{0,0,0},{5,1},PRODUCTION,GRADEL}},
{"BestLowMSScroll","Speed Increase (Tier 1)"}, {"NorTBScroll",{"Nature's Agility (Tier 3)",{0,0,0},{5,1},PRODUCTION,GRADEM}},
{"LowPsnResiPotion","Antitoxin (Tier 1)"}, {"HighTBScroll",{"Nature's Agility (Tier 4)",{0,0,0},{5,1},PRODUCTION,GRADEH}},
{"NorPsnResiPotion","Antitoxin (Tier 2)"}, {"BestHighTBScroll",{"Nature's Agility (Tier 5)",{0,0,0},{5,1},PRODUCTION}},
{"HighPsnResiPotion","Antitoxin (Tier 3)"}, {"BestLowMRScroll",{"Magical Defense (Tier 1)",{0,0,0},{6,1},PRODUCTION}},
{"LowDssResiPotion","Antibiotic (Tier 1)"}, {"LowMRScroll",{"Magical Defense (Tier 2)",{0,0,0},{6,1},PRODUCTION,GRADEL}},
{"NorDssResiPotion","Antibiotic (Tier 2)"}, {"NorMRScroll",{"Magical Defense (Tier 3)",{0,0,0},{6,1},PRODUCTION,GRADEM}},
{"HighDssResiPotion","Antibiotic (Tier 3)"}, {"HighMRScroll",{"Magical Defense (Tier 4)",{0,0,0},{6,1},PRODUCTION,GRADEH}},
{"LowCurResiPotion","Bless (Tier 1)"}, {"BestHighMRScroll",{"Magical Defense (Tier 5)",{0,0,0},{6,1},PRODUCTION}},
{"NorCurResiPotion","Bless (Tier 2)"}, {"BestLowACScroll",{"Shield Increase (Tier 1)",{0,0,0},{6,1},PRODUCTION}},
{"HighCurResiPotion","Bless (Tier 3)"}, {"LowACScroll",{"Shield Increase (Tier 2)",{0,0,0},{6,1},PRODUCTION,GRADEL}},
{"LowPsnCurPotion","Antidote (Tier 1)"}, {"NorACScroll",{"Shield Increase (Tier 3)",{0,0,0},{6,1},PRODUCTION,GRADEM}},
{"NorPsnCurPotion","Antidote (Tier 2)"}, {"HighACScroll",{"Shield Increase (Tier 4)",{0,0,0},{6,1},PRODUCTION,GRADEH}},
{"HighPsnCurPotion","Antidote (Tier 3)"}, {"BestHighACScroll",{"Shield Increase (Tier 5)",{0,0,0},{6,1},PRODUCTION}},
{"LowDssCurPotion","Cure (Tier 1)"}, {"BestLowMaxHPScroll",{"Vitality (Tier 1)",{0,0,0},{0,2},PRODUCTION}},
{"NorDssCurPotion","Cure (Tier 2)"}, {"LowMaxHPScroll",{"Vitality (Tier 2)",{0,0,0},{0,2},PRODUCTION,GRADEL}},
{"HighDssCurPotion","Cure (Tier 3)"}, {"NorMaxHPScroll",{"Vitality (Tier 3)",{0,0,0},{0,2},PRODUCTION,GRADEM}},
{"BestLowCurScroll","Divine Magic (Tier 1)"}, {"HighMaxHPScroll",{"Vitality (Tier 4)",{0,0,0},{0,2},PRODUCTION,GRADEH}},
{"LowCurScroll","Divine Magic (Tier 2)"}, {"BestHighMaxHPScroll",{"Vitality (Tier 5)",{0,0,0},{0,2},PRODUCTION}},
{"NorCurScroll","Divine Magic (Tier 3)"}, {"BestLowMaxSPScroll",{"Mentality (Tier 1)",{0,0,0},{1,2},PRODUCTION}},
{"HighCurScroll","Divine Magic (Tier 4)"}, {"LowMaxSPScroll",{"Mentality (Tier 2)",{0,0,0},{1,2},PRODUCTION,GRADEL}},
{"BestHighCurScroll","Divine Magic (Tier 5)"}, {"NorMaxSPScroll",{"Mentality (Tier 3)",{0,0,0},{1,2},PRODUCTION,GRADEM}},
{"NorBeastLeather","Beast Leather (Normal Quality)"}, {"HighMaxSPScroll",{"Mentality (Tier 4)",{0,0,0},{1,2},PRODUCTION,GRADEH}},
{"HighBeastLeather","Beast Leather (High Quality)"}, {"BestHighMaxSPScroll",{"Mentality (Tier 5)",{0,0,0},{1,2},PRODUCTION}},
{"BeastHead","Beast Head"}, {"NorMSScroll",{"Speed Increase (Tier 3)",{0,0,0},{1,2},PRODUCTION,GRADEM}},
{"NorBeastTooth","Beast Dogtooth (Normal Quality)"}, {"LowMSScroll",{"Speed Increase (Tier 2)",{0,0,0},{1,2},PRODUCTION,GRADEL}},
{"HighBeastTooth","Beast Dogtooth (High Quality)"}, {"HighMSScroll",{"Speed Increase (Tier 4)",{0,0,0},{1,2},PRODUCTION,GRADEH}},
{"NorBrokenBone","Bone (Normal Quality)"}, {"BestMSScroll",{"Speed Increase (Tier 5)",{0,0,0},{1,2},PRODUCTION}},
{"HighBrokenBone","Bone (High Quality)"}, {"BestLowMSScroll",{"Speed Increase (Tier 1)",{0,0,0},{1,2},PRODUCTION}},
{"BestBrokenBone","Bone (Highest Quality)"}, {"LowPsnResiPotion",{"Antitoxin (Tier 1)",{0,0,0},{6,0},PRODUCTION,GRADEL}},
{"NorCleanWater","Spirit's Nectar (Normal Quality)"}, {"NorPsnResiPotion",{"Antitoxin (Tier 2)",{0,0,0},{7,0},PRODUCTION,GRADEM}},
{"HighCleanWater","Spirit's Nectar (High Quality)"}, {"HighPsnResiPotion",{"Antitoxin (Tier 3)",{0,0,0},{0,1},PRODUCTION,GRADEH}},
{"BestCleanWater","Spirit's Nectar (Highest Quality)"}, {"LowDssResiPotion",{"Antibiotic (Tier 1)",{0,0,0},{6,0},PRODUCTION,GRADEL}},
{"IronBadge","Iron Badge"}, {"NorDssResiPotion",{"Antibiotic (Tier 2)",{0,0,0},{7,0},PRODUCTION,GRADEM}},
{"NorCopperOre","Copper Ore (Normal Quality)"}, {"HighDssResiPotion",{"Antibiotic (Tier 3)",{0,0,0},{0,1},PRODUCTION,GRADEH}},
{"HighCopperOre","Copper Ore (High Quality)"}, {"LowCurResiPotion",{"Bless (Tier 1)",{0,0,0},{6,0},PRODUCTION,GRADEL}},
{"NorGemDust","Gem Dust (Normal Quality)"}, {"NorCurResiPotion",{"Bless (Tier 2)",{0,0,0},{7,0},PRODUCTION,GRADEM}},
{"HighGemDust","Gem Dust (High Quality)"}, {"HighCurResiPotion",{"Bless (Tier 3)",{0,0,0},{0,1},PRODUCTION,GRADEH}},
{"BestGemDust","Gem Dust (Highest Quality)"}, {"LowPsnCurPotion",{"Antidote (Tier 1)",{0,0,0},{6,0},PRODUCTION,GRADEL}},
{"Violet","Vilolet"}, {"NorPsnCurPotion",{"Antidote (Tier 2)",{0,0,0},{7,0},PRODUCTION,GRADEM}},
{"Ramsear","Ramsear"}, {"HighPsnCurPotion",{"Antidote (Tier 3)",{0,0,0},{0,1},PRODUCTION,GRADEH}},
{"Salvia","Eucalyptus"}, {"LowDssCurPotion",{"Cure (Tier 1)",{0,0,0},{6,0},PRODUCTION,GRADEL}},
{"LowGoldOre","Gold Ore (Low Quality)"}, {"NorDssCurPotion",{"Cure (Tier 2)",{0,0,0},{7,0},PRODUCTION,GRADEM}},
{"NorGoldOre","Gold Ore (Normal Quality)"}, {"HighDssCurPotion",{"Cure (Tier 3)",{0,0,0},{0,1},PRODUCTION,GRADEH}},
{"HighGoldOre","Gold Ore (High Quality)"}, {"BestLowCurScroll",{"Divine Magic (Tier 1)",{0,0,0},{2,2},PRODUCTION}},
{"NorKylinLeather","Summoned Beast Leather (Normal Quality)"}, {"LowCurScroll",{"Divine Magic (Tier 2)",{0,0,0},{2,2},PRODUCTION,GRADEL}},
{"HighKylinLeather","Summoned Beast Leather (High Quality)"}, {"NorCurScroll",{"Divine Magic (Tier 3)",{0,0,0},{2,2},PRODUCTION,GRADEM}},
{"KylinTooth","Summoned Beast's Tooth"}, {"HighCurScroll",{"Divine Magic (Tier 4)",{0,0,0},{2,2},PRODUCTION,GRADEH}},
{"MermaidScale","Mermaid's Scale"}, {"BestHighCurScroll",{"Divine Magic (Tier 5)",{0,0,0},{2,2},PRODUCTION}},
{"KylinFighterTail","Summoned Beast Fighter's Tail"}, {"NorBeastLeather",{"Beast Leather (Normal Quality)",{255,255,0},{7,1}}},
{"NorMagicCrystal","Magic Crystal (Normal Quality)"}, {"HighBeastLeather",{"Beast Leather (High Quality)",{0,255,0},{0,2}}},
{"HighMagicCrystal","Magic Crystal (High Quality)"}, {"BeastHead",{"Beast Head",{0,255,255},{1,2}}},
{"BestMagicCrystal","Magic Crystal (Highest Quality)"}, {"NorBeastTooth",{"Beast Dogtooth (Normal Quality)",{255,255,0},{5,1}}},
{"NorMeat","Meat (Normal Quality)"}, {"HighBeastTooth",{"Beast Dogtooth (High Quality)",{0,255,0},{6,1}}},
{"HighMeat","Meat (High Quality)"}, {"NorBrokenBone",{"Bone (Normal Quality)",{255,255,0},{4,0}}},
{"BestMeat","Meat (Highest Quality)"}, {"HighBrokenBone",{"Bone (High Quality)",{0,255,0},{4,0}}},
{"NorMushrooms","Mushroom (Normal Quality)"}, {"BestBrokenBone",{"Bone (Highest Quality)",{0,255,255},{4,0}}},
{"HighMushrooms","Mushroom (High Quality)"}, {"NorCleanWater",{"Spirit's Nectar (Normal Quality)",{255,255,0},{7,5}}},
{"BestMushrooms","Mushroom (Highest Quality)"}, {"HighCleanWater",{"Spirit's Nectar (High Quality)",{0,255,0},{0,6}}},
{"NorPledge","Sign (Normal Quality)"}, {"BestCleanWater",{"Spirit's Nectar (Highest Quality)",{0,255,255},{0,6}}},
{"HighPledge","Sign (High Quality)"}, {"IronBadge",{"Iron Badge",{255,255,0},{2,4}}},
{"BestPledge","Sign (Highest Quality)"}, {"NorCopperOre",{"Copper Ore (Normal Quality)",{255,255,0},{4,4}}},
{"Rosemary","Rosemary"}, {"HighCopperOre",{"Copper Ore (High Quality)",{0,255,0},{5,4}}},
{"Basil","Basil"}, {"NorGemDust",{"Gem Dust (Normal Quality)",{255,255,0},{6,0}}},
{"Marigold","Marigold"}, {"HighGemDust",{"Gem Dust (High Quality)",{0,255,0},{6,0}}},
{"LowSilverOre","Silver Ore (Low Quality)"}, {"BestGemDust",{"Gem Dust (Highest Quality)",{0,255,255},{6,0}}},
{"NorSilverOre","Silver Ore (Normal Quality)"}, {"Violet",{"Vilolet",{0,0,0},{1,1},COLLECTIBLE2}},
{"HighSilverOre","Silver Ore (High Quality)"}, {"Ramsear",{"Ramsear",{0,0,0},{1,1},COLLECTIBLE2}},
{"NorSkin","Leather (Normal Quality)"}, {"Salvia",{"Eucalyptus",{255,255,255},{5,7}}},
{"HighSkin","Leather (High Quality)"}, {"LowGoldOre",{"Gold Ore (Low Quality)",{255,255,255},{1,6}}},
{"BestSkin","Leather (Highest Quality)"}, {"NorGoldOre",{"Gold Ore (Normal Quality)",{255,255,0},{2,6}}},
{"NorSoulDust","Soul Dust (Normal Quality)"}, {"HighGoldOre",{"Gold Ore (High Quality)",{0,255,0},{3,6}}},
{"HighSoulDust","Soul Dust (High Quality)"}, {"NorKylinLeather",{"Summoned Beast Leather (Normal Quality)",{255,255,0},{3,2}}},
{"BestSoulDust","Soul Dust (Highest Quality)"}, {"HighKylinLeather",{"Summoned Beast Leather (High Quality)",{0,255,0},{4,2}}},
{"NorSpiritDust","Spirit Dust (Normal Quality)"}, {"KylinTooth",{"Summoned Beast's Tooth",{0,255,0},{7,2}}},
{"HighSpiritDust","Spirit Dust (High Quality)"}, {"MermaidScale",{"Mermaid's Scale",{0,0,0},{2,3}}},
{"BestSpiritDust","Spirit Dust (Highest Quality)"}, {"KylinFighterTail",{"Summoned Beast Fighter's Tail",{255,255,0},{6,2}}},
{"NorToadStool","Toadstool (Normal Quality)"}, {"NorMagicCrystal",{"Magic Crystal (Normal Quality)",{255,255,0},{4,5}}},
{"HighToadStool","Toadstool (High Quality)"}, {"HighMagicCrystal",{"Magic Crystal (High Quality)",{0,255,0},{5,5}}},
{"BestToadStool","Toadstool (Highest Quality)"}, {"BestMagicCrystal",{"Magic Crystal (Highest Quality)",{0,255,255},{5,5}}},
{"Ruby","Ruby"}, {"NorMeat",{"Meat (Normal Quality)",{255,255,0},{1,0}}},
{"Sapphire","Sapphire"}, {"HighMeat",{"Meat (High Quality)",{0,255,0},{1,0}}},
{"NorWoodSab","Sap (Normal Quality)"}, {"BestMeat",{"Meat (Highest Quality)",{0,255,255},{1,0}}},
{"HighWoodSab","Sap (High Quality)"}, {"NorMushrooms",{"Mushroom (Normal Quality)",{255,255,0},{4,3}}},
{"BestWoodSab","Sap (Highest Quality)"}, {"HighMushrooms",{"Mushroom (High Quality)",{0,255,0},{4,3}}},
{"LowBeastLeather","Beast Leather (Low Quality)"}, {"BestMushrooms",{"Mushroom (Highest Quality)",{0,255,255},{4,3}}},
{"NorBeastLeather","Beast Leather (Normal Quality)"}, {"NorPledge",{"Sign (Normal Quality)",{255,255,0},{3,0}}},
{"HighBeastLeather","Beast Leather (High Quality)"}, {"HighPledge",{"Sign (High Quality)",{0,255,0},{3,0}}},
{"LowBeastTooth","Beast Dogtooth (Low Quality)"}, {"BestPledge",{"Sign (Highest Quality)",{0,255,255},{3,0}}},
{"NorBeastTooth","Beast Dogtooth (Normal Quality)"}, {"Rosemary",{"Rosemary",{0,255,0},{4,7}}},
{"HighBeastTooth","Beast Dogtooth (High Quality)"}, {"Basil",{"Basil",{0,255,255},{5,7}}},
{"LowBrokenBone","Bone (Low Quality)"}, {"Marigold",{"Marigold",{0,0,255},{6,7}}},
{"NorBrokenBone","Bone (Normal Quality)"}, {"LowSilverOre",{"Silver Ore (Low Quality)",{255,255,255},{6,4}}},
{"HighBrokenBone","Bone (High Quality)"}, {"NorSilverOre",{"Silver Ore (Normal Quality)",{255,255,0},{7,4}}},
{"LowCleanWater","Spirit's Nectar (Low Quality)"}, {"HighSilverOre",{"Silver Ore (High Quality)",{0,255,0},{0,5}}},
{"NorCleanWater","Spirit's Nectar (Normal Quality)"}, {"NorSkin",{"Leather (Normal Quality)",{255,255,0},{5,0}}},
{"HighCleanWater","Spirit's Nectar (High Quality)"}, {"HighSkin",{"Leather (High Quality)",{0,255,0},{5,0}}},
{"CommanderBadge","Master Commander's Badge"}, {"BestSkin",{"Leather (Highest Quality)",{0,255,255},{5,0}}},
{"LowCopperOre","Copper Ore (Low Quality)"}, {"NorSoulDust",{"Soul Dust (Normal Quality)",{255,255,0},{2,1}}},
{"NorCopperOre","Copper Ore (Normal Quality)"}, {"HighSoulDust",{"Soul Dust (High Quality)",{0,255,0},{2,1}}},
{"HighCopperOre","Copper Ore (High Quality)"}, {"BestSoulDust",{"Soul Dust (Highest Quality)",{0,255,255},{2,1}}},
{"LowGemDust","Gem Dust (Low Quality)"}, {"NorSpiritDust",{"Spirit Dust (Normal Quality)",{255,255,0},{0,0}}},
{"NorGemDust","Gem Dust (Normal Quality)"}, {"HighSpiritDust",{"Spirit Dust (High Quality)",{0,255,0},{0,0}}},
{"HighGemDust","Gem Dust (High Quality)"}, {"BestSpiritDust",{"Spirit Dust (Highest Quality)",{0,255,255},{0,0}}},
{"Geranium","Geranium"}, {"NorToadStool",{"Toadstool (Normal Quality)",{255,255,0},{3,3}}},
{"Violet","Vilolet"}, {"HighToadStool",{"Toadstool (High Quality)",{0,255,0},{3,3}}},
{"Ramsear","Ramsear"}, {"BestToadStool",{"Toadstool (Highest Quality)",{0,255,255},{3,3}}},
{"LowGoldOre","Gold Ore (Low Quality)"}, {"Ruby",{"Ruby",{255,255,0},{2,5}}},
{"NorGoldOre","Gold Ore (Normal Quality)"}, {"Sapphire",{"Sapphire",{0,255,0},{4,6}}},
{"LowKylinLeather","Summoned Beast Leather (Low Quality)"}, {"NorWoodSab",{"Sap (Normal Quality)",{255,255,0},{6,6}}},
{"NorKylinLeather","Summoned Beast Leather (Normal Quality)"}, {"HighWoodSab",{"Sap (High Quality)",{0,255,0},{7,6}}},
{"HighKylinLeather","Summoned Beast Leather (High Quality)"}, {"BestWoodSab",{"Sap (Highest Quality)",{0,255,255},{0,7}}},
{"KylinTail","Summoned Beast's Tail"}, {"LowBeastLeather",{"Beast Leather (Low Quality)",{255,255,255},{7,1}}},
{"LowMagicCrystal","Magic Crystal (Low Quality)"}, {"LowBeastTooth",{"Beast Dogtooth (Low Quality)",{255,255,255},{4,1}}},
{"LowBrokenBone",{"Bone (Low Quality)",{255,255,255},{4,0}}},
{"LowCleanWater",{"Spirit's Nectar (Low Quality)",{255,255,255},{6,5}}},
{"CommanderBadge",{"Master Commander's Badge",{255,255,255},{1,4}}},
{"LowCopperOre",{"Copper Ore (Low Quality)",{255,255,255},{3,4}}},
{"LowGemDust",{"Gem Dust (Low Quality)",{255,255,255},{6,0}}},
{"Geranium",{"Geranium",{0,0,0},{1,1},COLLECTIBLE2}},
{"LowKylinLeather",{"Summoned Beast Leather (Low Quality)",{255,255,255},{2,2}}},
{"KylinTail",{"Summoned Beast's Tail",{255,255,255},{5,2}}},
{"LowMagicCrystal",{"Magic Crystal (Low Quality)",{255,255,255},{3,5}}},
{"LowMeat",{"Meat (Low Quality)",{255,255,255},{1,0}}},
{"LowMushrooms",{"Mushroom (Low Quality)",{255,255,255},{4,3}}},
{"LowPledge",{"Sign (Low Quality)",{255,255,255},{3,0}}},
{"Sage",{"Sage",{255,255,0},{3,7}}},
{"LowSkin",{"Leather (Low Quality)",{255,255,255},{5,0}}},
{"LowSoulDust",{"Soul Dust (Low Quality)",{255,255,255},{2,1}}},
{"LowSpiritDust",{"Spirit Dust (Low Quality)",{255,255,255},{0,0}}},
{"LowToadStool",{"Toadstool (Low Quality)",{255,255,255},{3,3}}},
{"Topaz",{"Topaz",{255,255,255},{1,5}}},
{"LowWoodSab",{"Sap (Low Quality)",{255,255,255},{5,6}}},
{"LowSlimeJelly",{"Slime Jelly (Low Quality)",{255,255,255},{0,3}}},
{"HighSlimeJelly",{"Slime Jelly (High Quality)",{255,255,0},{1,3}}},
{"Converter1",{"Alchemy Stone[1]",{255,255,255},{4,2},PRODUCTION}},
{"Converter3",{"Alchemy Stone[3]",{0,255,0},{4,2},PRODUCTION}},
{"Converter5",{"Alchemy Stone[5]",{0,255,255},{4,2},PRODUCTION}},
{"Converter2",{"Alchemy Stone[2]",{255,255,0},{4,2},PRODUCTION}},
{"Converter4",{"Alchemy Stone[4]",{0,255,255},{4,2},PRODUCTION}},
}; };
class Recipe{ class Recipe{
@ -250,7 +276,7 @@ class FiestaCraftingCalculator : public olc::PixelGameEngine
CompProd=new ImageCheckBox(manager,FiestaCraftingCalculator::ProdIcon,false,displayPos+vi2d{145,10},{40,40},{96,160},{32,32}); CompProd=new ImageCheckBox(manager,FiestaCraftingCalculator::ProdIcon,false,displayPos+vi2d{145,10},{40,40},{96,160},{32,32});
DecompProd=new ImageCheckBox(manager,FiestaCraftingCalculator::ProdIcon,false,displayPos+vi2d{190,10},{40,40},{64,160},{32,32}); DecompProd=new ImageCheckBox(manager,FiestaCraftingCalculator::ProdIcon,false,displayPos+vi2d{190,10},{40,40},{64,160},{32,32});
CloseButton=new CustomButton(manager,FiestaCraftingCalculator::CloseIcon,FiestaCraftingCalculator::CloseBackIcon,displayPos+vf2d{PANEL_WIDTH-30.f,0},{26,26},{0,0},{26,26}); CloseButton=new CustomButton(manager,FiestaCraftingCalculator::CloseIcon,FiestaCraftingCalculator::CloseBackIcon,displayPos+vf2d{PANEL_WIDTH-30.f,0},{26,26},{0,0},{26,26});
RecipeList=new ListBox(manager,recipeItems,displayPos+vi2d{10,90},{240,140}); RecipeList=new ListBox(manager,recipeItems,displayPos+vi2d{10,90},{300,140},16);
RecipeList->bVisible=false; RecipeList->bVisible=false;
} }
bool Update(FiestaCraftingCalculator*pge,int panelNumber){ bool Update(FiestaCraftingCalculator*pge,int panelNumber){
@ -262,8 +288,8 @@ class FiestaCraftingCalculator : public olc::PixelGameEngine
DecompProd->vPos=displayPos+vi2d{190,10}; DecompProd->vPos=displayPos+vi2d{190,10};
CloseButton->vPos=displayPos+vf2d{PANEL_WIDTH-30.f,0}; CloseButton->vPos=displayPos+vf2d{PANEL_WIDTH-30.f,0};
RecipeList->vPos=displayPos+vi2d{10,90}; RecipeList->vPos=displayPos+vi2d{10,90};
RecipeList->m_pSlider->vPosMin=displayPos+vi2d{10,90}+vf2d{240 - manager.fGrabRad - 1,manager.fGrabRad + 1 }; RecipeList->m_pSlider->vPosMin=displayPos+vi2d{10,90}+vf2d{300 - manager.fGrabRad - 1,manager.fGrabRad + 1 };
RecipeList->m_pSlider->vPosMax=displayPos+vi2d{10,90}+vf2d{240 - manager.fGrabRad - 1,140-manager.fGrabRad - 1 }; RecipeList->m_pSlider->vPosMax=displayPos+vi2d{10,90}+vf2d{300 - manager.fGrabRad - 1,140-manager.fGrabRad - 1 };
manager.Update(pge); manager.Update(pge);
DisplayProdText=SelectedProdText; DisplayProdText=SelectedProdText;
if(CloseButton->bPressed){ if(CloseButton->bPressed){

@ -177,7 +177,7 @@
24036 Recipe_R_NorGoldOre Gold Ore NorGoldOre 1 HighGoldOre 1 Converter5 1 - 0 - 0 - 0 - 0 - 0 - 0 5 60 5 100000 24036 Recipe_R_NorGoldOre Gold Ore NorGoldOre 1 HighGoldOre 1 Converter5 1 - 0 - 0 - 0 - 0 - 0 - 0 5 60 5 100000
24038 Recipe_R_LowKylinLeather Summoned Beast Leather (Low Quality) LowKylinLeather 14 NorKylinLeather 1 Converter2 1 - 0 - 0 - 0 - 0 - 0 - 0 5 2 5 1000 24038 Recipe_R_LowKylinLeather Summoned Beast Leather (Low Quality) LowKylinLeather 14 NorKylinLeather 1 Converter2 1 - 0 - 0 - 0 - 0 - 0 - 0 5 2 5 1000
24039 Recipe_R_NorKylinLeather Summoned Beast Leather NorKylinLeather 3 HighKylinLeather 1 Converter3 1 - 0 - 0 - 0 - 0 - 0 - 0 5 12 5 24000 24039 Recipe_R_NorKylinLeather Summoned Beast Leather NorKylinLeather 3 HighKylinLeather 1 Converter3 1 - 0 - 0 - 0 - 0 - 0 - 0 5 12 5 24000
24040 Recipe_R_HighKylinLeather Material Decomposition :Summoned Beast Leather (High Quality) HighKylinLeather 2 KylinTooth 1 Converter5 1 - 0 - 0 - 0 - 0 - 0 - 0 5 40 5 100000 24040 Recipe_R_HighKylinLeather Summoned Beast Leather (High Quality) HighKylinLeather 2 KylinTooth 1 Converter5 1 - 0 - 0 - 0 - 0 - 0 - 0 5 40 5 100000
24041 Recipe_R_KylinTail Summoned Beast's Tail KylinTail 3 KylinFighterTail 1 Converter3 1 - 0 - 0 - 0 - 0 - 0 - 0 5 10 5 18000 24041 Recipe_R_KylinTail Summoned Beast's Tail KylinTail 3 KylinFighterTail 1 Converter3 1 - 0 - 0 - 0 - 0 - 0 - 0 5 10 5 18000
24042 Recipe_R_LowMagicCrystal Magic Crystal (Low Quality) LowMagicCrystal 19 NorMagicCrystal 1 Converter1 1 - 0 - 0 - 0 - 0 - 0 - 0 5 2 5 400 24042 Recipe_R_LowMagicCrystal Magic Crystal (Low Quality) LowMagicCrystal 19 NorMagicCrystal 1 Converter1 1 - 0 - 0 - 0 - 0 - 0 - 0 5 2 5 400
24043 Recipe_R_NorMagicCrystal Magic Crystal NorMagicCrystal 4 HighMagicCrystal 1 Converter3 1 - 0 - 0 - 0 - 0 - 0 - 0 5 12 5 30000 24043 Recipe_R_NorMagicCrystal Magic Crystal NorMagicCrystal 4 HighMagicCrystal 1 Converter3 1 - 0 - 0 - 0 - 0 - 0 - 0 5 12 5 30000

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

@ -363,7 +363,8 @@ namespace olc::QuickGUI
ListBox(olc::QuickGUI::Manager& manager, // Associate with a Manager ListBox(olc::QuickGUI::Manager& manager, // Associate with a Manager
std::vector<std::string>& vList, std::vector<std::string>& vList,
const olc::vf2d& pos, // Location of list top-left const olc::vf2d& pos, // Location of list top-left
const olc::vf2d& size); // Size of list const olc::vf2d& size, // Location of list top-left
const float fontSize=10); // Size of list
// Position of list // Position of list
olc::vf2d vPos; olc::vf2d vPos;
@ -379,6 +380,7 @@ namespace olc::QuickGUI
Manager m_group; Manager m_group;
size_t m_nVisibleItems = 0; size_t m_nVisibleItems = 0;
std::vector<std::string>& m_vList; std::vector<std::string>& m_vList;
float fontSize=10;
public: public:
// Item currently selected // Item currently selected
@ -1078,8 +1080,8 @@ namespace olc::QuickGUI
#pragma endregion #pragma endregion
#pragma region ListBox #pragma region ListBox
ListBox::ListBox(olc::QuickGUI::Manager& manager, std::vector<std::string>& vList, const olc::vf2d& pos, const olc::vf2d& size) ListBox::ListBox(olc::QuickGUI::Manager& manager, std::vector<std::string>& vList, const olc::vf2d& pos, const olc::vf2d& size, const float fontSize)
: BaseControl(manager), m_vList(vList) : BaseControl(manager), m_vList(vList), fontSize(fontSize)
{ {
m_group.CopyThemeFrom(m_manager); m_group.CopyThemeFrom(m_manager);
vPos = pos; vPos = pos;
@ -1099,16 +1101,11 @@ namespace olc::QuickGUI
bHovered=pge->GetMouseX() >= vPos.x && pge->GetMouseX() < vPos.x + vSize.x && bHovered=pge->GetMouseX() >= vPos.x && pge->GetMouseX() < vPos.x + vSize.x &&
pge->GetMouseY() >= vPos.y && pge->GetMouseY() < vPos.y + vSize.y; pge->GetMouseY() >= vPos.y && pge->GetMouseY() < vPos.y + vSize.y;
if(bHovered){ if (pge->GetMouse(olc::Mouse::LEFT).bHeld)
std::cout<<"Hovering"<<std::endl;
}
if (pge->GetMouse(olc::Mouse::LEFT).bPressed)
{ {
if (vMouse.x >= 0 && vMouse.x < vSize.x - (m_group.fGrabRad * 2) && vMouse.y >= 0 && vMouse.y < vSize.y) if (vMouse.x >= 0 && vMouse.x < vSize.x - (m_group.fGrabRad * 2) && vMouse.y >= 0 && vMouse.y < vSize.y)
{ {
nSelectedItem = size_t(m_pSlider->fValue + vMouse.y / fontSize);
nSelectedItem = size_t(m_pSlider->fValue + vMouse.y / 10);
} }
} }
@ -1117,7 +1114,7 @@ namespace olc::QuickGUI
bSelectionChanged = nSelectedItem != nPreviouslySelectedItem; bSelectionChanged = nSelectedItem != nPreviouslySelectedItem;
m_pSlider->fMax = float(m_vList.size()-vSize.y/10+1); m_pSlider->fMax = float(m_vList.size()-vSize.y/fontSize+1);
if(bHovered&&pge->GetMouseWheel()!=0){ if(bHovered&&pge->GetMouseWheel()!=0){
if(pge->GetMouseWheel()>0){ if(pge->GetMouseWheel()>0){
@ -1127,6 +1124,8 @@ namespace olc::QuickGUI
} }
} }
m_pSlider->fValue=int(m_pSlider->fValue);
m_group.Update(pge); m_group.Update(pge);
} }
@ -1145,15 +1144,15 @@ namespace olc::QuickGUI
size_t idx0 = size_t(m_pSlider->fValue); size_t idx0 = size_t(m_pSlider->fValue);
size_t idx1 = std::min(idx0 + size_t((vSize.y - 4) / 10), m_vList.size()); size_t idx1 = std::min(idx0 + size_t((vSize.y - 4) / fontSize), m_vList.size());
olc::vf2d vTextPos = vPos + olc::vf2d(2,2); olc::vf2d vTextPos = vPos + olc::vf2d(2,2);
for (size_t idx = idx0; idx < idx1; idx++) for (size_t idx = idx0; idx < idx1; idx++)
{ {
if (idx == nSelectedItem) if (idx == nSelectedItem)
pge->FillRect(vTextPos - olc::vi2d(1,-1), {int32_t(vSize.x - m_group.fGrabRad * 2), 10}, m_group.colHover); pge->FillRect(vTextPos - olc::vi2d(1,-1), {int32_t(vSize.x - m_group.fGrabRad * 2), int(fontSize)}, m_group.colHover);
pge->DrawStringProp(vTextPos + olc::vi2d(0,2), m_vList[idx]); pge->DrawStringProp(vTextPos + olc::vi2d(0,2), m_vList[idx],olc::WHITE,fontSize/10);
vTextPos.y += 10; vTextPos.y += fontSize;
} }
m_group.Draw(pge); m_group.Draw(pge);
@ -1168,15 +1167,21 @@ namespace olc::QuickGUI
pge->FillRectDecal(vPos + olc::vf2d(1, 1), vSize - olc::vf2d(2, 2), m_manager.colNormal); pge->FillRectDecal(vPos + olc::vf2d(1, 1), vSize - olc::vf2d(2, 2), m_manager.colNormal);
size_t idx0 = size_t(m_pSlider->fValue); size_t idx0 = size_t(m_pSlider->fValue);
size_t idx1 = std::min(idx0 + size_t((vSize.y - 4) / 10), m_vList.size()); size_t idx1 = std::min(idx0 + size_t((vSize.y - 4) / fontSize), m_vList.size());
olc::vf2d vTextPos = vPos + olc::vf2d(2, 2); olc::vf2d vTextPos = vPos + olc::vf2d(2, 2);
for (size_t idx = idx0; idx < idx1; idx++) for (size_t idx = idx0; idx < idx1; idx++)
{ {
if (idx == nSelectedItem) if (idx == nSelectedItem)
pge->FillRectDecal(vTextPos - olc::vi2d(1, -1), { vSize.x - m_group.fGrabRad * 2.0f, 10.0f }, m_group.colHover); pge->FillRectDecal(vTextPos - olc::vi2d(1, -1), { vSize.x - m_group.fGrabRad * 2.0f, fontSize }, m_group.colHover);
pge->DrawStringPropDecal(vTextPos + olc::vi2d(0,2), m_vList[idx]); float width = pge->GetTextSizeProp(m_vList[idx]).x*fontSize/10;
vTextPos.y += 10; if (width>vSize.x-m_manager.fGrabRad*2){
float scaleX = (vSize.x-m_manager.fGrabRad*2)/width;
pge->DrawStringPropDecal(vTextPos + olc::vi2d(0,2), m_vList[idx], olc::WHITE, olc::vf2d{scaleX,1}*fontSize/10);
} else {
pge->DrawStringPropDecal(vTextPos + olc::vi2d(0,2), m_vList[idx], olc::WHITE, olc::vf2d{1,1}*fontSize/10);
}
vTextPos.y += fontSize;
} }
if (bHasBorder) if (bHasBorder)

Loading…
Cancel
Save