mirror of
https://github.com/PoshoDev/DexTool.git
synced 2026-08-12 12:46:01 -05:00
Added Info & Area buttons.
This commit is contained in:
@@ -5,6 +5,10 @@ var percent = argument1;
|
||||
|
||||
switch(zone)
|
||||
{
|
||||
case region.mid_left:
|
||||
var x_start = global.window_width*0.75 - global.window_width*0.25/2;
|
||||
break;
|
||||
|
||||
case region.mid_right:
|
||||
var x_start = global.window_width*0.75 + global.window_width*0.25/2;
|
||||
break;
|
||||
|
||||
@@ -5,6 +5,7 @@ var percent = argument1;
|
||||
|
||||
switch(zone)
|
||||
{
|
||||
case region.mid_left:
|
||||
case region.mid_right:
|
||||
var y_start = global.window_height * 0.7;
|
||||
break;
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
|
||||
switch(argument0)
|
||||
{
|
||||
case but.info:
|
||||
url_get(false);
|
||||
break;
|
||||
|
||||
case but.area:
|
||||
url_get(true);
|
||||
break;
|
||||
|
||||
case but.plus:
|
||||
global.counter++;
|
||||
|
||||
|
||||
@@ -4,29 +4,45 @@ x_ = argument0;
|
||||
y_ = argument1;
|
||||
type = argument2;
|
||||
|
||||
image_index = src.black;
|
||||
image_speed = 0;
|
||||
|
||||
length = 0.25;
|
||||
scale = global.icon_scale;
|
||||
textsize = 1.5;
|
||||
color = c_white;
|
||||
halign = fa_center;
|
||||
valign = fa_middle;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case but.info:
|
||||
text = "INFO";
|
||||
length = 1;
|
||||
scale = global.icon_scale * 1.25;
|
||||
x_ = button_align_x(region.mid_left, 0);
|
||||
y_ = button_align_y(region.mid_left, -0.7);
|
||||
break;
|
||||
|
||||
case but.area:
|
||||
text = "AREA";
|
||||
length = 1;
|
||||
scale = global.icon_scale * 1.25;
|
||||
x_ = button_align_x(region.mid_left, 0);
|
||||
y_ = button_align_y(region.mid_left, 0.7);
|
||||
break;
|
||||
|
||||
case but.plus:
|
||||
text = "+";
|
||||
image_index = 4;
|
||||
scale = global.icon_scale * 1.5;
|
||||
|
||||
textsize = 2;
|
||||
x_ = button_align_x(region.mid_right, 1.5);
|
||||
y_ = button_align_y(region.mid_right, 0);
|
||||
break;
|
||||
|
||||
case but.minus:
|
||||
text = "-";
|
||||
image_index = 4;
|
||||
|
||||
textsize = 2;
|
||||
x_ = button_align_x(region.mid_right, -1.5);
|
||||
y_ = button_align_y(region.mid_right, 0);
|
||||
break;
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
/// @description check_galar(id, show?)
|
||||
/// @param id
|
||||
/// @param show?
|
||||
/// @description check_galar(id, _show?)
|
||||
// Checks if the Pokémon can move to Sword/Shield.
|
||||
|
||||
var idee = argument0;
|
||||
var show = argument1;
|
||||
var idee = argument[0];
|
||||
|
||||
// Sanity Check™
|
||||
if (!show)
|
||||
if (argument_count>1 && !argument[1])
|
||||
return true;
|
||||
|
||||
var nat = global.dexdata[idee, dex.dexno];
|
||||
|
||||
for (var i=1; i<array_height_2d(global.galardata); i++)
|
||||
{
|
||||
//show_debug_message("Comparing "+nat+" to "+global.galardata[i, gdex.galarno]);
|
||||
show_debug_message("Comparing "+nat+" to "+global.galardata[i, gdex.galarno]);
|
||||
|
||||
if (nat == global.galardata[i, gdex.dexno])
|
||||
return true;
|
||||
|
||||
@@ -11,5 +11,5 @@ enum gdex
|
||||
type2
|
||||
}
|
||||
|
||||
if (global.show_galar)
|
||||
//if (global.show_galar)
|
||||
global.galardata = csv_load("galardex");
|
||||
@@ -9,6 +9,9 @@ if (!instance_exists(obj_lock))
|
||||
{
|
||||
plus = button_create(0, 0, but.plus);
|
||||
minus = button_create(0, 0, but.minus);
|
||||
|
||||
info = button_create(0, 0, but.info);
|
||||
area = button_create(0, 0, but.area);
|
||||
}
|
||||
|
||||
button_update_all();
|
||||
|
||||
@@ -81,6 +81,6 @@ var user = string(environment_get_variable("USERNAME"));
|
||||
var dir = "C:\\Users\\"+string(user)+"\\Pictures";
|
||||
var savestring = dir+"\\"+filename+".png";
|
||||
var fromstring = "C:\\Users\\"+user+"\\AppData\\Local\\LivingDexSS\\"+filename+ext;
|
||||
file_move_ns(fromstring, savestring);
|
||||
//file_move_ns(fromstring, savestring);
|
||||
|
||||
show_debug_message("Image exported as '"+savestring+"'.");
|
||||
|
||||
@@ -6,7 +6,8 @@ if (argument_count < 1)
|
||||
var hold = instance_find(obj_slot, 0);
|
||||
else
|
||||
var hold = argument[0];
|
||||
|
||||
|
||||
global.selected[dex.idno] = hold.idno;
|
||||
global.selected[dex.dexno] = hold.dexno;
|
||||
global.selected[dex.pokemon] = hold.pokemon;
|
||||
global.selected[dex.form] = hold.form;
|
||||
|
||||
22
Project/scripts/url_get/url_get.gml
Normal file
22
Project/scripts/url_get/url_get.gml
Normal file
@@ -0,0 +1,22 @@
|
||||
///url_get(area?)
|
||||
|
||||
var location = argument0;
|
||||
|
||||
if (check_galar(real(global.selected[dex.idno])))
|
||||
{
|
||||
var pkmn = string_lower(global.selected[dex.pokemon]);
|
||||
var url = "https://www.serebii.net/pokedex-swsh/"+pkmn+"/";
|
||||
|
||||
if (location)
|
||||
url = string_insert("/locations.shtml", url, string_length(url)+1);
|
||||
}
|
||||
else
|
||||
{
|
||||
var dexno = global.selected[dex.dexno];
|
||||
var url = "https://www.serebii.net/pokedex-sm/"+dexno+".shtml";
|
||||
|
||||
if (location)
|
||||
url = string_replace(url, "sm/", "sm/location/");
|
||||
}
|
||||
|
||||
url_open(url);
|
||||
8
Project/scripts/url_get/url_get.yy
Normal file
8
Project/scripts/url_get/url_get.yy
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "aa0cd879-2cce-411a-dd1a-10c3fd63f802",
|
||||
"modelName": "GMScript",
|
||||
"mvc": "1.0",
|
||||
"name": "url_get",
|
||||
"IsCompatibility": false,
|
||||
"IsDnD": false
|
||||
}
|
||||
Reference in New Issue
Block a user