Skip to content

Commit

Permalink
Merge pull request #89 from huhuhu0420/main
Browse files Browse the repository at this point in the history
add btn background
  • Loading branch information
nonorze-VOXX authored Jun 15, 2023
2 parents 378f2ec + 8d1f3a4 commit 660abb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Binary file added Resources/medal/back.bmp
Binary file not shown.
1 change: 1 addition & 0 deletions Source/Game/mygame.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ namespace game_framework
void OnShow() override; // 顯示這個狀態的遊戲畫面
private:
Btd::Button _mapButton[3];
Btd::GameObject ButtonBack;
Btd::DB db;
};

Expand Down
5 changes: 4 additions & 1 deletion Source/Game/mygame_initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ void CGameStateInit::OnBeginState()
{"resources/medal/medium.bmp", "resources/medal/medium_medal.bmp", "resources/medal/play.bmp"},
{"resources/medal/hard.bmp", "resources/medal/hard_medal.bmp", "resources/medal/play.bmp"}
};
ButtonBack.LoadBitmapByString({"resources/medal/back.bmp"}, RGB(0, 0, 0));
ButtonBack.SetCenter(390, 325);
for (int i=0; i<3; i++)
{
_mapButton[i].LoadBitmapByString(medalPath[i]);
_mapButton[i].LoadBitmapByString(medalPath[i], RGB(255, 255, 255));
_mapButton[i].SetFrameIndexOfBitmap(passedMap[i]);
}
}
Expand Down Expand Up @@ -130,6 +132,7 @@ void CGameStateInit::OnShow()
{
map->ShowBackground();
map->ShowRoad();
ButtonBack.ShowBitmap();
for (int i = 0; i < 3; i++)
{
_mapButton[i].ShowBitmap();
Expand Down

0 comments on commit 660abb1

Please sign in to comment.