mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-02-23 15:38:29 +01:00
Styled worldmap. Default generated worldmap tilesize changed from 12 to 8 pixels.
This commit is contained in:
@@ -1,9 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/displayworldmap_webview"
|
||||
>
|
||||
android:orientation="vertical"
|
||||
>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/ui_gradientshape"
|
||||
android:padding="@dimen/boxshape_margin"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dip"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/menu_button_worldmap"
|
||||
style="@style/textWithIcon"
|
||||
android:textSize="@dimen/titletext"
|
||||
android:drawableLeft="@android:drawable/ic_dialog_map"
|
||||
|
||||
/>
|
||||
|
||||
</WebView>
|
||||
<Button
|
||||
android:id="@+id/displayworldmap_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:text="@string/dialog_close"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<WebView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:id="@+id/displayworldmap_webview"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -507,5 +507,6 @@
|
||||
<string name="menu_button_worldmap">Map</string>
|
||||
<string name="menu_button_worldmap_failed">Map cannot be displayed.</string>
|
||||
<string name="display_worldmap_not_available">The map cannot be displayed from this location.</string>
|
||||
<string name="display_worldmap_title">Map</string>
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="translucent_black">#80000000</color>
|
||||
<color name="displayworldmap_background">#423921</color>
|
||||
</resources>
|
||||
|
||||
@@ -5,7 +5,10 @@ import java.io.File;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.gpl.rpg.AndorsTrail.AndorsTrailApplication;
|
||||
@@ -35,10 +38,18 @@ public class DisplayWorldMapActivity extends Activity {
|
||||
setContentView(R.layout.displayworldmap);
|
||||
|
||||
displayworldmap_webview = (WebView) findViewById(R.id.displayworldmap_webview);
|
||||
displayworldmap_webview.setBackgroundColor(getResources().getColor(android.R.color.black));
|
||||
displayworldmap_webview.setBackgroundColor(getResources().getColor(R.color.displayworldmap_background));
|
||||
displayworldmap_webview.getSettings().setBuiltInZoomControls(true);
|
||||
enableJavascript();
|
||||
|
||||
Button b = (Button) findViewById(R.id.displayworldmap_close);
|
||||
b.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
DisplayWorldMapActivity.this.finish();
|
||||
}
|
||||
});
|
||||
|
||||
worldMapSegmentName = getIntent().getStringExtra("worldMapSegmentName");
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.gpl.rpg.AndorsTrail.util.L;
|
||||
|
||||
public final class WorldMapController {
|
||||
|
||||
public static int WORLDMAP_SCREENSHOT_TILESIZE = 12;
|
||||
public static int WORLDMAP_SCREENSHOT_TILESIZE = 8;
|
||||
public static int WORLDMAP_DISPLAY_TILESIZE = WORLDMAP_SCREENSHOT_TILESIZE;
|
||||
|
||||
public static void updateWorldMap(final WorldContext world, final PredefinedMap map, final LayeredTileMap mapTiles, final TileCollection cachedTiles, final Resources res) {
|
||||
|
||||
Reference in New Issue
Block a user