Permalink
Browse files

finish / fix ecb0895

must have accidentally reverted Keys.h halfway through making it?
  • Loading branch information...
jacob1 committed Jul 23, 2016
1 parent 21e0c40 commit f0f104097da333c0d6e5be98c5d02620b0a86842
@@ -7,3 +7,4 @@ std::string ClipboardPull();
int GetModifiers();
bool LoadWindowPosition(int scale);
void SetCursorEnabled(int enabled);
unsigned int GetTicks();
@@ -22,6 +22,7 @@ void ClipboardPush(std::string) {}
std::string ClipboardPull() { return ""; }
int GetModifiers() { return 0; }
void SetCursorEnabled(int enabled) {}
unsigned int GetTicks() { return 0; }
void readFile(std::string filename, std::vector<char> & storage)
{
@@ -519,6 +519,11 @@ void SetCursorEnabled(int enabled)
SDL_ShowCursor(enabled);
}
unsigned int GetTicks()
{
return SDL_GetTicks();
}
std::map<std::string, std::string> readArguments(int argc, char * argv[])
{
std::map<std::string, std::string> arguments;
@@ -236,9 +236,9 @@ void PropertyWindow::OnDraw()
void PropertyWindow::OnKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool alt)
{
if (key == KEY_UP)
if (key == SDLK_UP)
property->SetOption(property->GetOption().second-1);
else if (key == KEY_DOWN)
else if (key == SDLK_DOWN)
property->SetOption(property->GetOption().second+1);
}
@@ -1,5 +1,6 @@
#include "ToolButton.h"
#include "gui/interface/Keys.h"
#include "gui/interface/Mouse.h"
#include "Favorite.h"
ToolButton::ToolButton(ui::Point position, ui::Point size, std::string text_, std::string toolIdentifier, std::string toolTip):
@@ -25,11 +26,11 @@ void ToolButton::OnMouseUnclick(int x, int y, unsigned int button)
if(isButtonDown)
{
isButtonDown = false;
if(button == BUTTON_LEFT)
if(button == SDL_BUTTON_LEFT)
SetSelectionState(0);
if(button == BUTTON_RIGHT)
if(button == SDL_BUTTON_RIGHT)
SetSelectionState(1);
if(button == BUTTON_MIDDLE)
if(button == SDL_BUTTON_MIDDLE)
SetSelectionState(2);
DoAction();
}
@@ -9,6 +9,7 @@
#include "graphics/Graphics.h"
#include "ContextMenu.h"
#include "Keys.h"
#include "Mouse.h"
namespace ui {
@@ -79,7 +80,7 @@ void AvatarButton::OnContextMenuAction(int item)
void AvatarButton::OnMouseClick(int x, int y, unsigned int button)
{
if(button == BUTTON_RIGHT)
if(button == SDL_BUTTON_RIGHT)
{
if(menu)
menu->Show(GetScreenPos() + ui::Point(x, y));
Oops, something went wrong.

0 comments on commit f0f1040

Please sign in to comment.