From: Daniel Karbach Date: Tue, 6 Nov 2012 21:51:02 +0000 (+0100) Subject: added menu cursor "active" sprite X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=5ada219caec0535c3a3ad9a120bc4abd341d1f81;p=l2e.git added menu cursor "active" sprite --- diff --git a/src/main.cpp b/src/main.cpp index 5ea2a03..d76eca5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -294,6 +294,9 @@ int main(int argc, char **argv) { menuResources.normalFont = &menuFont; graphics::Sprite menuCursor(IMG_Load("test-data/menu-cursor.png"), 32, 16); + menuResources.menuCursor = &menuCursor; + graphics::Sprite menuActiveCursor(IMG_Load("test-data/menu-cursor-active.png"), 32, 18); + menuResources.menuActiveCursor = &menuActiveCursor; graphics::MenuProperties mainMenuProperties; mainMenuProperties.cols = 2; diff --git a/src/menu/Resources.cpp b/src/menu/Resources.cpp index 87abfa5..28f5cb6 100644 --- a/src/menu/Resources.cpp +++ b/src/menu/Resources.cpp @@ -14,6 +14,9 @@ Resources::Resources() , normalFont(0) , statusFont(0) +, menuCursor(0) +, menuActiveCursor(0) + , statusLabels(0) , statusFrame(0) diff --git a/src/menu/Resources.h b/src/menu/Resources.h index 32d393e..05ceaf3 100644 --- a/src/menu/Resources.h +++ b/src/menu/Resources.h @@ -19,6 +19,9 @@ struct Resources { graphics::Font *normalFont; graphics::Font *statusFont; + graphics::Sprite *menuCursor; + graphics::Sprite *menuActiveCursor; + graphics::Sprite *statusLabels; graphics::Frame *statusFrame; diff --git a/test-data/menu-cursor-active.png b/test-data/menu-cursor-active.png new file mode 100644 index 0000000..bee2487 Binary files /dev/null and b/test-data/menu-cursor-active.png differ