- Timestamp:
- 05/15/08 01:57:12 (6 months ago)
- Location:
- lang/d/koke/trunk
- Files:
-
- 3 modified
-
clickable.d (modified) (3 diffs)
-
gamecore.d (modified) (2 diffs)
-
hell2.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/d/koke/trunk/clickable.d
r6347 r11612 66 66 67 67 void draw(bool selected,bool onMouse){ 68 int x = cast(int)position.x; 69 int y = cast(int)position.y; 70 if( x < 0 ) x += hell2.getScreenWidth(); 71 if( y < 0 ) y += hell2.getScreenHeight(); 72 68 73 if(type_style[type] == LRG){ 69 74 // イメージボタン大 70 75 if(selected){ // 選択状態 71 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y76 Hell_drawTexture("menu" , x , y 72 77 , getWidth() * 2 , 0 , getWidth() , getHeight()); 73 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y78 Hell_drawTexture("menu" , x , y 74 79 , 0 , (cast(int)type + 1) * getHeight() 75 80 , getWidth() , getHeight() 76 81 ,1,1,0, 255,255,255); 77 82 }else if(onMouse){ // onMouse状態 78 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y83 Hell_drawTexture("menu" , x , y 79 84 , getWidth() , 0 , getWidth() , getHeight()); 80 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y85 Hell_drawTexture("menu" , x , y 81 86 , 0 , (cast(int)type + 1) * getHeight() 82 87 , getWidth() , getHeight() 83 88 ,1,1,0, 64,64,64); 84 89 }else{ // 他 85 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y90 Hell_drawTexture("menu" , x , y 86 91 , 0 , 0 , getWidth() , getHeight()); 87 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y92 Hell_drawTexture("menu" , x , y 88 93 , 0 , (cast(int)type + 1) * getHeight() 89 94 , getWidth() , getHeight() … … 95 100 int alpha = (onMouse || selected) ? 255 : 128; 96 101 if(selected){ // 選択状態 97 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y102 Hell_drawTexture("menu" , x , y 98 103 , 242 , (cast(int)type - TYPE.ECONOMY) * getHeight() 99 104 , getWidth() , getHeight() 100 105 ,1,1,0, 255,255,255,alpha); 101 106 }else{ // 非選択状態 102 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y107 Hell_drawTexture("menu" , x , y 103 108 , 242 , (cast(int)type - TYPE.ECONOMY) * getHeight() 104 109 , getWidth() , getHeight() … … 110 115 int alpha = (onMouse || selected) ? 255 : 128; 111 116 if(selected){ // 選択状態 112 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y117 Hell_drawTexture("menu" , x , y 113 118 , 306 , (cast(int)type - TYPE.STOP) * getHeight() 114 119 , getWidth() , getHeight() 115 120 ,1,1,0, 255,255,255,alpha); 116 121 }else{ // 非選択状態 117 Hell_drawTexture("menu" , cast(int)position.x , cast(int)position.y122 Hell_drawTexture("menu" , x , y 118 123 , 306 , (cast(int)type - TYPE.STOP) * getHeight() 119 124 , getWidth() , getHeight() -
lang/d/koke/trunk/gamecore.d
r11608 r11612 106 106 // 画面下・ツールメニュー 107 107 menu = new ClickablePool(false /* 非選択状態は選べない */); 108 menu.add("del" , new Vec3(getScreenWidth() - ImageButton.BUTTON_WIDTH*4 109 , getScreenHeight() - ImageButton.BUTTON_HEIGHT ,0) 108 menu.add("del" , new Vec3( -ImageButton.BUTTON_WIDTH*4 , -ImageButton.BUTTON_HEIGHT ,0) 110 109 , ImageButton.TYPE.DEL); 111 menu.add("herbicide" , new Vec3(getScreenWidth() - ImageButton.BUTTON_WIDTH*3 112 , getScreenHeight() - ImageButton.BUTTON_HEIGHT ,0) 110 menu.add("herbicide" , new Vec3( -ImageButton.BUTTON_WIDTH*3 , -ImageButton.BUTTON_HEIGHT ,0) 113 111 , ImageButton.TYPE.HERBICIDE); 114 menu.add("manage_ray" , new Vec3(getScreenWidth() - ImageButton.BUTTON_WIDTH*2 115 , getScreenHeight() - ImageButton.BUTTON_HEIGHT ,0) 112 menu.add("manage_ray" , new Vec3( -ImageButton.BUTTON_WIDTH*2 , -ImageButton.BUTTON_HEIGHT ,0) 116 113 , ImageButton.TYPE.MANAGE_RAY); 117 menu.add("call_nico" , new Vec3(getScreenWidth() - ImageButton.BUTTON_WIDTH*1 118 , getScreenHeight() - ImageButton.BUTTON_HEIGHT ,0) 114 menu.add("call_nico" , new Vec3( -ImageButton.BUTTON_WIDTH*1 , -ImageButton.BUTTON_HEIGHT ,0) 119 115 , ImageButton.TYPE.CALL_NICO); 120 menu.add("up" , new Vec3(getScreenWidth() - ImageButton.BUTTON_WIDTH*2 121 , getScreenHeight() - ImageButton.BUTTON_HEIGHT * 2 ,0) 116 menu.add("up" , new Vec3( -ImageButton.BUTTON_WIDTH*2 , -ImageButton.BUTTON_HEIGHT * 2 ,0) 122 117 , ImageButton.TYPE.UP); 123 menu.add("fence" , new Vec3(getScreenWidth() - ImageButton.BUTTON_WIDTH*1 124 , getScreenHeight() - ImageButton.BUTTON_HEIGHT * 2 ,0) 118 menu.add("fence" , new Vec3( -ImageButton.BUTTON_WIDTH*1 , -ImageButton.BUTTON_HEIGHT * 2 ,0) 125 119 , ImageButton.TYPE.FENCE); 126 120 127 121 // 画面上・チャートスイッチ 128 122 chart_switch = new ClickablePool(); 129 chart_switch.add("on" , new Vec3( getScreenWidth() -64*2 , 0 ,0)123 chart_switch.add("on" , new Vec3( -64*2 , 0 ,0) 130 124 , ImageButton.TYPE.CHART); 131 125 132 126 // 画面上・エコノミースイッチ 133 127 economy_switch = new ClickablePool(); 134 economy_switch.add("on" , new Vec3( getScreenWidth() -64 , 0 ,0)128 economy_switch.add("on" , new Vec3( -64 , 0 ,0) 135 129 , ImageButton.TYPE.ECONOMY); 136 130 137 131 // 画面上・速度調整スイッチ 138 132 speed_switch = new ClickablePool(false /* 非選択状態は選べない */); 139 speed_switch.add("play" , new Vec3( getScreenWidth() -32*3 , 16 ,0)133 speed_switch.add("play" , new Vec3( -32*3 , 16 ,0) 140 134 , ImageButton.TYPE.PLAY); 141 speed_switch.add("stop" , new Vec3( getScreenWidth() -32*4 , 16 ,0)135 speed_switch.add("stop" , new Vec3( -32*4 , 16 ,0) 142 136 , ImageButton.TYPE.STOP); 143 speed_switch.add("ksk" , new Vec3( getScreenWidth() -32*2 , 16 ,0)137 speed_switch.add("ksk" , new Vec3( -32*2 , 16 ,0) 144 138 , ImageButton.TYPE.KSK); 145 speed_switch.add("danger" , new Vec3( getScreenWidth() -32*1 , 16 ,0)139 speed_switch.add("danger" , new Vec3( -32*1 , 16 ,0) 146 140 , ImageButton.TYPE.DANGER); 147 141 } … … 436 430 // fps/cpu 437 431 Hell_drawFPS( 8 , getScreenHeight() - 24 ); 438 439 440 Hell_drawFont(std.string.toString(Hell_getMouseX()) ~ " / " ~ std.string.toString(Hell_getMouseY()) ,441 8,442 40,443 2,444 255, 255, 255445 );446 432 } 447 433 -
lang/d/koke/trunk/hell2.d
r11608 r11612 240 240 { 241 241 g_videoFlags |= SDL_RESIZABLE; 242 std.stdio.writefln("RESIZABLE");243 242 } 244 243
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)