1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-01-24 17:26:41 +00:00

Implement configurable screenshot key

This commit is contained in:
fgenesis 2016-07-14 04:59:08 +02:00
parent a043dd852f
commit dcd4fe6c86
5 changed files with 12 additions and 12 deletions

View file

@ -673,8 +673,8 @@ void DSQ::debugMenu()
void DSQ::takeScreenshotKey()
{
if (core->getCtrlState() && core->getAltState())
takeScreenshot();
if (getCtrlState() && getAltState())
screenshot();
}
Quad *loading=0;
@ -1754,13 +1754,6 @@ void DSQ::toggleRenderCollisionShapes()
RenderObject::renderCollisionShape = !RenderObject::renderCollisionShape;
}
void DSQ::takeScreenshot()
{
doScreenshot = true;
}
void DSQ::unloadDevice()
{
destroyFonts();
@ -3738,6 +3731,11 @@ void DSQ::action(int id, int state, int source)
}
}
}
if(id == ACTION_SCREENSHOT && state)
{
screenshot();
}
}
void DSQ::bindInput()
@ -3759,8 +3757,8 @@ void DSQ::bindInput()
addAction(MakeFunctionEvent(DSQ, toggleRenderCollisionShapes), KEY_RETURN, 0);
}
addAction(MakeFunctionEvent(DSQ, debugMenu), KEY_BACKSPACE, 0);
addAction(MakeFunctionEvent(DSQ, takeScreenshot ), KEY_PRINTSCREEN, 0);
addAction(MakeFunctionEvent(DSQ, takeScreenshotKey ), KEY_P, 0);
//addAction(MakeFunctionEvent(DSQ, takeScreenshotKey ), KEY_P, 0);
user.control.actionSet.importAction(this, "Screenshot", ACTION_SCREENSHOT);
}
void DSQ::jiggleCursor()

View file

@ -323,7 +323,6 @@ public:
std::string dialogueFile;
void takeScreenshot();
void takeScreenshotKey();
void generateCollisionMask(RenderObject *r);

View file

@ -110,6 +110,7 @@ enum AquariaActions
ACTION_LOOK ,
ACTION_TOGGLEHELPSCREEN,
ACTION_PLACE_AVATAR,
ACTION_SCREENSHOT,
};
enum AuraType

View file

@ -330,6 +330,7 @@ void UserSettings::load(bool doApply, const std::string &overrideFile)
control.actionSet.addActionInput("FoodDrop");
control.actionSet.addActionInput("Look");
control.actionSet.addActionInput("ToggleHelp");
control.actionSet.addActionInput("Screenshot");
XMLElement *xml_system = doc.FirstChildElement("System");
if (xml_system)

View file

@ -241,6 +241,7 @@
2129 Song Slot #
2130 Category
2131 Mouse
2132 Take Screenshot
2150 Movement
2151 Menu
2152 Quick Keys